Implement basic function for mysql
Learning go-lang: https://tour.golang.org/welcome/1
Learning Go-kit https://medium.com/swlh/getting-started-with-go-kit-f2ccf71d491f
Build a backend service with 4 APIs
- Create
- Update
- Delete
- Read
Model News:
- Name (string)
- Thumbnail (url - string)
- Content (string)
- Tags (string)
- CreatedAt (Date)
- UpdatedAt (Date)
Research gRPC: https://grpc.io/ Research implement JWT Token: https://www.sohamkamani.com/blog/golang/2019-01-01-jwt-authentication/ Write a Authentication service base on GoKit: https://gokit.io/ but expose APIs via gRPC
- Register - Restful
- Login response JWT Token - Restful
- Verify Token (response userID) - gRPC
Implement authentication for service CRUD news with authentication:
- Every request call to restful CRUD news service will have a token in header
- NewsService will call to AuthService to verify token valid or not (if yes will have userID)
- Update model News with 2 fields: CreateBy & UpdateBy with userID response from AuthService
- Learn how to use grpc-gateway: https://github.com/grpc-ecosystem/grpc-gateway
- Learn how to use ent: https://github.com/facebookincubator/ent
- Define all of request/response on protobuf
- Build first MVP of go-crud base on:
- grpc-gateway
- ent for ORM
- Add sample data to MySQL & demo for Account
- For ORM (Object-relational mapping) you can consider using that library: https://gorm.io/
- Go kit: https://gokit.io/
- Template projects: Reference: https://github.com/golang-standards/project-layout
- Style guideline: https://github.com/uber-go/guide/blob/master/style.md