π¦ A Go framework for the API or Microservice
See the codeA Go framework suitable for rapid business development, which can quickly build API services or Web sites.
English | δΈζζζ‘£
Eagle utilizes a classic layered structure and employs the Wire dependency injection framework to enhance modularity and reduce coupling between components.
eagle-layout/
βββ api/ # proto files and service interface definitions
β βββ helloworld/ # example or basic service proto definitions
β βββ user/ # user-related proto definitions
βββ bin/ # compiled binary files
βββ cmd/ # service entry points, main.go and startup logic
β βββ server/ # main service entry
β βββ consumer/ # message consumer service entry
β βββ gen/ # code generation entry
βββ config/ # configuration files for multiple environments
βββ deploy/ # deployment files, e.g. Dockerfile, K8s configs
βββ internal/ # internal implementation, not for external use
β βββ dal/ # data access layer
β β βββ db/ # database related code
β β β βββ model/ # data model definitions
β β β βββ method/ # custom query methods
β β β βββ query/ # gorm/gen generated query methods
β β βββ cache/ # cache related code
β β βββ rpc/ # RPC/HTTP client code
β βββ ecode # define error code
β βββ handler # receive user request
β βββ repository/ # repository layer, wraps data access interfaces
β βββ routers/ # route and middleware registration
β βββ service/ # business logic layer
β βββ event/subscribe/ # event subscription, e.g. MQ handlers
βββ logs/ # log output directory
βββ scripts/ # script files
βββ third_party/ # third-party dependencies or proto files
βββ .github/ # GitHub workflows
βββ .gitignore # Git ignore file
βββ CHANGELOG.md # changelog
βββ LICENSE # license
βββ Makefile # build, test, code generation commands
βββ README.md # project documentation
βββ openapi.yaml # OpenAPI specification file
GOPROXY="https://goproxy.cn,direct"
# go >= 1.16
go install github.com/go-eagle/eagle/cmd/eagle@latest
# go < 1.16
go get github.com/go-eagle/eagle/cmd/eagle
# gen a server with http and gRPC
eagle new eagle-demo
# or
eagle new github.com/foo/eagle-demo
# install dependence
go mod tidy
# run
make run
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
MIT. See the LICENSE file for details.
Overall
Maintained
Code review
Go module
Latest release
Releases this year
285 followers Β· starred Aug 2025
87 followers Β· starred Dec 2025
42 followers Β· starred Feb 2022
64 followers Β· starred May 2024
π¦ A Go framework for the API or Microservice
See the codeA Go framework suitable for rapid business development, which can quickly build API services or Web sites.
English | δΈζζζ‘£
Eagle utilizes a classic layered structure and employs the Wire dependency injection framework to enhance modularity and reduce coupling between components.
eagle-layout/
βββ api/ # proto files and service interface definitions
β βββ helloworld/ # example or basic service proto definitions
β βββ user/ # user-related proto definitions
βββ bin/ # compiled binary files
βββ cmd/ # service entry points, main.go and startup logic
β βββ server/ # main service entry
β βββ consumer/ # message consumer service entry
β βββ gen/ # code generation entry
βββ config/ # configuration files for multiple environments
βββ deploy/ # deployment files, e.g. Dockerfile, K8s configs
βββ internal/ # internal implementation, not for external use
β βββ dal/ # data access layer
β β βββ db/ # database related code
β β β βββ model/ # data model definitions
β β β βββ method/ # custom query methods
β β β βββ query/ # gorm/gen generated query methods
β β βββ cache/ # cache related code
β β βββ rpc/ # RPC/HTTP client code
β βββ ecode # define error code
β βββ handler # receive user request
β βββ repository/ # repository layer, wraps data access interfaces
β βββ routers/ # route and middleware registration
β βββ service/ # business logic layer
β βββ event/subscribe/ # event subscription, e.g. MQ handlers
βββ logs/ # log output directory
βββ scripts/ # script files
βββ third_party/ # third-party dependencies or proto files
βββ .github/ # GitHub workflows
βββ .gitignore # Git ignore file
βββ CHANGELOG.md # changelog
βββ LICENSE # license
βββ Makefile # build, test, code generation commands
βββ README.md # project documentation
βββ openapi.yaml # OpenAPI specification file
GOPROXY="https://goproxy.cn,direct"
# go >= 1.16
go install github.com/go-eagle/eagle/cmd/eagle@latest
# go < 1.16
go get github.com/go-eagle/eagle/cmd/eagle
# gen a server with http and gRPC
eagle new eagle-demo
# or
eagle new github.com/foo/eagle-demo
# install dependence
go mod tidy
# run
make run
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
MIT. See the LICENSE file for details.
Overall
Maintained
Code review
Go module
Latest release
Releases this year
285 followers Β· starred Aug 2025
87 followers Β· starred Dec 2025
42 followers Β· starred Feb 2022
64 followers Β· starred May 2024