eagle

command module
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2025 License: MIT Imports: 16 Imported by: 0

README ยถ

๐Ÿฆ… eagle

GitHub Workflow Status codecov GolangCI godoc Gitter OpenTracing Badge Go Report Card gitmoji License

A Go framework suitable for rapid business development, which can quickly build API services or Web sites.
English | ไธญๆ–‡ๆ–‡ๆกฃ

Features

Framework Layered Architecture

eagle-framework-diagram

Logic Layered Architecture

Eagle utilizes a classic layered structure and employs the Wire dependency injection framework to enhance modularity and reduce coupling between components.

Leagle Layout Arch

Directory Structure

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                     

Installtion CLI

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

Quick Start

# 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

Documentation

https://go-eagle.org/

CHANGELOG

Who is using

Discussion

Microservice Roadmap

Microservice-roadmap

Contributing

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!

  • Fork the repository to your own GitHub account.
  • Create a new branch for your changes.
  • Make your changes to the code.
  • Commit your changes and push the branch to your forked repository.
  • Open a pull request on our repository.

Stargazers over time

Stargazers over time

License

MIT. See the LICENSE file for details.

Documentation ยถ

Overview ยถ

*

*
*    ____          __
*   / __/__ ____ _/ /__
*  / _// _ `/ _ `/ / -_)
* /___/\_,_/\_, /_/\__/
*         /___/
*
*
* generate by http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Eagle

Directories ยถ

Path Synopsis
cmd
eagle module
examples
config command
crontab command
log command
queue/kafka command
queue/nats command
queue/redis command
registry command
*
*
trace command
*
*
internal
pkg
Package pkg ่ฎกๆ•ฐๅ™จ๏ผŒๅฏไปฅ็”จไบŽไธšๅŠก็š„ๅ„็งๆจกๅž‹็ปŸ่ฎกไฝฟ็”จ ๅœบๆ™ฏ๏ผšๅธธ็”จไบŽ้‡ๅค็ญ–็•ฅ๏ผŒๆˆ–่€…ๅไฝœๅผŠๅค„็†ๆŽงๅˆถ
Package pkg ่ฎกๆ•ฐๅ™จ๏ผŒๅฏไปฅ็”จไบŽไธšๅŠก็š„ๅ„็งๆจกๅž‹็ปŸ่ฎกไฝฟ็”จ ๅœบๆ™ฏ๏ผšๅธธ็”จไบŽ้‡ๅค็ญ–็•ฅ๏ผŒๆˆ–่€…ๅไฝœๅผŠๅค„็†ๆŽงๅˆถ
web
pkg
app
Package app eagle defines something for app
Package app eagle defines something for app
container/group
Package group provides a sample lazy load container.
Package group provides a sample lazy load container.
log
Package log span logger for trace reference: https://github.com/jaegertracing/jaeger/tree/master/examples/hotrod/pkg/log
Package log span logger for trace reference: https://github.com/jaegertracing/jaeger/tree/master/examples/hotrod/pkg/log
sync/errgroup
Package errgroup provides synchronization, error propagation, and Context errgroup ๅŒ…ไธบไธ€็ป„ๅญไปปๅŠก็š„ goroutine ๆไพ›ไบ† goroutine ๅŒๆญฅ,้”™่ฏฏๅ–ๆถˆๅŠŸ่ƒฝ.
Package errgroup provides synchronization, error propagation, and Context errgroup ๅŒ…ไธบไธ€็ป„ๅญไปปๅŠก็š„ goroutine ๆไพ›ไบ† goroutine ๅŒๆญฅ,้”™่ฏฏๅ–ๆถˆๅŠŸ่ƒฝ.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL