conf

package
v0.0.0-...-f176acd Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

type Bot struct {
	Name                    string `toml:"name"`
	Email                   string `toml:"email"`
	Password                string `toml:"password"`
	KahlaServer             string `toml:"kahlaserver"`
	CallbackServer          string `toml:"callbackserver"`
	MessageCallbackEndpoint string `toml:"messagecallbackendpoint"`
}

type Config

type Config struct {
	Host          string `toml:"HOST"`
	Port          int    `toml:"PORT"`
	Env           string `toml:"ENV"`
	BotConfig     Bot    `toml:"bot"`
	CorsOriginURL string `toml:"CORS_ORIGIN_URL"`
	MySqlDSN      string `toml:"MYSQL_DSN"`
	TokenLength   int    `toml:"TOKEN_LENGTH"`
}

定义配置结构体

func LoadConfigFromFile

func LoadConfigFromFile(filePath string) (*Config, error)

加载配置文件

func (*Config) ConfigEnvironment

func (config *Config) ConfigEnvironment() error

配置馬卡龙环境变量

Jump to

Keyboard shortcuts

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