config

package
v1.5.1-0...-2a0d9a0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Dev            []Dev   `mapstructure:"dev"`
	History        History `mapstructure:"history"`
	Debug          bool    `mapstructure:"debug"`
	Port           int     `mapstructure:"port"`
	Address        string  `mapstructure:"address"`
	Tiny           bool    `mapstructure:"tiny"`
	FlushTokenTime int     `mapstructure:"flushTokenTime"`
	Workdirectory  string  `mapstructure:"-"`
	Databasepath   string  `mapstructure:"-"`
	ApiKey         string  `mapstructure:"api_key"`
	SafeMode       bool    `mapstructure:"safemode"`
	SkipCheck      bool    `mapstructure:"-"`
}
var (
	// Global configuration instance
	Cfg *AppConfig
)

func LoadConfig

func LoadConfig() (*AppConfig, error)

type Dev

type Dev struct {
	Password string `mapstructure:"password"`
	Key      string `mapstructure:"key"`
	IP       string `mapstructure:"ip"`
	IsLocal  bool   `mapstructure:"islocal"`
}

type History

type History struct {
	Enable     bool `mapstructure:"enable"`
	MaxDeleted int  `mapstructure:"maxsaved"`
	Sampletime int  `mapstructure:"sampletime"`
}

Jump to

Keyboard shortcuts

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