config

package
v0.5.22 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Zlib Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "1.0.0"
	AppName = "unknown"
	AppId   string
	SeqId   int64 = 0
	Source  string
)
View Source
var (
	WorkDir string
	Conf    string
	Env     = "prod"
)

Functions

func ConfFileName

func ConfFileName() string

func ConfigureFileNameInEnv

func ConfigureFileNameInEnv(name string) string

func IsRelease

func IsRelease() bool

Types

type Config

type Config struct {
	GinMode      string        `json:"mode" yaml:"mode" xml:"mode"`
	Server       string        `json:"server" yaml:"server" xml:"server"`
	PubIP        string        `json:"public_ip" yaml:"public_ip" xml:"public_ip"`
	EnabledUser  bool          `json:"enabled_user" yaml:"enabled_user" xml:"enabled_user"`
	EnabledRedis bool          `json:"enabled_redis" yaml:"enabled_redis" xml:"enabled_redis"`
	EnabledDb    bool          `json:"enabled_db" yaml:"enabled_db" xml:"enabled_db"`
	EnabledMQ    bool          `json:"enabled_mq" yaml:"enabled_mq" xml:"enabled_mq"`
	LogConfig    logger.Config `json:"log" yaml:"log" xml:"log"`
}

func (*Config) Init

func (cfg *Config) Init()

Jump to

Keyboard shortcuts

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