config

package
v0.0.0-...-6e5bb36 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 3 Imported by: 0

README

/config

Configuration default configs.

Put your env template files in folder params.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config ...

func (*Config) GetBool

func (cfg *Config) GetBool(k string) bool

GetBool ...

func (*Config) GetDuration

func (cfg *Config) GetDuration(k string) time.Duration

GetDuration ...

func (*Config) GetFloat64

func (cfg *Config) GetFloat64(k string) float64

GetFloat64 ...

func (*Config) GetInt

func (cfg *Config) GetInt(k string) int

GetInt ...

func (*Config) GetString

func (cfg *Config) GetString(k string) string

GetString ...

type IConfig

type IConfig interface {
	GetString(string) string
	GetInt(string) int
	GetBool(string) bool
	GetDuration(string) time.Duration
	GetFloat64(string) float64
}

IConfig ...

func New

func New(opts ...Option) IConfig

New ...

type Option

type Option func(*Config)

Option ...

func WithEnvSetup

func WithEnvSetup() Option

WithEnvSetup ...

Jump to

Keyboard shortcuts

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