Skip to content
/ base Public

Standardized foundation for Go microservices

License

Notifications You must be signed in to change notification settings

myzie/base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base

Standardized foundation for Go microservices.

What is Included

This foundation includes a handful of common dependencies:

  • Flags to configure database, HTTP port, etc.
  • Gorm database handle
  • RSA keypair for signing and verifying JWTs
  • Minio Client to access S3 compatible storage
  • Echo web server

Usage

I suggest embeddeding Base into a service struct that has your HTTP handlers.

type myService struct {
	*base.Base
}

You then have easy access to the database handle wherever you have access to this service.

See the simple example.

Limitations

This reusability works for me but it's not that flexible currently, so I don't expect it to work for you!

You can use the Base struct but customize your own setup. This would allow for example using MySQL instead of the default Postgres.

About

Standardized foundation for Go microservices

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages