configs

package
v0.0.0-...-57f6101 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(path string)

Types

type Alive

type Alive struct {
	Tick    int
	Limit   int
	StartAt int `toml:"start_at"`
	EndAt   int `toml:"end_at"`
}

type Config

type Config struct {
	Database        *Database
	Lark            *LarkBotPath
	Juzihudong      *Juzihudong
	Keyword         *Keyword
	Alive           *Alive
	LarkBot         *LarkBot         `toml:"lark_bot"`
	WhiteList       *WhiteList       `toml:"whitelist"`
	LarkPictureRoom *LarkPictureRoom `toml:"lark_picture_room"`
	LarkTextRoom    *LarkTextRoom    `toml:"lark_text_room"`
}
var DefaultConfig Config

type Database

type Database struct {
	Name     string
	User     string
	Password string
	Host     string
}

type Juzihudong

type Juzihudong struct {
	Endpoint string
	Token    string
}

type Keyword

type Keyword struct {
	Tick int
}

type LarkBot

type LarkBot struct {
	AppID     string `toml:"app_id"`
	AppSecret string `toml:"app_secret"`
	EndPoint  string `toml:"endpoint"`
	Token     string `toml:"token"`
}

type LarkBotPath

type LarkBotPath struct {
	Path string
}

type LarkPictureRoom

type LarkPictureRoom struct {
	ChatID string `toml:"chat_id"`
}

type LarkTextRoom

type LarkTextRoom struct {
	ChatID string `toml:"chat_id"`
}

type WhiteList

type WhiteList struct {
	RoomID string `toml:"room_id"`
}

Jump to

Keyboard shortcuts

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