Fiber Boilerplate
  • Introduction
  • Installation
  • Features
  • Project Structure
  • Project Flow
  • Deployment
  • Configuration File
    • Auth
    • Database
    • Log
    • Mail
    • PayPal
    • Profiler
    • Server
    • Session
    • Storage
    • Token
  • Additional Libraries
  • Project Dependencies
Powered by GitBook
On this page

Was this helpful?

  1. Configuration File

Database

type DatabaseDriver struct {
   Driver      string `yaml:"driver" env:"DB_DRIVER"`
   Host        string `yaml:"host" env:"DB_HOST"`
   Username    string `yaml:"username" env:"DB_USER"`
   Password    string `yaml:"password" env:"DB_PASS"`
   DBName      string `yaml:"db_name" env:"DB_NAME"`
   Port        int    `yaml:"port" env:"DB_PORT"`
   Connections int    `yaml:"connections" env:"DB_CONNECTIONS"`
}

type DatabaseConfig struct {
   *gorm.DB
   Drivers map[string]DatabaseDriver `yaml:"drivers"`
   Default DatabaseDriver            `yaml:"default" env:"DEFAULT_DB_DRIVER"`
}
PreviousAuthNextLog

Last updated 4 years ago

Was this helpful?