args

package
v0.26.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "TDP Wrest"
View Source
const AppSummary = "智能聊天助手"
View Source
const BuildVersion = "240106"
View Source
const Version = "0.10.0"

Variables

View Source
var Debug bool
View Source
var Efs *embed.FS
View Source
var Log = &ILog{
	Dir:    "logs",
	Level:  "info",
	Target: "stdout",
}
View Source
var Wcf = &IWcf{
	Address: "127.0.0.1:7601",
}
View Source
var Web = &IWeb{
	Address: "127.0.0.1:7600",
	Storage: "storage",
	Swagger: true,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	File string `yaml:"File"`
	Data any    `yaml:"Data"`
}
var Configer *Config

func (*Config) Load

func (c *Config) Load() error

func (*Config) Save

func (c *Config) Save() error

type ConfigData

type ConfigData struct {
	Log *ILog `yaml:"Log"` // 日志
	Wcf *IWcf `yaml:"Wcf"` // Wcf 服务
	Web *IWeb `yaml:"Web"` // Web 服务
}

type ILog

type ILog struct {
	Dir    string `yaml:"Dir"`    // 存储目录
	Level  string `yaml:"Level"`  // 记录级别 debug|info|warn|error
	Target string `yaml:"Target"` // 输出方式 both|file|null|stdout|stderr
}

type IWcf

type IWcf struct {
	Address      string `yaml:"Address"`      // Rpc 监听地址
	MsgPrint     bool   `yaml:"MsgPrint"`     // 是否打印收到的消息
	MsgStore     bool   `yaml:"MsgStore"`     // 是否存储收到的消息
	MsgStoreDays int    `yaml:"MsgStoreDays"` // 消息留存天数
	WcfBinary    string `yaml:"WcfBinary"`    // 留空则不注入微信
}

type IWeb

type IWeb struct {
	Address string `yaml:"Address"` // Web 监听地址
	PushUrl string `yaml:"PushUrl"` // 消息推送地址
	Storage string `yaml:"Storage"` // 附件存储路径
	Swagger bool   `yaml:"Swagger"` // 是否启用 Api 文档
	Token   string `yaml:"Token"`   // 使用 Token 验证请求
}

Jump to

Keyboard shortcuts

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