go-sample-service

module
v0.0.0-...-faaee1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2021 License: Apache-2.0

README

Go Sample Service

Sample Go service for providing a base web app structure. It contemplates a clear startup/shutdown strategy, database support, basic JWT authetication & authorization mechanism, proper structured log support using Uber zap pkg, and provides observability through OpenTelemetry tools using Zipkin.


Human readable logs

For proper formatting the structured logs in a human readable way, use the logfmt program under app/tooling folder.

Admin CLI Tool

For getting the available admin CLI commands:

make admin-help
Service Configuration

For getting the configset for running the service:

make help

Directories

Path Synopsis
app
services/sales-api/handlers
Package handlers containes the full set of handler functions and routes supported by the http api.
Package handlers containes the full set of handler functions and routes supported by the http api.
tooling/logfmt
This program takes the structured log output and makes it human readable.
This program takes the structured log output and makes it human readable.
tooling/sales-admin
This program performs administrative tasks for the sales app.
This program performs administrative tasks for the sales app.
tooling/sales-admin/commands
Package commands contains the set of functionality (commands) of the sales admin CLI tooling.
Package commands contains the set of functionality (commands) of the sales admin CLI tooling.
business
auth
Package auth provides authentication and authorization support.
Package auth provides authentication and authorization support.
core/user
Pakcage user contains usecases for CRUD operations.
Pakcage user contains usecases for CRUD operations.
data/schema
Package schema contains the db schema, migrations and seeding data.
Package schema contains the db schema, migrations and seeding data.
tests
Package tests contains supporting code for running tests.
Package tests contains supporting code for running tests.
foundation
database
Package database provides support for database interaction.
Package database provides support for database interaction.
logger
Package logger provides a factory function to construct a logger.
Package logger provides a factory function to construct a logger.
web
Package web contains gluecode for abstracting observability, middlewares and error handling around http Handlers
Package web contains gluecode for abstracting observability, middlewares and error handling around http Handlers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL