config

package
v0.0.0-...-8064f01 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cfg = New()
View Source
var (
	RootPath = filepath.Join(filepath.Dir(b), "../")
)

Functions

func GetProductionStatus

func GetProductionStatus() bool

func NewViper

func NewViper(t string) *viper.Viper

Types

type Config

type Config interface {
	GetString(name string) string
	GetInt(name string) int
	GetBool(name string) bool
	GetStringSlice(name string) []string
	Set(key string, value interface{})
}

func New

func New() Config

type Instance

type Instance struct {
	Package *viper.Viper
}

func (*Instance) GetBool

func (i *Instance) GetBool(name string) bool

func (*Instance) GetInt

func (i *Instance) GetInt(name string) int

func (*Instance) GetString

func (i *Instance) GetString(name string) string

func (*Instance) GetStringSlice

func (i *Instance) GetStringSlice(name string) []string

func (*Instance) Set

func (i *Instance) Set(key string, value interface{})

Jump to

Keyboard shortcuts

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