env

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDuration

func GetDuration(k string) (time.Duration, error)

func GetFloat

func GetFloat(k string) (float64, error)

func GetInt

func GetInt(k string) (int, error)

Types

type Config

type Config struct {
	ENV string
	// General settings
	CLIENT_URL string
	API_URL    string

	// Database settings
	DB_HOST     string
	DB_NAME     string
	DB_PORT     string
	DB_TIMEZONE string

	// S3 settings
	AWS_REGION                      string
	AWS_ENDPOINT_URL_S3             string
	INTERNAL_ENDPOINT_URL_S3        string
	BUCKET_NAME                     string
	FILETYPE_CHECK_NB_BYTES_TO_READ int
	PRESIGNED_URL_EXPIRE_TIME_MIN   time.Duration

	// Auth settings
	JWT_SECRET          string
	ACCESS_DURATION     time.Duration
	REFRESH_DURATION    time.Duration
	MAX_UPLOAD_TRACK_MB int
	MAX_UPLOAD_IMG_MB   int

	// API config
	MAX_PAGE_SIZE int

	// OAuth2 settins
	FT_API                 string
	OAUTH2_FT_UID          string
	OAUTH2_FT_SECRET       string
	OAUTH2_FT_REDIRECT_URL string
	OAUTH2_FT_AUTH_URL     string
	OAUTH2_FT_TOKEN_URL    string

	// Mail Config
	SMTP_HOST string
	SMTP_PORT string
	SMTP_USER string
	SMTP_PASS string

	// Rate Limiting Configuration
	RATE_LIMIT_RPS             float64
	RATE_LIMIT_BURST           int
	RATE_LIMIT_CLEANUP_MINUTES time.Duration
}
var C Config

Jump to

Keyboard shortcuts

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