Skip to content

Kkmikaze/go-grpc

Repository files navigation

Go gRPC Documentation

Table Of Content

Prerequisites

What things you need to setup the application:

Structure

.
└── api
|   └── embed.go
├── cmd
|   ├── server
|   │   └── main.go
|   └── root.go
├── common
|   ├── orm.go
|   ├── transform.go
|   └── validator.go
├── config
|   └── config.go
├── db
|   └── migration
|       └── {domain_dir}
|           └── *.sql
├── domain
|   └── {api_version_dir}
|       └── {domain_dir}
|           ├── internal
|           │   ├── entity
|           │   │   └── *.go
|           │   ├── handler
|           │   │   └── *.go
|           │   ├── repository
|           │   │   └── *.go
|           │   └── validator
|           │       └── *.go
|           ├── usecase
|           │   └── *.go
|           └── {domain}.go
├── interceptors
|   ├── rpc_client_interceptors.go
|   │
|   └── rpc_server_interceptors.go
├── internal
|   └── gateway
|       └── *.go
├── middleware
|   └── *go
├── pkg
|   ├── orm
|   │   └── *.go
|   ├── rcpclient
|   │   └── *.go
|   └── rcpserver
|       └── *.go
├── proto
|   └── {domain_dir}
|       └── {api_version_dir}
|           └── *.proto
├── scripts
|   └── *.sh
├── stubs
|   └── {domain_dir}
|       └── {api_version_dir}
|           └── *.pb.go
├── thid_party
|   ├── proto
|   └── swagger-ui
|   └── embed.go
├── .air.toml
├── .env.example
├── .gitignore
├── .golangci.yml
├── Dockerfile
├── go.mod
├── go.sum
├── LICENSE
├── Makefile
└── README.md

How To

Running The App (local)

  • First get the dependencies with this command:
make dependency
  • Copy the .env.example to .env with run this command:
cp .env-example .env
  • Generate the stubs with this command:
make proto-gen
  • and for running the application can use this command:
make debug

Running The App (local) with Hot Reload

  • For running the application with hot reload can use this command:
make air

References

GIT Style

For commit message style or git style guide, use this doc

ORM

ORM using GORM, follow this doc

Architecture

Architecture reference on go-grpc-microservices, follow this doc repo

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published