-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using SQLite for DB #24
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ODO: handle error
fullerzz
commented
Jun 15, 2024
Will fix tests in different MR. |
fullerzz
added a commit
that referenced
this pull request
Jun 15, 2024
* wip: search files by tag * wip: sqlite for db instead of dynamo * writes to db on file upload are working * added db.go with functions to add item to table and list files in table * getFileMetadata successfully queries sqlite table when file exists. TODO: handle error * returns 404 if error indicates file wasn't found - else 500 * moved additional table functionality to db.go * removed more functions in aws.go - TODO: move QueryTags functionality to sqlite table * moved all db functionality from dynamo to sqlite * removed dynamo table from iac * todo: mock s3 and any aws calls in tests * removed commented-out line of code * added tfvars to support dev and prod envs * removed config. will set the values in scalr ui for now
fullerzz
added a commit
that referenced
this pull request
Jun 15, 2024
* initial terraform code to create iam + s3 resources * WIP: updating saveFile to store uploaded file in s3 * WIP: updating saveFile to store uploaded file in s3; added s3.go * updated error handling + loading bucket name from env var * working on writing uploaded file metadata to new dynamo table * added scripts * writes to table successfully on file upload * updated funcs in aws.go to use FileUpload struct instead of FileMetadata * removed funcs that are now out of scope * created struct to hold basic s3 info and now creating aws clients on startup * attached upload file function to new s3 struct * now using bucket key as range key for dynamo table * changed bucketKey -> objectKey. file upload and retrieval is somewhat functional now * removed unused structs * 1.22 -> 1.22.4 * using http.D etectContentType when returning downloaded file from s3 * implemented GET /files * Using SQLite for DB (#24) * wip: search files by tag * wip: sqlite for db instead of dynamo * writes to db on file upload are working * added db.go with functions to add item to table and list files in table * getFileMetadata successfully queries sqlite table when file exists. TODO: handle error * returns 404 if error indicates file wasn't found - else 500 * moved additional table functionality to db.go * removed more functions in aws.go - TODO: move QueryTags functionality to sqlite table * moved all db functionality from dynamo to sqlite * removed dynamo table from iac * todo: mock s3 and any aws calls in tests * removed commented-out line of code * added tfvars to support dev and prod envs * removed config. will set the values in scalr ui for now * updated resource names to include env
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To Do