Giter Site home page Giter Site logo

golang-user-microservice's People

Contributors

jamesmawm avatar karimelazzouni avatar minaorangina avatar nols1000 avatar paymin avatar scampiuk avatar yeganeh666 avatar yzwdroid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

golang-user-microservice's Issues

Add docker support

Add docker and docker-compose file to run this service within a docker container.

Add Sqlite3 and MySql database support

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.

Update swagger.yml

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

Enable environment configuration

Add environment-level settings to this project.
The module github.com/kelseyhightower/envconfig helps with this.

Suggested configs to go along:

  • Port usage
  • Database switching
  • API context path.

Add inputs validation

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 JWT token support

Add support to generate and validate JWT tokens.
JWT tokens are generated when a user logs in with a username and password.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.