config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 3 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 {
	// App
	AppPort    int
	AppEnv     string
	AppVersion string

	// JWT
	JWTAccessTTLMinutes int
	JWTRefreshTTLDays   int
	JWTAccessSecret     string
	JWTRefreshSecret    string

	// Database (Postgres)
	DBHost string
	DBPort int
	DBUser string
	DBPass string
	DBName string
	DBSSL  string

	// S3 (carregado do .env)
	S3Region          string
	S3Bucket          string
	S3Endpoint        string
	S3ForcePathStyle  bool
	S3AccessKeyID     string
	S3SecretAccessKey string
	AWSSessionToken   string // opcional (para credenciais temporárias)

	// Storage policy (opcional)
	StorageAllowedTypes []string
	StorageMaxMB        int

	// Rate limiting
	RateLimitRPS   int // requests per second per key
	RateLimitBurst int // max burst size

	// Observability
	OTLPEndpoint string // OTLP gRPC endpoint (e.g. localhost:4317)
	OTLPInsecure bool   // use insecure connection (no TLS)
	MetricsPort  int    // Prometheus /metrics scrape port (0 = disabled)

	// Stripe
	StripeSecretKey     string
	StripeWebhookSecret string
}

func Load

func Load() Config

Jump to

Keyboard shortcuts

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