configs

package
v0.0.0-...-5039b75 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 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 Configuration

type Configuration struct {
	ServerConfiguration
	DatabaseConfiguration
	Secrets
}

func Configure

func Configure() (*Configuration, error)

func (*Configuration) GetConfiguration

func (c *Configuration) GetConfiguration(v viper.Viper)

func (*Configuration) GetSecrets

func (c *Configuration) GetSecrets() error

type DatabaseConfiguration

type DatabaseConfiguration struct {
	DbMigrationLocation string `json:"MIGRATION_LOCATION"`
	DbSchema            string `json:"DB_SCHEMA"`
	DbHost              string `json:"DB_HOST"`
	DbPort              string `json:"DB_PORT"`
}

func GetDatabaseConfig

func GetDatabaseConfig(vipe viper.Viper) DatabaseConfiguration

type DatabaseSecrets

type DatabaseSecrets struct {
	DbUser string `json:"DB_USER"`
	DbPass string `json:"DB_PASS"`
}

type Secrets

type Secrets struct {
	DatabaseSecrets
}

type ServerConfiguration

type ServerConfiguration struct {
	SrvPort        string `json:"SERVER_PORT"`
	SrvSecretsFile string `json:"SECRETS_FILE"`
}

func GetServerConfig

func GetServerConfig(vipe viper.Viper) ServerConfiguration

Jump to

Keyboard shortcuts

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