config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 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 App added in v0.7.0

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

type Bot

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

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 Etcd added in v0.7.0

type Etcd struct {
	Endpoints []string `yaml:"endpoints"`
	Ca        string   `yaml:"ca"`
	Cert      string   `yaml:"cert"`
	Key       string   `yaml:"key"`
}

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 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"`
	App    App    `yaml:"app"`
	DB     DB     `yaml:"db"`
	RDB    RDB    `yaml:"rdb"`
	Rabbit Rabbit `yaml:"rabbit"`
	Secret Secret `yaml:"secret"`
	Etcd   Etcd   `yaml:"etcd"`
}

func ReadConfigs

func ReadConfigs(path string) Root

type Secret added in v0.3.0

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

Jump to

Keyboard shortcuts

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