config

package
v0.0.0-...-1e118f8 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 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 JwtSettings

type JwtSettings struct {
	StorageURLString  string
	KeysPrefix        string
	Algorithm         string
	DefaultExpiration int
	SecretHex         string

	StorageURL *url.URL
	Secret     []byte
}

JwtSettings .

type Settings

type Settings struct {
	Logger *config.LoggerSettings
	HTTP   *config.HTTPSettings
	Jwt    *JwtSettings
	Users  *UsersSettings
}

Settings gathering all application settings.

func GetSettings

func GetSettings(viper *viper.Viper) *Settings

GetSettings reads all from config file and env.

type UsersSettings

type UsersSettings struct {
	StorageURLString string
	PasswordsSaltHex string

	SQLUserByLogin string
	SQLUserByID    string
	SQLUserInsert  string
	SQLUserUpdate  string

	StorageURL    *url.URL
	PasswordsSalt []byte
}

UsersSettings .

Jump to

Keyboard shortcuts

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