config

package
v0.0.0-...-16e7fcc Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 2 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 {
	DBSource             string        `mapstructure:"DB_URL"`
	MigrationURL         string        `mapstructure:"MIGRATION_URL"`
	ServerAddress        string        `mapstructure:"SERVER_ADDRESS"`
	TokenSymmetricKey    string        `mapstructure:"TOKEN_SYMMETRIC_KEY"`
	AccessTokenDuration  time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"`
	RefreshTokenDuration time.Duration `mapstructure:"REFRESH_TOKEN_DURATION"`

	// SuperUser data
	SuperUserUsername string `mapstructure:"SUPERUSER_USERNAME"`
	SuperUserEmail    string `mapstructure:"SUPERUSER_EMAIL"`
	SuperUserPassword string `mapstructure:"SUPERUSER_PASSWORD"`
}

Configuration loaded from a .env file

func LoadConfig

func LoadConfig(path string) (config Config, err error)

Jump to

Keyboard shortcuts

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