config

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BotEnabled added in v0.32.1

func BotEnabled(id string) bool

func Load

func Load(path ...string)

Types

type Api added in v0.32.1

type Api struct {
	// server api url
	Url string `json:"url" yaml:"url" mapstructure:"url"`
	// api token
	Token string `json:"token" yaml:"token" mapstructure:"token"`
}

type Metrics added in v0.35.1

type Metrics struct {
	// Enabled
	Enabled bool `json:"enabled" yaml:"enabled" mapstructure:"enabled"`
	// Metrics endpoint
	Endpoint string `json:"endpoint" yaml:"endpoint" mapstructure:"endpoint"`
}

type ScriptEngine added in v0.32.1

type ScriptEngine struct {
	// Enabled
	Enabled bool `json:"enabled" yaml:"enabled" mapstructure:"enabled"`
	// script path
	ScriptPath string `json:"script_path" yaml:"script_path" mapstructure:"script_path"`
	// User ID
	UID string `json:"uid" yaml:"uid" mapstructure:"uid"`
	// Group ID
	GID string `json:"gid" yaml:"gid" mapstructure:"gid"`
	// skip watch dir
	SkipWatchDir []string `json:"skip_watch_dir" yaml:"skip_watch_dir" mapstructure:"skip_watch_dir"`
}

type Type added in v0.32.1

type Type struct {
	// logging level
	LogLevel string `json:"log_level" yaml:"log_level" mapstructure:"log_level"`
	// bot enabled
	BotsEnabled []string `json:"bots_enabled" yaml:"bots_enabled" mapstructure:"bots_enabled"`
	// API
	Api Api `json:"api" yaml:"api" mapstructure:"api"`
	// Updater
	Updater Updater `json:"updater" yaml:"updater" mapstructure:"updater"`
	// script engine
	ScriptEngine ScriptEngine `json:"script_engine" yaml:"script_engine" mapstructure:"script_engine"`
	// Metrics
	Metrics Metrics `json:"metrics" yaml:"metrics" mapstructure:"metrics"`
}
var App Type

func NewConfig added in v0.32.1

func NewConfig(lc fx.Lifecycle) Type

type Updater added in v0.32.1

type Updater struct {
	// github token used for upgrade check and download binary
	GithubToken string `json:"github_token" yaml:"github_token" mapstructure:"github_token"`
}

Jump to

Keyboard shortcuts

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