config

package
v0.0.0-...-cc0f04f Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig() (*Config, *EnvConf)

Types

type Config

type Config struct {
	Server struct {
		Type string `yaml:"type" env-default:"port"`
		Port string `yaml:"port" env-default:"8080"`
	} `yaml:"server"`

	PostgresDb `yaml:"postgresConfigDb"`
}

type EnvConf

type EnvConf struct {
	Password        string `env:"PASSWORD" env:"PASSWORD" env-default:"postgres"`
	SigningKeyAdmin string `env:"SIGNINGKEYADMIN"`
	SigningKeyUser  string `env:"SIGNINGKEYUSER"`
}

type PostgresDb

type PostgresDb struct {
	Username string `yaml:"username"`
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	Dbname   string `yaml:"dbname"`
	SSLMode  string `yaml:"sslmode"`
	// Password                 string `yaml:"password" env:"PASSWORD" env-default:"postgres"`
	MaxAttemptsForConnection string `yaml:"max-attempts-for-connection" env-default:"10"`
	MakeStartTables          string `yaml:"make-start-tables" env-default:"false"`
	MakeStartAdmin           string `yaml:"make-start-admin" env-default:"false"`
}

Jump to

Keyboard shortcuts

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