env

package
v0.0.0-...-1969f72 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvPath

func GetEnvPath() string

Types

type AppCredentials

type AppCredentials struct {
	Debug      bool   `yaml:"debug"`
	SigningKey string `yaml:"signing_key"`
	Port       uint16 `yaml:"port"`
}

Create Fiber Server struct

type Env

type Env struct {
	App        AppCredentials      `yaml:"app"`
	PostgresDb PostgresCredentials `yaml:"postgresql"`
	SmtpBroker SmtpCredentials     `yaml:"smtp_broker"`
}

Create Configuration struct

func Load

func Load(filename string) (*Env, error)

Load env configuration assets

func New

func New() (*Env, error)

The New function creates a new instance of the Env struct by loading the environment path.

type PostgresCredentials

type PostgresCredentials struct {
	Host     string `yaml:"host"`
	Port     uint16 `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	SslMode  string `yaml:"sslmode"`
	TimeZone string `yaml:"timezone"`
}

Create Database Credentials struct

type SmtpCredentials

type SmtpCredentials struct {
	Host     string `yaml:"host"`
	Port     uint16 `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Security string `yaml:"security"`
}

Create Smtp Broker Credentials struct

Jump to

Keyboard shortcuts

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