config

package
v0.0.0-...-57d8560 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func MigrateDb

func MigrateDb(db *gorm.DB) error

Types

type Configuration

type Configuration struct {
	DbConfig DbConfig
}

func LoadConfig

func LoadConfig(path string) (*Configuration, error)

func (*Configuration) GetDb

func (configuration *Configuration) GetDb() (*gorm.DB, error)

type DbConfig

type DbConfig struct {
	Host     string `mapstructure:"DB_HOST"`
	Port     string `mapstructure:"DB_PORT"`
	Username string `mapstructure:"DB_USERNAME"`
	Password string `mapstructure:"DB_PASSWORD"`
	Database string `mapstructure:"DB_DATABASE"`
}

Jump to

Keyboard shortcuts

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