config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Argon2Params

type Argon2Params struct {
	KeyLen  uint32 `json:"keyLen"`
	Memory  uint32 `json:"memory"`
	Threads uint8  `json:"threads"`
	Time    uint32 `json:"time"`
	Version int    `json:"version"`
}

type Auth

type Auth struct {
	Local LocalAuth `json:"local"`
}

type Config

type Config struct {
	Addr string `json:"address"`

	BaseURL string `json:"baseURL"`

	Database Database `json:"database"`
	FileDir  string   `json:"fileDir"`

	TagAlgorithm string `json:"tagAlgorithm"`

	DefaultCurrency  string `json:"defaultCurrency"`
	DecimalSeparator string `json:"decimalSeparator"`

	Auth Auth `json:"auth"`

	LogLevel  string `json:"logLevel"`
	LogFormat string `json:"logFormat"`
}

func NewConfigFromEnv

func NewConfigFromEnv() (*Config, error)

type Database

type Database struct {
	Path string `json:"path"`
}

type LocalAuth

type LocalAuth struct {
	InitialAdminPassword string       `json:"initialAdminPassword"`
	Argon2Params         Argon2Params `json:"argon2"`
}

Jump to

Keyboard shortcuts

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