Skip to content

kidpeterpan/go.hexagonal-architecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go.hexagonal-architecture

  • each service communicate with port interface
  • each service completely de-coupling

hexagonal.png

project structure

.
├── README.md
├── cmd
│   └── main.go
├── docker-compose.yml
├── go.mod
├── go.sum
├── hexagonal.png
└── internal
    ├── adapters
    │   ├── app
    │   │   └── api
    │   │       └── api.go
    │   ├── core
    │   │   └── arithmetic
    │   │       ├── arithmetic.go
    │   │       └── arithmetic_test.go
    │   └── framework
    │       ├── left
    │       │   └── grpc
    │       │       ├── proto
    │       │       │   └── arithmetic_svc.proto
    │       │       └── server
    │       │           └── server.go
    │       └── right
    │           └── db
    │               └── db.go
    └── ports
        ├── app.go
        ├── core.go
        ├── framework_left
        │   ├── arithmetic_svc.pb.go
        │   └── arithmetic_svc_grpc.pb.go
        └── framework_right.go

start deps

docker-compose up 

stop deps

docker-compose down

generate proto

brew install protobuf
protoc --go_out=internal/adapters/framework/left/grpc --go-grpc_out=internal/adapters/framework/left/grpc --proto_path=internal/adapters/framework/left/grpc/proto internal/adapters/framework/left/grpc/proto/*.proto

run

go run cmd/main.go

client test

evans internal/adapters/framework/left/grpc/proto/arithmetic_svc.proto

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages