conf

package
v0.0.0-...-3831edb Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name string
	Ext  string
	Path string
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(path, name, ext string) *Config

func (*Config) AllSettings

func (c *Config) AllSettings() map[string]interface{}

func (*Config) Get

func (c *Config) Get(key string) interface{}

func (*Config) GetBool

func (c *Config) GetBool(key string) bool

func (*Config) GetDuration

func (c *Config) GetDuration(key string) time.Duration

func (*Config) GetFloat64

func (c *Config) GetFloat64(key string) float64

func (*Config) GetInt

func (c *Config) GetInt(key string) int

func (*Config) GetIntSlice

func (c *Config) GetIntSlice(key string) []int

func (*Config) GetString

func (c *Config) GetString(key string) string

func (*Config) GetStringMap

func (c *Config) GetStringMap(key string) map[string]interface{}

func (*Config) GetStringMapString

func (c *Config) GetStringMapString(key string) map[string]string

func (*Config) GetStringSlice

func (c *Config) GetStringSlice(key string) []string

func (*Config) GetTime

func (c *Config) GetTime(key string) time.Time

func (*Config) IsSet

func (c *Config) IsSet(key string) bool

func (*Config) OnConfigChange

func (c *Config) OnConfigChange(f func(in fsnotify.Event))

func (*Config) ReadConfig

func (c *Config) ReadConfig() error

func (*Config) SetDefault

func (c *Config) SetDefault(key string, value interface{})

func (*Config) Unmarshal

func (c *Config) Unmarshal(data interface{}) error

func (*Config) WatchConfig

func (c *Config) WatchConfig()

Jump to

Keyboard shortcuts

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