fiber-versioning-boilerplate

module
v0.0.0-...-6b488ef Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT

README ΒΆ

Fiber Versioning Boilerplate

Linter Testing

fiber-versioning-boilerplate

Prerequisite

Make sure you have the following installed outside the current project directory and available in your GOPATH

Features ✨
  • API Versioning
  • Data Versioning
  • Dynamic Struct Type
  • Clean Architecture
  • Postman Collections
  • API Documentation with swagger
Project structure πŸ“
api
  β”œβ”€β”€ adapters
  β”‚  └── mongo.go
  β”œβ”€β”€ app.go
  β”œβ”€β”€ handlers
  β”‚  β”œβ”€β”€ errors.go
  β”‚  β”œβ”€β”€ parser_body.go
  β”‚  └── response.go
  β”œβ”€β”€ utilities
  β”‚  β”œβ”€β”€ configuration.go
  β”‚  └── converter.go
  └── versions
    β”œβ”€β”€ v1
    β”‚  β”œβ”€β”€ entities
    β”‚  β”œβ”€β”€ factories
    β”‚  β”œβ”€β”€ repositories
    β”‚  β”œβ”€β”€ routes
    β”‚  └── usecases
    └── v2
        β”œβ”€β”€ entities
        β”œβ”€β”€ factories
        β”œβ”€β”€ repositories
        β”œβ”€β”€ routes
        └── usecases

Development environment setup

make setup

Start the application ⚑️

make start

Testing πŸ§ͺ

make test

Manual πŸ—’οΈ

Run make help to list available commands:

Choose a command run in fiber-versioning-boilerplate:

  setup           Initialize project
  docker-start    Start docker-compose
  docker-stop     Stop docker-compose
  start           Start the application
  copy-env        Copy environment file
  gendoc          Generate docs api with swagger
  test            Run tests coverage
  mongo-dump      Dump MongoDB data for testing
  mongo-restore   Restore MongoDB data for testing

Directories ΒΆ

Path Synopsis
api
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag

Jump to

Keyboard shortcuts

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