environment

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrValidation    = errors.New("validation error")
	ErrConfigManager = errors.New("config manager error")
)
View Source
var (
	ErrNotFoundKey = errors.New("key not found")
)

Functions

func Get

func Get[T any](key string) T

func NewEnvLoader

func NewEnvLoader(params *EnvLoaderParams) error

Types

type EnvLoader

type EnvLoader interface {
	Load() error
}

type EnvLoaderParams

type EnvLoaderParams struct {
	File string
	Path string
	Type string
}

type EnvSchema

type EnvSchema struct {
	APP_ENV         string `validate:"required"`
	APP_PORT        string `validate:"required"`
	MONGO_DB        string `validate:"required"`
	MONGO_URL       string `validate:"required"`
	MONGO_HOST      string `validate:"required"`
	MONGO_PORT      string `validate:"required"`
	MONGO_USER      string `validate:"required"`
	MONGO_PASS      string `validate:"required"`
	MAIL_NAME       string `validate:"required"`
	MAIL_SENDER     string `validate:"required"`
	RESEND_BASE_URL string `validate:"required,url"`
	RESEND_API_KEY  string `validate:"required"`
	SERP_BASE_URL   string `validate:"required,url"`
	SERP_API_KEY    string `validate:"required"`
}

Jump to

Keyboard shortcuts

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