config

package
v0.0.0-...-00868d9 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Paths PathConfig  `yaml:"paths"`
	DB    DBConfig    `yaml:"db"`
	Redis RedisConfig `yaml:"redis"`
	Core  CoreConfig  `yaml:"-"`
}

func GetConfig

func GetConfig() *Config

func InitConfig

func InitConfig(configName string) (*Config, error)

type CoreConfig

type CoreConfig struct {
	SessionKey string `yaml:"-"`
	JWTSecret  string `yaml:"-"`
}

type DBConfig

type DBConfig struct {
	Host     string `yaml:"host"`
	User     string `yaml:"user"`
	Database string `yaml:"database"`
	Password string `yaml:"-"`
	SSLMode  string `yaml:"ssl_mode"`
}

type PathConfig

type PathConfig struct {
	TemplatePath string `yaml:"template_path"`
	StaticPath   string `yaml:"static_path"`
	MusicPath    string `yaml:"music_path"`
}

type RedisConfig

type RedisConfig struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
	DB   string `yaml:"db"`
}

Jump to

Keyboard shortcuts

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