config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(section, key string) *ini.Key

func GetUrlByCorpid

func GetUrlByCorpid(corpid string, productid string, key string) string

func NewVipConfig

func NewVipConfig(filename string)

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(filename string) *Config

type VipConfig

type VipConfig struct {
	*viper.Viper
}

func VipCfg

func VipCfg() *VipConfig

func (*VipConfig) GetBoolWithDefault

func (vcfg *VipConfig) GetBoolWithDefault(key string, defaul bool) bool

func (*VipConfig) GetDurationWithDefault

func (vcfg *VipConfig) GetDurationWithDefault(key string, defaul time.Duration) time.Duration

func (*VipConfig) GetIntWithDefault

func (vcfg *VipConfig) GetIntWithDefault(key string, defaul int) int

func (*VipConfig) GetStringSliceWithDefault

func (vcfg *VipConfig) GetStringSliceWithDefault(key string, defaul []string) []string

func (*VipConfig) GetStringWithDefault

func (vcfg *VipConfig) GetStringWithDefault(key, defaul string) string

Jump to

Keyboard shortcuts

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