config

package
v0.0.0-...-c649034 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultString

func DefaultString(v, def string) string

DefaultString ...

func Initialize

func Initialize(filePath ...string) error

Initialize ...

func IsExists

func IsExists(name string) bool

IsExists ...

Types

type Configure

type Configure struct {
	Database Database `toml:"database"`
	Queue    Queue    `toml:"queue"`
	IPFS     IPFS     `toml:"ipfs"`
	Manager  Manager  `toml:"manager"`
}

Configure ...

func Config

func Config() *Configure

Config ...

func DefaultConfigure

func DefaultConfigure() *Configure

func LoadConfig

func LoadConfig(filePath string) *Configure

LoadConfig ...

type Database

type Database struct {
	Prefix   string `toml:"prefix"`
	Type     string `toml:"type"`
	Addr     string `toml:"addr"`
	Port     string `toml:"port"`
	Password string `toml:"password"`
	Username string `toml:"username"`
	DB       string `toml:"db"`
}

Database ...

type IPFS

type IPFS struct {
	Host string `toml:"host"`
	Port string `toml:"port"`
}

IPFS ...

type Manager

type Manager struct {
	ManagerName    string `toml:"manager_name"`
	NodeName       string `toml:"node_name"`
	CensorName     string `toml:"censor_name"`
	EnableGRPC     bool   `toml:"enable_grpc"`
	EnableREST     bool   `toml:"enable_rest"`
	REST           REST   `toml:"rest"`
	RequestType    string `toml:"request_type"`
	KeyAddressRule string `toml:"key_address_rule"`
	Host           string `toml:"host"`
}

type Media

type Media struct {
	Upload      string `toml:"upload"`        //上传路径
	Transfer    string `toml:"transfer"`      //转换路径
	M3U8        string `toml:"m3u8"`          //m3u8文件名
	KeyURL      string `toml:"key_url"`       //default url
	KeyDest     string `toml:"key_dest"`      //key 文件输出目录
	KeyFile     string `toml:"key_file"`      //key文件名
	KeyInfoFile string `toml:"key_info_file"` //keyFile文件名
}

Media ...

type Queue

type Queue struct {
	Type     string `toml:"type"`
	HostPort string `toml:"host_port"`
	Password string `toml:"password"`
	DB       int    `toml:"db"`
}

Queue ...

type REST

type REST struct {
	Enable bool   `toml:"enable"`
	Type   string `toml:"type"`
	Path   string `toml:"path"`
	Port   string `toml:"port"`
}

REST ...

Jump to

Keyboard shortcuts

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