Giter VIP home page Giter VIP logo

hexa-go's Introduction

go-microservice-boilerplate

.
├── bin                                     # Binaries output directory
├── cmd                                     # Root of main
│   ├── grpc                                # GRPC main
│   └── http                                # HTTP main
├── config                                  # Configuration parser, structure and .yaml file
│   ├── config.go                           # Config file reader and parser 
│   ├── config.yaml                         # Config .yaml file
│   └── models.go                           # Config model structure
├── docs                                    # Swagger documentation
│   ├── docs.go                             # Document parser
│   ├── swagger.json                        # Auto generated swagger JSON file 
│   └── swagger.yaml                        # Auto generated swagger YAML file 
├── internal                                # Hexagonal - DDD Layer
│   └── auth                                # Auth Domain
│       ├── application                     # Application Layer
│       │   └── service                     # Usecase Layer
│       │   |   └── service.go              # Usecase file of current domain
│       │   └── jobs                        # Special Jobs Ticker or Crons
│       │       └── jobs.go                 # Special jobs runner by go Ticker with GoRoutines (like as Cron Jobs) (time specific) 
│       ├── domain                          # Domain Layer
│       │   └── entities                    # Models/Structures
│       │       └── entities.go             # Models/Structures file of current domain
│       │   └── errors                      # Custom Errors
│       │       └── errors.go               # Custom Errors file of current domain
│       │   └── ports                       # Ports / Interfaces
│       │       └── http_handler.go         # HTTP Handlers Interfaces file of current domain
│       │       └── postgresql_repo.go      # Postgresql Interfaces file of current domain
│       │       └── service.go              # Usecase Interface file of current domain
│       │   └── utils                       # Specific Utilities
│       │       └── utils.go                # Specific Utilities file of current domain
│       └── handler                         # Handler Layer 
│       │   └── grpc                        # GRPC Handlers
│       │       └── grpc                    # GRPC Handler file of current domain 
│       │   └── http                        # HTTP Handlers
│       │       └── handlers.go             # HTTP Handler file of current domain  
│       │       └── routes.go               # HTTP routes file of current domain  
│       ├── infrastructure                  # Infrastructure Layer
│       │   └── adapters                    # 3rd party integration adapters 
│       │       └── postgresql_repo         # PostgresqlRepository file of current domain
│       │   └── repository                  # Repositories 
│       │       └── postgresql_repo         # PostgresqlRepository file of current domain
├── pkg                                     # Custom packages for general common usage
├── proto                                   # GRPC proto directory
│   └── auth                                # Auth Domain
│       └── auth.pb.go                      # Auto generated domain specific proto functions
│       └── auth.proto                      # Domain specific generated domain specific proto functions
│       └── auth_grpc.pb.go                 # Auto generated domain specific proto functions
└── ...
# Makefile commands 
make run #for run current application 

make swag # for generate swagger documentations

make genproto # for generate grpc files *.pb.go and *_grpc.pb.go

make build # compile binary for all -> Mac, Linux and Windows

make buildl # compile only for Linux OS

make buildm # compile only for Mac OS

make buildw # compile only for Windows OS

hexa-go's People

Contributors

ivanbarayev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.