Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Replace temporary in-memory database with a real persistent DB #10

Closed
2 tasks done
Ullaakut opened this issue Aug 1, 2018 · 1 comment · Fixed by #25
Closed
2 tasks done

Replace temporary in-memory database with a real persistent DB #10

Ullaakut opened this issue Aug 1, 2018 · 1 comment · Fixed by #25
Assignees
Labels
Milestone

Comments

@Ullaakut
Copy link
Owner

Ullaakut commented Aug 1, 2018

  • Wait for an answer from John / Artur
    OR
  • If too long or their DB takes too much time to integrate, switch to MySQL
@Ullaakut Ullaakut added this to the Exercise deadline milestone Aug 1, 2018
@Ullaakut Ullaakut self-assigned this Aug 1, 2018
@Ullaakut Ullaakut mentioned this issue Aug 2, 2018
1 task
@Ullaakut
Copy link
Owner Author

Ullaakut commented Aug 2, 2018

Got an answer from John regarding the DB, stating that they are using MySQL and going to switch over to DynamoDB.

I looked quickly into using DynamoDB in Go and there are some tools, but they don't seem as simple & convenient as gorm is. Considering I already spent quite some time setting up the base structure of the project, I'd like to speed it up so I will use MySQL, and create another issue for Potential Future improvements which would be to add a DynamoDB version of each repository.

See #22

Ullaakut added a commit that referenced this issue Aug 3, 2018
Add mysql repositories
Add docker-compose to run mysql & adminer
Add error types for better handling of db errors
Export logger to specific package & inject logger in every component
Add user data model
Update authentication to return user ID & store it in context
Add feature to force set author as token user ID
Set log level to debug while features are in progress
Add multiple debug logs thoughout the code

Add verification of admin status after a user token is parsed
Admins have read and write access
Non-admins have read access only
Fix auth controller unit tests

BlogPost repository returns created entity and 201 Created when successful
Ullaakut added a commit that referenced this issue Aug 3, 2018
Add mysql repositories
Add docker-compose to run mysql & adminer
Add error types for better handling of db errors
Export logger to specific package & inject logger in every component
Add user data model
Update authentication to return user ID & store it in context
Add feature to force set author as token user ID
Set log level to debug while features are in progress
Add multiple debug logs thoughout the code

Add verification of admin status after a user token is parsed
Admins have read and write access
Non-admins have read access only
Fix auth controller unit tests

BlogPost repository returns created entity and 201 Created when successful
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant