configs

package
v0.0.0-...-716047f Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Host    string
	Port    int
	Profile bool
	Metrics bool
}

AppConfig is config struct for app

func (*AppConfig) Address

func (c *AppConfig) Address() string

type Config

type Config struct {
	App   AppConfig
	Mysql MysqlConfig
	Redis RedisConfig
}

Config aggregation

func Get

func Get() Config

Get returns Config object

type MysqlConfig

type MysqlConfig struct {
	Host     string
	Port     int
	Database string
	User     string
	Password string
	Logging  bool
}

func (MysqlConfig) DSN

func (c MysqlConfig) DSN() string

type RedisConfig

type RedisConfig struct {
	Host     string
	Port     string
	Database int
	Logging  bool
}

func (RedisConfig) Address

func (c RedisConfig) Address() string

Jump to

Keyboard shortcuts

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