config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectName     = "dsh_go"
	ProjectVersion  = "v0.0.1"
	ProjectBundleID = "com.dsh_go.dsh_go"
)

Variables

View Source
var (
	GlobalConfig *FileConfig
	HardSN       string
)

Functions

func LoadConfig

func LoadConfig(file string) error

func SaveConfig

func SaveConfig(file string, content *FileConfig) error

func SyncConfigFile

func SyncConfigFile(firstRunEnd func(error))

Types

type ExtendApp

type ExtendApp struct {
	*gtbox_app.App
	APIPort  int
	MCPPort  int
	GRPCPort int
}
var (
	CurrentApp *ExtendApp
)

func NewApp

func NewApp(appName, bundleID, description string, runMode gtbox.RunMode) *ExtendApp

type FileConfig

type FileConfig struct {
	MysqlCfg  *db_config.MysqlConfig      `yaml:"mysql_cfg" json:"mysql_cfg" toml:"mysql_cfg" comment:"Mysql configurations"`
	ApiCfg    *api_config.ApiConfig       `toml:"api_cfg" yaml:"api_cfg" json:"api_cfg" comment:"API configurations"`
	AuthCfg   *api_auth_config.AuthConfig `yaml:"auth_cfg" json:"auth_cfg" toml:"auth_cfg" comment:"Auth configurations"`
	PolicyCfg *policy_config.PolicyConfig `yaml:"policy_cfg" json:"policy_cfg" toml:"policy_cfg" comment:"Policy scheduling configurations"`
}

Jump to

Keyboard shortcuts

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