setting

package
v0.0.0-...-1e17dab Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ROLE_MASTER = "master"
	ROLE_WORKER = "worker"
	DEV         = "dev"
	PROD        = "prod"
)

Variables

View Source
var (
	Env       = DEV
	ROLE      = ROLE_MASTER
	LogxLevel = logx.InfoLevel
	HomePath  string

	HttpPort        string
	ApplicationName string
	APIVersion      string
)

Functions

func SetHomePath

func SetHomePath(args *CommandLineArgs) error

Types

type Cfg

type Cfg struct {
	Raw *ini.File

	DataPath string
	LogsPath string
	// contains filtered or unexported fields
}

func ProvideSettingCfg

func ProvideSettingCfg(args *CommandLineArgs) (*Cfg, error)

func (*Cfg) Load

func (cfg *Cfg) Load(args *CommandLineArgs) error

func (*Cfg) LoadConfiguration

func (cfg *Cfg) LoadConfiguration(args *CommandLineArgs) (*ini.File, error)

type CommandLineArgs

type CommandLineArgs struct {
	Args []string
}

type Scheme

type Scheme string

Jump to

Keyboard shortcuts

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