config

package
v0.0.0-...-6988bd6 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Bind string `mapstructure:"bind"`
}

API contains api settings.

type AppConfig

type AppConfig struct {
	API *API `mapstructure:"api"`
	Db  *DB  `mapstructure:"db"`
}

AppConfig is a container for application config.

func GetAppConfig

func GetAppConfig() (*AppConfig, error)

GetAppConfig returns *Config.

type DB

type DB struct {
	ConnString       string        `mapstructure:"conn_string"`
	MaxOpenCons      int           `mapstructure:"max_open_cons"`
	ConnMaxLifetime  time.Duration `mapstructure:"conn_max_lifetime"`
	MigrationDirPath string        `mapstructure:"migration_dir_path"`
	MigrationTable   string        `mapstructure:"migration_table"`
}

DB contains database and migration settings.

Jump to

Keyboard shortcuts

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