MCPcopy
hub / github.com/go-eagle/eagle

github.com/go-eagle/eagle @v1.11.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.11.0 ↗
1,462 symbols 4,659 edges 323 files 933 documented · 64%
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

  • Issue: https://github.com/go-eagle/eagle/issues
  • Discord: https://discord.com/channels/968369660900814869

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.

Extension points exported contracts — how you extend this code

Encoding (Interface)
Encoding 编码接口定义 [10 implementers]
pkg/encoding/encoding.go
Server (Interface)
Server is transport server interface. [7 implementers]
pkg/transport/transport.go
Getter (Interface)
Getter . [5 implementers]
pkg/cache/getter.go
Registry (Interface)
Registry is service registrar. [4 implementers]
pkg/registry/registry.go
Producer (Interface)
Producer queue producer [4 implementers]
pkg/queue/interface.go
Logger (Interface)
Logger is a contract for the logger [2 implementers]
pkg/log/logger.go
CounterVec (Interface)
CounterVec counter vec. [2 implementers]
pkg/metric/metric.go
Lock (Interface)
Lock define common func [2 implementers]
pkg/lock/lock.go

Core symbols most depended-on inside this repo

Errorf
called by 120
pkg/log/logger.go
New
called by 95
pkg/trace/jaeger/jaeger.go
Error
called by 84
pkg/log/logger.go
String
called by 71
pkg/version/version.go
Close
called by 61
pkg/email/mail.go
Fatal
called by 52
pkg/log/logger.go
Warnf
called by 52
pkg/log/logger.go
Run
called by 44
pkg/app/app.go

Shape

Function 668
Method 534
Struct 196
Interface 30
FuncType 24
TypeAlias 10

Languages

Go100%

Modules by API surface

pkg/sign/signer.go30 symbols
pkg/log/logger.go30 symbols
internal/repository/repository.go24 symbols
internal/service/user_service.go22 symbols
pkg/queue/rabbitmq/options/publish.go21 symbols
pkg/log/zap.go21 symbols
pkg/metric/metric.go19 symbols
examples/helloworld/helloworld/greeter.pb.go18 symbols
pkg/sign/verifer.go17 symbols
pkg/utils/slice_test.go16 symbols
pkg/errcode/error.go15 symbols
examples/helloworld/helloworld/greeter_grpc.pb.go15 symbols

Dependencies from manifests, versioned

github.com/AlecAivazis/survey/v2v2.2.12 · 1×
github.com/ClickHouse/ch-gov0.61.5 · 1×
github.com/HdrHistogram/hdrhistogram-gov1.0.1 · 1×
github.com/IBM/saramav1.45.1 · 1×
github.com/KyleBanks/depthv1.2.1 · 1×
github.com/alecthomas/templatev0.0.0-2019071801265 · 1×
github.com/alicebob/gopher-jsonv0.0.0-2020052007255 · 1×
github.com/aliyun/alibaba-cloud-sdk-gov1.61.18 · 1×
github.com/andybalholm/brotliv1.1.0 · 1×
github.com/armon/go-metricsv0.3.10 · 1×

Datastores touched

(mongodb)Database · 1 repos
(mysql)Database · 1 repos

For agents

$ claude mcp add eagle \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact