config

package
v0.0.0-...-48d44df Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig()

func LoadConfigWithPath

func LoadConfigWithPath(configPath string)

Types

type Address

type Address struct {
	Etcd     string
	User     string
	Video    string
	Favorite string
	Chat     string
	Api      string
	Comment  string
	Relation string
}

type Configs

type Configs struct {
	MySQL       *MySQL `json:"mysql"`
	Address     *Address
	Service     *ServiceName
	RedisConfig *RedisConfig    `yaml:"redis"`
	OSSConfig   *OSSConfig      `yaml:"oss"`
	ResConfig   *ResourceConfig `yaml:"resource"`
}
var Config Configs

type MySQL

type MySQL struct {
	Host     string
	Port     string
	Database string
	Username string
	Password string
	DSN      string
}

type OSSConfig

type OSSConfig struct {
	Endpoint        string `yaml:"endpoint"`
	AccessKeyId     string `yaml:"access_key_id"`
	AccessKeySecret string `yaml:"access_key_secret"`
	BucketName      string `yaml:"bucket_name"`
	PrefixPath      string `yaml:"prefix_path"`
}

type RedisConfig

type RedisConfig struct {
	Addr     string `yaml:"addr"`
	Password string `yaml:"password"`
	DB       int    `yaml:"db"`
}

type ResourceConfig

type ResourceConfig struct {
	TmpDir string `yaml:"tmp_dir"`
}

type ServiceName

type ServiceName struct {
	User     string
	Video    string
	Favorite string
	Comment  string
	Relation string
	Chat     string
}

Jump to

Keyboard shortcuts

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