internal

package
v0.0.0-...-ec9b500 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAppConfig

func NewAppConfig() error

NewAppConfig initializes the global Config variable.

Types

type AppConfig

type AppConfig struct {
	Postgres     PostgresConfig `mapstructure:",squash"`
	Redis        RedisConfig    `mapstructure:",squash"`
	RabbitMQ     RabbitMQConfig `mapstructure:",squash"`
	OTEL         OTELConfig     `mapstructure:",squash"`
	LogLevel     string         `mapstructure:"LOG_LEVEL"`
	Env          AppEnv         `mapstructure:"ENV"`
	Port         string         `mapstructure:"PORT"`
	MFAMasterKey string         `mapstructure:"MFA_MASTER_KEY"`
}
var (
	Config *AppConfig
)

func LoadConfig

func LoadConfig() (*AppConfig, error)

LoadConfig loads configuration from environment variables.

type AppEnv

type AppEnv string
const (
	AppEnvDev  AppEnv = "development"
	AppEnvProd AppEnv = "production"
	AppEnvCI   AppEnv = "ci"
)

func (*AppEnv) UnmarshalText

func (e *AppEnv) UnmarshalText(text []byte) error

type OTELConfig

type OTELConfig struct {
	Endpoint string `mapstructure:"OTEL_EXPORTER_OTLP_ENDPOINT"`
}

type PostgresConfig

type PostgresConfig struct {
	User     string `mapstructure:"DB_USER"`
	Password string `mapstructure:"DB_PASS"`
	Host     string `mapstructure:"DB_HOST"`
	Port     string `mapstructure:"DB_PORT"`
	DBName   string `mapstructure:"DB_NAME"`
}

type RabbitMQConfig

type RabbitMQConfig struct {
	URL string `mapstructure:"RABBITMQ_URL"`
}

type RedisConfig

type RedisConfig struct {
	Addr string `mapstructure:"REDIS_ADDR"`
}

Directories

Path Synopsis
generated
api
Package internal provides primitives to interact with the openapi HTTP API.
Package internal provides primitives to interact with the openapi HTTP API.
client
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.
db
db
modules
shared
causation
Package causation provides context-based propagation of identity, auditing, and traceability metadata to track the origin and sequence of operations.
Package causation provides context-based propagation of identity, auditing, and traceability metadata to track the origin and sequence of operations.
utils

Jump to

Keyboard shortcuts

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