configs

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConfig

func CheckConfig(path string) error

func ConvertConfig

func ConvertConfig(inputPath, outputPath string) error

func DetectConfigType

func DetectConfigType(path string) string

func EditConfigFile

func EditConfigFile(path string) error

func GenDefaultConfigJson

func GenDefaultConfigJson(outputPath string) error

func GenDefaultConfigToml

func GenDefaultConfigToml(outputPath string) error

func PrettyPrintConfig

func PrettyPrintConfig(config *Config)

func SaveConfigToJson

func SaveConfigToJson(config *Config, path string) error

func SaveConfigToToml

func SaveConfigToToml(config *Config, path string) error

Types

type Config

type Config struct {
	CronExp        *string          `json:"cron_exp" toml:"cron_exp"`
	RetryInterval  *int             `json:"retry_interval" toml:"retry_interval"`
	RetryTimes     *int             `json:"retry_times" toml:"retry_times"`
	LogFile        *string          `json:"log_file" toml:"log_file"`
	LogLevel       *string          `json:"log_level" toml:"log_level"`
	LoginIP        []LoginIP        `json:"login_ip" toml:"login_ip"`
	LoginInterface []LoginInterface `json:"login_interface" toml:"login_interface"`
	LoginUPnP      []LoginUPnP      `json:"login_upnp" toml:"login_upnp"`
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

type LoginIP

type LoginIP struct {
	IP       *string `json:"ip" toml:"ip"`
	Username *string `json:"username" toml:"username"`
	Password *string `json:"password" toml:"password"`
	UseIP    *bool   `json:"use_ip" toml:"use_ip"`
}

type LoginInterface

type LoginInterface struct {
	Interface *string `json:"interface" toml:"interface"`
	Username  *string `json:"username" toml:"username"`
	Password  *string `json:"password" toml:"password"`
	UseIP     *bool   `json:"use_ip" toml:"use_ip"`
}

type LoginUPnP

type LoginUPnP struct {
	Interface *string  `json:"interface" toml:"interface"`
	Username  *string  `json:"username" toml:"username"`
	Password  *string  `json:"password" toml:"password"`
	UseIP     *bool    `json:"use_ip" toml:"use_ip"`
	Exclude   []string `json:"exclude" toml:"exclude"`
}

Jump to

Keyboard shortcuts

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