fiber-micro

command module
v0.0.0-...-ce654a1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 20 Imported by: 0

README

fiber-micro

Microservice API applying clean architecture, security, OpenApi, tracing, etc

Dependencies

Golang, Docker, Make, Swag tool

Features

  • Architecture
    • Clean architecture (adapters and ports)
    • Custom Messages and Errors
    • Pagination and Ordering
    • DB Migrator (scripts)
  • Go 1.26
  • Libraries
    • Web: Fiber
    • ORM: Gorm
    • Security: JWT
    • Validations: Go Playground Validator
    • Unit Test: Testify
    • DB: Postgres
    • Tracing: Opentelemetry
    • Test: Testcontainers
    • OpenAPI: Fiber Swagger
    • Environment: Godot
  • Distributed tracing
    • OpenTelemetry and Jaeger
  • Swagger
    • Swaggo & Fiber Swagger
    • Auditory (using Gorm)
  • Database
    • Postgres
    • Testcontainers

Files

Enviroment variables

# SQL
DATABASE_URL=postgres://admin:admin@localhost:5432/db_users
SHOW_SQL_INFO=false

# Jaeger tracing endpoint
TRACING_HOST=localhost:4318

# Swagger
SWAGGER_ENABLED=true

# Security JWT
SECURITY_ENABLED=true
JWT_DURATION=300
JWT_SECRET_KEY=UUID
JWT_ISSUER=https://acme.com
JWT_AUDIENCE=https://acme.com

Usage

  • Executing make help all the available commands will be listed.
  • Also the standard Go commands could be used, like go run main.go
  • To use this archetype with a different name, execute this command to replace the names:
find . -type f -exec sed -i 's/go-microservice/your-project-name/g' {} +

Services

  • Create users POST: /users
  • Get users GET: /users
  • Login POST: /users/login

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
adapter
application
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
tests

Jump to

Keyboard shortcuts

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