Hello, this is Golang Restfull API using echo go framework, this repository using postgres as databases. and use golang-migrate for database migration mechanisme
- Restfull API
- Google Sheet Integration
- GRPC
- Unit Test
- case creating book
sequenceDiagram
User->>API: hit API create book
API->>GRPC client: API request using grpc client
GRPC client->>GRPC server: send data book
GRPC server->>BE: request create book
BE-->>GRPC server: response create book
GRPC server-->>GRPC client:response succes/failed
GRPC client-->>API:response success/failed
API-->>User:response message
install make to run Makefile command
create database
- install golang-migrate using go install -tags 'database1,database2' github.com/golang-migrate/migrate/v4/cmd/migrate@latest for example
go install -tags 'postgres,mysql' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
run the migration
usemake migrationup
- you can run with How to Run APP
- make tidy
- make run
- use
make migration NAME=your_command
to create migration file - fill the migration file based on you requirements
- use
make migrationup
to up your migration - use
make migrationdown
to rollback all your migration - use
make migrationversion
to check your migration version - use
make migrationchange
to force change your migration version
- install
mockery
- just run this command
mockery --all --recursive=true --keeptree
ormake mock