config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
	Key  string `yaml:"key"`
}

type Bot

type Bot struct {
	Token  string `yaml:"token"`
	ChatID int64  `yaml:"chat_id"`
}

type DB added in v0.3.0

type DB struct {
	User   string `yaml:"user"`
	Pass   string `yaml:"pass"`
	Host   string `yaml:"host"`
	Port   int    `yaml:"port"`
	Dbname string `yaml:"dbname"`
}

type Logger

type Logger struct {
	Path string `yaml:"path"`
	Mode string `yaml:"mode"`
}

type RDB added in v0.3.0

type RDB struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
	Pass string `yaml:"pass"`
	DB   int    `yaml:"db"`
}

type RPC added in v0.3.0

type RPC struct {
	EtcdAddr    string `yaml:"etcd_addr"`
	CrontabPort int    `yaml:"crontab_port"`
	SecretPort  int    `yaml:"secret_port"`
	UserPort    int    `yaml:"user_port"`
	NoticePort  int    `yaml:"notice_port"`
}

type Rabbit added in v0.3.0

type Rabbit struct {
	Host string `yaml:"host"`
	Port int    `yaml:"port"`
	User string `yaml:"user"`
	Pass string `yaml:"pass"`
}

type Root

type Root struct {
	Bot       Bot       `yaml:"bot"`
	Logger    Logger    `yaml:"logger"`
	User      []User    `yaml:"user"`
	APIServer APIServer `yaml:"api_server"`
	Storage   Storage   `yaml:"storage"`
	DB        DB        `yaml:"db"`
	RDB       RDB       `yaml:"rdb"`
	RPC       RPC       `yaml:"rpc"`
	Rabbit    Rabbit    `yaml:"rabbit"`
	Secret    Secret    `yaml:"secret"`
}

func ReadConfigs

func ReadConfigs(path string) Root

type Secret added in v0.3.0

type Secret struct {
	Key string `yaml:"key"`
}

type Storage

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

type User

type User struct {
}

User 保留用

Jump to

Keyboard shortcuts

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