Documentation ¶
Index ¶
- func OnConfigChange(callback OnConfigChangeFunc)
- func PathUsed() string
- func SetConfig(c *Config)
- func Setup(configPath string) error
- func SetupWithName(configPath string, configName string) error
- type Config
- type FormConfig
- type ListenConfig
- type OnConfigChangeFunc
- type TargetConfig
- type TurnstileConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnConfigChange ¶ added in v1.1.0
func OnConfigChange(callback OnConfigChangeFunc)
OnConfigChange can be used to attach a callback function which is called whenever the config changes
func SetupWithName ¶ added in v1.1.0
SetupWithName reads the config file and parses it and allows to set the name
Types ¶
type Config ¶
type Config struct { Listen ListenConfig Forms []*FormConfig }
Config is the type which contains all above sub-configs
type FormConfig ¶
type FormConfig struct { Enabled bool ID string Turnstile TurnstileConfig Targets []*TargetConfig }
FormConfig is the config of a form
type ListenConfig ¶
ListenConfig is for the server
type OnConfigChangeFunc ¶ added in v1.1.0
OnConfigChangeFunc is the type of a function which can be used as a callback
type TargetConfig ¶
type TargetConfig struct { Enabled bool Template string ShoutrrrURL string Params map[string]interface{} }
TargetConfig is the config of a shoutrrr target
type TurnstileConfig ¶ added in v1.3.0
TurnstileConfig is the config for HCapthca
Click to show internal directories.
Click to hide internal directories.