common

package
v0.0.0-...-24eec3b Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigLogger

func ConfigLogger(isDebug bool)

Types

type MapParser

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

func NewMapParser

func NewMapParser() *MapParser

func (*MapParser) Get

func (m *MapParser) Get(key string) (string, bool)

func (*MapParser) GetMap

func (m *MapParser) GetMap() map[string]string

func (*MapParser) Load

func (m *MapParser) Load(filePath string)

type Properties

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

func NewProperties

func NewProperties() *Properties

func (*Properties) Get

func (p *Properties) Get(k string) (string, bool)

func (*Properties) GetBoolWithDefault

func (p *Properties) GetBoolWithDefault(k, def string) bool

func (*Properties) GetFloat64WithDefault

func (p *Properties) GetFloat64WithDefault(k, def string) float64

func (*Properties) GetInt

func (p *Properties) GetInt(k string) int

func (*Properties) GetInt64

func (p *Properties) GetInt64(k string) int64

func (*Properties) GetInt64WithDefault

func (p *Properties) GetInt64WithDefault(k, def string) int64

func (*Properties) GetIntWithDefault

func (p *Properties) GetIntWithDefault(k, def string) int

func (*Properties) GetPropMap

func (p *Properties) GetPropMap() map[string]string

func (*Properties) GetStr

func (p *Properties) GetStr(k string) string

Specific type functions

func (*Properties) GetStrList

func (p *Properties) GetStrList(k, regex string) []string

func (*Properties) GetTimeDuration

func (p *Properties) GetTimeDuration(k string) time.Duration

func (*Properties) GetTimeDurationWithDefault

func (p *Properties) GetTimeDurationWithDefault(k, def string) time.Duration

func (*Properties) GetWithDefault

func (p *Properties) GetWithDefault(k, d string) string

func (*Properties) Load

func (p *Properties) Load(filePath string)

Jump to

Keyboard shortcuts

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