config

package
v0.0.0-...-bbbb4e2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 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 AuthConfig

type AuthConfig struct {
	AccessTokenLifetime  time.Duration `mapstructure:"access_token_lifetime"`
	RefreshTokenLifetime time.Duration `mapstructure:"refresh_token_lifetime"`
}

type Config

type Config struct {
	Server ServerConfig `mapstructure:"server"`
	Auth   AuthConfig   `mapstructure:"auth"`
	Env    EnvConfig
}

func Load

func Load(path, name string) (*Config, error)

type EnvConfig

type EnvConfig struct {
	SQLitePath    string `envconfig:"SQLITE_PATH"`
	JwtSigningKey string `envconfig:"JWT_SIGNING_KEY"`
}

type ServerConfig

type ServerConfig struct {
	Address string `mapstructure:"address"`
}

Jump to

Keyboard shortcuts

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