jamesmawm / golang-user-microservice Goto Github PK
View Code? Open in Web Editor NEWCreate a micro service for handling user accounts.
License: MIT License
Create a micro service for handling user accounts.
License: MIT License
Add environment-level settings to this project.
The module github.com/kelseyhightower/envconfig
helps with this.
Suggested configs to go along:
Provide more project details....
Can we just add go module support for this program?
Store results from the CRUD user operations in a persistent database.
For local development, we can use sqlite.
For production deployment, we can use MySql.
The module github.com/jinzhu/gorm
helps with this.
Enable the CRUD operations for users.
Content type for all requests and responses should be application/json
.
Examples are:
Create a user: POST /users
Read a user: GET /users/{user-uuid}
Update a user: PUT /users/{user-uuid}
Delete a user: DELETE /users/{user-uuid}
Authenticating a user: POST /login, returns a JWT token
After the swagger.yml
file is updated in #3 , implement the REST endpoints in main.go
for user's CRUD operations.
Currently duplicate usernames are allowed to be stored in DB when the OnSignup()
method in api.go
is called.
Kindly assist to validate that a username is in use, and throw an error if so.
Update the response in swagger.yml
too as you go along.
Add support to generate and validate JWT tokens.
JWT tokens are generated when a user logs in with a username and password.
Add one unit test, just for a start.
Add docker and docker-compose file to run this service within a docker container.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.