config

package
v0.0.0-...-3779236 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 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
	MongoAddr          string `mapstructure:"mongo-addr"`
	AccessSecret       string `mapstructure:"access-secret"`
	RefreshSecret      string `mapstructure:"refresh-secret"`
	CookieStoreSecret  string `mapstructure:"cookie-store-secret"`
	AccessTTL          int    `mapstructure:"access-ttl"`
	RefreshTTL         int    `mapstructure:"refresh-ttl"`
	RefreshTokenRotate bool   `mapstructure:"refresh-token-rotate"`
	StaticType         string `mapstructure:"static-type"`
	StaticWebDir       string `mapstructure:"static-web-dir"`
}

Mapstructure maps the fields to the program parameter names.

func New

func New() *Config

func (*Config) BindConfig

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

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