configT

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 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 {
	Viper *viper.Viper
}

func NewConfig

func NewConfig(filepath string, ty ...string) *Config

func NewYamlConfig

func NewYamlConfig(configPath string) *Config

func (*Config) ReadAny

func (config *Config) ReadAny(name string, defaultValue ...any) any

func (*Config) ReadBool added in v0.2.1

func (config *Config) ReadBool(name string, defaultValue ...int) bool

func (*Config) ReadInt

func (config *Config) ReadInt(name string, defaultValue ...int) int

func (*Config) ReadInt32 added in v0.2.1

func (config *Config) ReadInt32(name string, defaultValue ...int) int32

func (*Config) ReadInt64 added in v0.2.1

func (config *Config) ReadInt64(name string, defaultValue ...int) int64

func (*Config) ReadIntSlice added in v0.2.1

func (config *Config) ReadIntSlice(name string, defaultValue ...int) []int

func (*Config) ReadString

func (config *Config) ReadString(name string, defaultValue ...string) string

func (*Config) ReadStringSlice

func (config *Config) ReadStringSlice(name string, defaultValue ...[]string) []string

Jump to

Keyboard shortcuts

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