confx

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Code generated by confx-gen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(key string) interface{}

func GetBool

func GetBool(key string) bool

func GetDuration

func GetDuration(key string) time.Duration

func GetFloat64

func GetFloat64(key string) float64

func GetInt

func GetInt(key string) int

func GetInt32

func GetInt32(key string) int32

func GetInt64

func GetInt64(key string) int64

func GetIntSlice

func GetIntSlice(key string) []int

func GetString

func GetString(key string) string

func GetStringMap

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

func GetStringMapString

func GetStringMapString(key string) map[string]string

func GetStringMapStringSlice

func GetStringMapStringSlice(key string) map[string][]string

func GetStringSlice

func GetStringSlice(key string) []string

func GetTime

func GetTime(key string) time.Time

func GetUint

func GetUint(key string) uint

func GetUint32

func GetUint32(key string) uint32

func GetUint64

func GetUint64(key string) uint64

func Init

func Init(opts ...Opt)

func SaveConfig added in v0.1.9

func SaveConfig() error

func SaveConfigAs added in v0.1.10

func SaveConfigAs(file string) error

func SetDefault

func SetDefault(key string, value interface{})

Types

type Config

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

type Opt

type Opt func(*Config)

func SetAutoCreate added in v0.1.12

func SetAutoCreate(autoCreate bool) Opt

func SetDefaultValue added in v0.1.9

func SetDefaultValue(run func(*viper.Viper)) Opt

func SetFileExt

func SetFileExt(e string) Opt

func SetFileName

func SetFileName(n string) Opt

func SetPath

func SetPath(p []string) Opt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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