config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

github.com/whatap/golib/config

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	ApplyDefault()
	GetValue(key string) string
	GetValueDef(key, def string) string
	GetBoolean(key string, def bool) bool
	GetInt(key string, def int) int32
	GetIntSet(key, defaultValue, deli string) []int32
	GetLong(key string, def int64) int64
	GetStringArray(key string, deli string) []string
	GetStringHashSet(key, defaultValue, deli string) []int32
	GetStringHashCodeSet(key, defaultValue, deli string) []int32
	GetFloat(key string, def float32) float32
	ToString() string
	String() string
}

type ConfigInterface

type ConfigInterface interface {
	ApplyConfig(*Config)
}

type ConfigObserver

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

func GetConfigObserver

func GetConfigObserver() *ConfigObserver

func NewConfigObserver

func NewConfigObserver() *ConfigObserver

func (*ConfigObserver) Add

func (this *ConfigObserver) Add(cls string, conf Configure)

func (*ConfigObserver) Run

func (this *ConfigObserver) Run(conf Config)

type Configure

type Configure interface {
	ApplyConfig(conf Config)
}

Jump to

Keyboard shortcuts

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