config

package
v0.0.1-alpha1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var App = &SConfig{
	DBUrl: "sqlite:///tmp/sqlite.db3",
	MQUrl: "inmemory://localhost",
}

Functions

func Init

func Init() error

Types

type SConfig

type SConfig struct {
	Address       string        `mapstructure:"ADDR"`
	PoolSize      int           `mapstructure:"POOL_SIZE"`
	ExecTimeOut   time.Duration `mapstructure:"EXEC_TIMEOUT"`
	RelativePath  string        `mapstructure:"RELATIVE_PATH"`
	RootDir       string        `mapstructure:"ROOT_DIR"`
	DBUrl         string        `mapstructure:"DB_URL"`
	MQUrl         string        `mapstructure:"MQ_URL"`
	SelfUpdateURL string        `mapstructure:"SELF_URL"`
	LogOutput     string        `mapstructure:"LOG_OUTPUT"`
	LogLevel      string        `mapstructure:"LOG_LEVEL"`
	DataCenterID  int64         `mapstructure:"DATA_CENTER_ID"`
	NodeName      string        `mapstructure:"NODE_NAME"`
	NodeID        int64         `mapstructure:"NODE_ID"`
}

func (*SConfig) LogDir

func (c *SConfig) LogDir() string

func (*SConfig) ScriptDir

func (c *SConfig) ScriptDir() string

func (*SConfig) WorkSpace

func (c *SConfig) WorkSpace() string

Jump to

Keyboard shortcuts

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