config

package
v0.0.0-...-e5441ae Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Postgres    PostgresConfig    `yaml:"postgres"`
	DefaultUser DefaultUserConfig `yaml:"defaultuser"`
	Login       LoginConfig       `yaml:"login"`
	Server      ServerConfig      `yaml:"server"`
}

func NewConfig

func NewConfig() *Config

type DefaultUserConfig

type DefaultUserConfig struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

DefaultUserConfig a default admin user which will be created during database initialization stage when the service startsup for the first time. We recommend changing the password asap

type LoginConfig

type LoginConfig struct {
	Expiry int    `yaml:"expiry"` // in minutes
	Secret string `yaml:"secret"`
}

type PostgresConfig

type PostgresConfig struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
}

type ServerConfig

type ServerConfig struct {
	Port int `yaml:"port"`
}

Jump to

Keyboard shortcuts

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