conf

package
v0.0.0-...-ae0b84e Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Config global configuration holder
	Config          Conf
	CtxTwitterConf  = ContextKey("twitter")
	CtxGoogleAPIKey = ContextKey("googleAPIKey")
)

Functions

This section is empty.

Types

type Account

type Account struct {
	Twitter       Twitter  `yaml:"twitter"`
	Telegram      Telegram `yaml:"telegram"`
	GoogleMapsKey string   `yaml:"googlemaps"`
}

Account ...

type Conf

type Conf struct {
	Core    SectionCore `yaml:"core"`
	Log     SectionLog  `yaml:"log"`
	Account Account     `yaml:"account"`
}

Conf is config structure.

type ContextKey

type ContextKey string

func (ContextKey) String

func (c ContextKey) String() string

type SectionCore

type SectionCore struct {
	Addr            string     `yaml:"addr"`
	CommandPrefix   string     `yaml:"command_prefix"`
	Port            string     `yaml:"port"`
	MaxNotification int64      `yaml:"max_notification"`
	WorkerNum       int64      `yaml:"worker_num"`
	QueueNum        int64      `yaml:"queue_num"`
	Mode            string     `yaml:"mode"`
	SSL             bool       `yaml:"ssl"`
	CertPath        string     `yaml:"cert_path"`
	KeyPath         string     `yaml:"key_path"`
	HTTPProxy       string     `yaml:"http_proxy"`
	PID             SectionPID `yaml:"pid"`
}

SectionCore is sub section of config.

type SectionLog

type SectionLog struct {
	Format      string `yaml:"format"`
	AccessLog   string `yaml:"access_log"`
	AccessLevel string `yaml:"access_level"`
	ErrorLog    string `yaml:"error_log"`
	ErrorLevel  string `yaml:"error_level"`
	HideToken   bool   `yaml:"hide_token"`
}

SectionLog is sub section of config.

type SectionPID

type SectionPID struct {
	Enabled  bool   `yaml:"enabled"`
	Path     string `yaml:"path"`
	Override bool   `yaml:"override"`
}

SectionPID is sub section of config.

type Telegram

type Telegram struct {
	Token   string `yaml:"token"`
	Webhook string `yaml:"webhook"`
	BaseURL string `yaml:"baseurl"`
}

Telegram ...

type Twitter

type Twitter struct {
	ConsumerKey    string `yaml:"consumer_key"`
	ConsumerSecret string `yaml:"consumer_secret"`
	AccessToken    string `yaml:"access_token"`
	AccessSecret   string `yaml:"token_secret"`
}

Twitter ...

Jump to

Keyboard shortcuts

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