config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package config provides simplified configuration management

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Environment string
	Service     ServiceConfig
	Logging     LoggingConfig
	Security    SecurityConfig
}

Config holds all configuration for a service

func LoadConfig

func LoadConfig(serviceName string) *Config

LoadConfig loads configuration from flags and environment variables

type LoggingConfig

type LoggingConfig struct {
	Level  string
	Format string
}

LoggingConfig holds logging configuration

type SecurityConfig

type SecurityConfig struct {
	JWTSecret  string
	EnableCORS bool
	RateLimit  int
}

SecurityConfig holds security configuration

type ServiceConfig

type ServiceConfig struct {
	Name    string
	Port    string
	Host    string
	Timeout time.Duration
}

ServiceConfig holds service-specific configuration

Jump to

Keyboard shortcuts

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