Skip to content

The template repository for my next Go microservice project.

License

Notifications You must be signed in to change notification settings

koddr/template-microservice-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Microservice Go template

Go version Go report License

A lightweight Go microservice.

Example configuration:

# API server settings.
API_SERVER_PORT=8080

# API server auth settings.
API_SERVER_AUTH_USERNAME="user"
API_SERVER_AUTH_PASSWORD="password"

# API server DB settings.
API_SERVER_DATABASE_URL="postgres://postgres:password@localhost:5432/postgres"

Endpoints

GET /api/v1/transactions

Returns all transactions from the database.

GET /api/v1/transactions/filter

Returns filtered by created_at field transactions from the database.

Required query params:

  • created_at_start - string in format "2006-01-02"
  • created_at_end - string in format "2006-01-02"

POST /api/v1/transaction

Add a new transaction to the database.

⚠️ License

template-microservice-go is free and open-source software licensed under the Apache 2.0 License, created and supported by Vic Shóstak with 🩵 for people and robots.

About

The template repository for my next Go microservice project.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project