rcconfig

package
v0.0.0-...-0e94699 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtBot

type ArtBot struct {
	Channel         string                  `yaml:"Channel" json:",optional"`
	StableDiffusion config2.StableDiffusion `yaml:"StableDiffusion" json:",optional"`
	Queue           Queue                   `yaml:"Queue" json:",optional"`
	Log             Log                     `yaml:"Log" json:",optional"`
}

type Auth

type Auth struct {
	Account  string `yaml:"Account"`
	Password string `yaml:"Password"`
}

type ChatBot

type ChatBot struct {
	Channel  string          `yaml:"Channel" json:",optional"`
	ChatGPT  config.ChatGPT  `yaml:"ChatGPT" json:",optional"`
	XFYun    config.XFYun    `yaml:"XFYun" json:",optional"`
	THUDMGLM config.THUDMGLM `yaml:"THUDM_GLM" json:",optional"`
	Queue    Queue           `yaml:"Queue" json:",optional"`
	Log      Log             `yaml:"Log" json:",optional"`
}

type ConfigInterface

type ConfigInterface interface {
	GetName() string
	Validate() error
}

type Database

type Database struct {
	Driver string `yaml:"Driver"`
	DSN    string `yaml:"DSN"`
}

type Log

type Log struct {
	Driver    string `yaml:"Driver" json:",optional"`
	Env       string `yaml:"Env" json:",optional"`
	InfoLog   string `yaml:"InfoLog" json:",optional"`
	ErrorLog  string `yaml:"ErrorLog" json:",optional"`
	HttpDebug bool   `yaml:"HttpDebug" json:",optional"`
}

type Queue

type Queue struct {
	Driver    string `yaml:"Driver" json:",optional"`
	NotifyUrl string `yaml:"NotifyUrl" json:",optional"`
	Redis     Redis  `yaml:"Redis" json:",optional"`
}

type RCConfig

type RCConfig struct {
	Database Database `yaml:"Database" json:",optional"`
	Auth     Auth     `yaml:"Auth" json:",optional"`
	ArtBot   ArtBot   `yaml:"ArtBot" json:",optional"`
	ChatBot  ChatBot  `yaml:"ChatBot" json:",optional"`
}

func LoadRCConfig

func LoadRCConfig() *RCConfig

func LoadRCConfigByPath

func LoadRCConfigByPath(configPath string) *RCConfig

type Redis

type Redis struct {
	Addr       string `yaml:"Addr" json:",optional"`
	ClientName string `yaml:"ClientName" json:",optional"`
	Username   string `yaml:"Username" json:",optional"`
	Password   string `yaml:"Password" json:",optional"`
	DB         int    `yaml:"DB" json:",optional"`
	MaxRetries int    `yaml:"MaxRetries" json:",optional"`
}

Jump to

Keyboard shortcuts

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