config

package
v0.0.0-...-d7024bd Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BindConfigOpts

type BindConfigOpts struct {
	FlagSet *pflag.FlagSet
	Args    []string
}

type Config

type Config struct {
	Port          int
	Debug         bool
	RedisAddr     string `mapstructure:"redis-addr"`
	AccessSecret  string `mapstructure:"access-secret"`
	RefreshSecret string `mapstructure:"refresh-secret"`
}

func New

func New() *Config

func (*Config) BindConfig

func (c *Config) BindConfig(v *viper.Viper, set ...BindConfigOpts)

Config load order: is: default values > config file > environment variables > CLI arguments For details on load precedence see https://github.com/spf13/viper#why-viper

func (*Config) LoadConfig

func (c *Config) LoadConfig(v *viper.Viper)

Jump to

Keyboard shortcuts

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