config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 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 GRPCConfig

type GRPCConfig struct {
	Enabled           bool
	Host              string
	Port              int
	MaxRecvMsgSize    int
	MaxSendMsgSize    int
	ReflectionEnabled bool
}

GRPCConfig holds gRPC configuration

func LoadGRPCConfig

func LoadGRPCConfig() *GRPCConfig

LoadGRPCConfig loads gRPC configuration from environment

type MailConfig

type MailConfig struct {
	Driver      MailDriver
	FromName    string
	FromAddress string

	// SMTP
	SMTPHost   string
	SMTPPort   int
	SMTPUser   string
	SMTPPass   string
	SMTPSecure bool // TLS (implicit) if true; otherwise STARTTLS if available
}

func LoadMail

func LoadMail() *MailConfig

type MailDriver

type MailDriver string
const (
	MailSMTP MailDriver = "smtp"
)

type QueueConfig

type QueueConfig struct {
	Driver     string
	Connection string
	Prefix     string

	// Redis configuration
	RedisHost     string
	RedisPort     int
	RedisPassword string
	RedisDB       int

	// RabbitMQ configuration (for future implementation)
	RabbitMQHost     string
	RabbitMQPort     int
	RabbitMQUser     string
	RabbitMQPassword string
	RabbitMQVHost    string

	// Job defaults
	DefaultTimeout time.Duration
	DefaultRetries int
}

QueueConfig holds queue configuration

func LoadQueueConfig

func LoadQueueConfig() *QueueConfig

LoadQueueConfig loads queue configuration from environment

type StorageBackend

type StorageBackend string
const (
	StorageS3    StorageBackend = "s3"
	StorageMinIO StorageBackend = "minio"
)

type StorageConfig

type StorageConfig struct {
	Backend StorageBackend

	// S3
	S3Region         string
	S3Bucket         string
	S3Endpoint       string
	S3ForcePathStyle bool

	// MinIO
	MinIOEndpoint string
	MinIOAccess   string
	MinIOSecret   string
	MinIOSecure   bool
	MinIOBucket   string
	MinIORegion   string
}

func LoadStorage

func LoadStorage() *StorageConfig

type WebSocketConfig

type WebSocketConfig struct {
	Enabled         bool
	Port            int
	Path            string
	ReadBufferSize  int
	WriteBufferSize int
	MaxMessageSize  int64
	PingInterval    int // seconds
	PongTimeout     int // seconds
}

WebSocketConfig holds WebSocket configuration

func LoadWebSocketConfig

func LoadWebSocketConfig() *WebSocketConfig

LoadWebSocketConfig loads WebSocket configuration from environment

Jump to

Keyboard shortcuts

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