conf

package
v0.0.0-...-a32abf6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFile = "./env/shard.yaml"
)

Variables

View Source
var (
	C       *Conf
	Project string
)

Functions

func InitConf

func InitConf()

Types

type Authorization

type Authorization struct {
	ExpireHour int `yaml:"expireHour"`
}

type Conf

type Conf struct {
	Host          string        `yaml:"host"`
	Rtmp          string        `yaml:"rtmp"`
	Port          string        `yaml:"port"`
	DB            DB            `yaml:"db"`
	Oss           Oss           `yaml:"oss"`
	Authorization Authorization `yaml:"authorization"`
	Level         string        `yaml:"level"`
	ResetPassword string        `yaml:"resetPassword"`
	File          File          `yaml:"file"`
}

type DB

type DB struct {
	Mysql Mysql `yaml:"mysql"`
	Redis Redis `yaml:"redis"`
}

type File

type File struct {
	Path string `yaml:"path"`
}

type Mysql

type Mysql struct {
	Host        string `yaml:"host"`
	Port        string `yaml:"port"`
	DataBase    string `yaml:"dataBase"`
	Username    string `yaml:"username"`
	Password    string `yaml:"password"`
	LogMode     string `yaml:"logMode"`
	Config      string `yaml:"config"`
	TablePrefix string `yaml:"tablePrefix"`
}

type Oss

type Oss struct {
	AccessKey  string `yaml:"accessKey"`
	SecretKey  string `yaml:"secretKey"`
	Domain     string `yaml:"domain"`
	AdminBuket string `yaml:"adminBuket"`
}

type Redis

type Redis struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	DataBase int    `yaml:"dataBase"`
	Password string `yaml:"password"`
}

Jump to

Keyboard shortcuts

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