config

package
v0.0.0-...-cee649a Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginConfig

type LoginConfig struct {
	TheTokenConfig    TokenConfig    `yaml:"token"`
	ThePasswordConfig PasswordConfig `yaml:"password"`
	TheSmsConfig      SmsConfig      `yaml:"sms"`
}

load database configuration from file. Including PostgreSQL and Redis.

func LoadLoginConfig

func LoadLoginConfig(filepath string) (cfg LoginConfig, err error)

type PasswordConfig

type PasswordConfig struct {
	ExpireStr string        `yaml:"expire"`
	Expire    time.Duration `yaml:"-"`
	PwType    int           `yaml:"pwType"`
	PwLen     int           `yaml:"pwLen"`
}

type SmsConfig

type SmsConfig struct {
	LockTimeStr string        `yaml:"locktime"`
	LockTime    time.Duration `yaml:"-"`
}

type TokenConfig

type TokenConfig struct {
	ExpireStr string        `yaml:"expire"`
	Expire    time.Duration `yaml:"-"`
}

Jump to

Keyboard shortcuts

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