config

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	HTTPAddress string
}

type Config

type Config struct {
	Env           Environment
	API           APIConfig
	Database      DatabaseConfig
	Redis         RedisConfig
	Storage       StorageConfig
	JWT           JWTConfig
	Queue         QueueConfig
	Observability ObservabilityConfig
}

func Load

func Load() (Config, error)

func (Config) Validate

func (c Config) Validate() error

type DatabaseConfig

type DatabaseConfig struct {
	URL string
}

type Environment

type Environment string
const (
	EnvLocal   Environment = "local"
	EnvStaging Environment = "staging"
	EnvProd    Environment = "production"
)

type JWTConfig

type JWTConfig struct {
	Issuer         string
	Audience       string
	SigningKey     string
	KeyID          string
	AccessTTLMin   int
	RefreshTTLHour int
}

type MinIOConfig

type MinIOConfig struct {
	Endpoint  string
	AccessKey string
	SecretKey string
	Bucket    string
	UseSSL    bool
}

type ObservabilityConfig

type ObservabilityConfig struct {
	ServiceName string
	LogLevel    string
}

type QueueConfig

type QueueConfig struct {
	Concurrency int
}

type RedisConfig

type RedisConfig struct {
	URL string
}

type S3Config

type S3Config struct {
	Endpoint string
	Region   string
	Bucket   string
}

type StorageConfig

type StorageConfig struct {
	Provider string
	MinIO    MinIOConfig
	S3       S3Config
}

Jump to

Keyboard shortcuts

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