Home

Awesome

Microservice

API documentation Mentioned in Awesome Go forks stars Go Report Card

The framework for the creation of microservices, written in Golang. This package is implemented using clean architecture principles. A good article on implementing these principles in Golang: http://manuel.kiessling.net/2012/09/28/applying-the-clean-architecture-to-go-applications/

Endpoints

Code in /services/gateways/gatein/gatein.go

Using

Build and run main.go

Example requests:

Clean architecture

Distribution of architectural entities by layers

Entity

Path /domain

Usecases

Path /usecases

Interfaces

Path /service

Infrastructure

Path /app , /config and core

Config

Types of variables that support the use of environment variables in the configuration (a pointer is required, or will be ignored!) :

The default configuration file:

Specify in the command line another file:

Use environment variables in configuration:

Command line xample:

Configuration with environment tag example:

type Config struct {
	MaxIDLenght *int `env:"FOO_MAX_ID_LENGHT"`
}

Dependencies

ToDo

Conclusion

Microservice does not claim the laurels of the only true solution, but on occasion, I hope, will help you create your own micro-architecture of the service, becoming the prototype for future applications.

Give us a star!

If you like or are using this project to learn or start your solution, please give it a star. Thank you!

License

GNU GENERAL PUBLIC LICENSE Version 3

Copyright © 2017-2024 Eduard Sesigin. All rights reserved. Contacts: claygod@yandex.ru