config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 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 string `yaml:"port"`
	User string `yaml:"user"`
	Pass string `yaml:"pass"`
}

type Bot

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

type Logger

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

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"`
}

func ReadConfigs

func ReadConfigs(path string) Root

type Storage

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

type User

type User struct {
	ID     string `yaml:"id" json:"id"`
	Domain int    `yaml:"domain" json:"domain"`
	Type   []int  `yaml:"type" json:"type"`
	Key    string `yaml:"key" json:"key"`
}

Jump to

Keyboard shortcuts

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