env

package
v0.0.0-...-678c32f Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetModuleConfig

func GetModuleConfig(name string) *config.Config

GetModuleConfig return specify module's config

func GetPluginConfig

func GetPluginConfig(name string) *config.Config

GetPluginConfig return specify plugin's config

func GetStartTime

func GetStartTime() time.Time

func ParseConfig

func ParseConfig(configKey string, configInstance interface{}) (exist bool, err error)

Types

type Env

type Env struct {

	// static configs
	SystemConfig *config.SystemConfig

	IsDebug      bool
	IsDaemonMode bool

	LoggingLevel string
	// contains filtered or unexported fields
}

Env is environment object of app

func EmptyEnv

func EmptyEnv() *Env

func NewEnv

func NewEnv(name, desc, ver, commit, buildDate, terminalHeader, terminalFooter string) *Env

EmptyEnv return a empty env instance

func (*Env) GetAppCapitalName

func (env *Env) GetAppCapitalName() string

func (*Env) GetAppDesc

func (env *Env) GetAppDesc() string

func (*Env) GetAppLowercaseName

func (env *Env) GetAppLowercaseName() string

func (*Env) GetAppName

func (env *Env) GetAppName() string

func (*Env) GetBuildDate

func (env *Env) GetBuildDate() string

GetBuildDate returns the build datetime of current package

func (*Env) GetGoodbyeMessage

func (env *Env) GetGoodbyeMessage() string

func (*Env) GetLastCommitHash

func (env *Env) GetLastCommitHash() string

func (*Env) GetLastCommitLog

func (env *Env) GetLastCommitLog() string

GetLastCommitLog returns last commit information of source code

func (*Env) GetVersion

func (env *Env) GetVersion() string

GetVersion returns the version of this build

func (*Env) GetWelcomeMessage

func (env *Env) GetWelcomeMessage() string

func (*Env) GetWorkingDir

func (env *Env) GetWorkingDir() string

GetWorkingDir returns root working dir of app instance

func (*Env) Init

func (env *Env) Init() *Env

Environment create a new env instance from a config

func (*Env) SetConfigFile

func (env *Env) SetConfigFile(configFile string) *Env

Jump to

Keyboard shortcuts

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