Categorygithub.com/Akshit8/tdm
repository
0.0.0-20210609085741-fcaf2b73e8b7
Repository: https://github.com/akshit8/tdm.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Microservice Essentials

The repository contains a TODO microservice written in Go, using modern approaches, domain driven designs(DDD), idiomatic coding styles and integration with Hashicorp Vault, ElasticSeach, Kafka and many more modern tools.

Note

The application uses some features in supported in Go 1.16+

  • usage of embed to bundle static files
  • os.WriteFile to write files

Tools and packages required

# runs and manages sql migration both from CLI and programatically.
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/[email protected]

# converts sql queries into type-safe golang code.
go install github.com/kyleconroy/sqlc/cmd/[email protected]

# creates mock of any interface, basic usgage for unit testing.
go install github.com/maxbrunsfeld/counterfeiter/v6

# generate open api 3 client and types from spec.
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen

Open API and Swagger

OpenAPI is a specification to document REST API's in standard format, while Swagger offer tools to implement these specifications. Read more anout OpenAPI and swagger here.


Some Blog post covering implementation of swagger in go

Some tools and packages availiable

To embed the static-ui, embed is required. Detail explanantion covered here


For better yaml parsing, used this pkg instead of native marshaler.

Author

Akshit Sadana [email protected]