config

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEV_ENVIRONMENT  = "development"
	PROD_ENVIRONMENT = "production"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ServerHost             string `env:"SERVER_HOST"`
	ServerPort             string `env:"SERVER_PORT"`
	AppDomain              string `env:"APP_DOMAIN"`
	AppProtocol            string `env:"APP_PROTOCOL"`
	ProjectName            string `env:"PROJECT_NAME"`
	Environment            string `env:"ENVIRONMENT"`
	DefaultSenderSignature string `env:"DEFAULT_SENDER_SIGNATURE"`
}

func (App) GetFullDomain

func (a App) GetFullDomain() string

type Authentication

type Authentication struct {
	PasswordPepper       string `env:"PASSWORD_PEPPER"`
	SessionKey           string `env:"SESSION_KEY"`
	SessionEncryptionKey string `env:"SESSION_ENCRYPTION_KEY"`
	TokenSigningKey      string `env:"TOKEN_SIGNING_KEY"`
	CsrfToken            string `env:"CSRF_TOKEN"`
}

type Config

type Config struct {
	Database
	Authentication
	App
	Telemetry
	AwsAccessKeyID     string
	AwsSecretAccessKey string
}

func NewConfig

func NewConfig() Config

type Database

type Database struct {
	Port         string `env:"DB_PORT"`
	Host         string `env:"DB_HOST"`
	Name         string `env:"DB_NAME"`
	User         string `env:"DB_USER"`
	Password     string `env:"DB_PASSWORD"`
	DatabaseKind string `env:"DB_KIND"`
	SSL_MODE     string `env:"DB_SSL_MODE"`
}

func (Database) GetDatabaseURL

func (d Database) GetDatabaseURL() string

type Telemetry

type Telemetry struct {
	TenantID string `env:"TENANT_ID"`
	SinkURL  string `env:"SINK_URL"`
}

Jump to

Keyboard shortcuts

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