config

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Types

type Bot added in v0.1.0

type Bot struct {
	AdminID      int64 `koanf:"admin_id"`
	BanThreshold uint8 `koanf:"ban_threshold"`
}

type Censor

type Censor struct {
	Strategy    censor.ExecutionStrategy `koanf:"strategy"`
	Plugins     map[string]plugin        `koanf:"plugins"`
	Timeout     time.Duration            `koanf:"timeout"`
	EnabledOnly bool                     `koanf:"enabled_only"`

	ErrorAction plug.Action `koanf:"error_action"`
	SkipAction  plug.Action `koanf:"skip_action"`

	// Deprecated
	Blacklist []string `koanf:"blacklist"`
}

type Config

type Config struct {
	Bot      Bot      `koanf:"bot"`
	Telegram telegram `koanf:"telegram"`
	Censor   Censor   `koanf:"censor"`
	Storage  Storage  `koanf:"storage"`
	HTTP     http     `koanf:"http"`
}

func Default added in v0.3.2

func Default() Config

func New added in v0.4.0

func New() (Config, error)

type Storage added in v0.1.0

type Storage struct {
	URL string `koanf:"url"`
}

Jump to

Keyboard shortcuts

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