Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigOption ¶ added in v2.2.3
ConfigOption configures a Manager
func WithSources ¶ added in v2.2.0
func WithSources[T any](sources ...Source) ConfigOption[T]
WithSources adds configuration sources
type EnvSource ¶ added in v2.2.0
type EnvSource string
EnvSource loads config from environment variables
type FileSource ¶ added in v2.2.0
type FileSource string
FileSource loads config from a file
func (FileSource) Name ¶ added in v2.2.0
func (f FileSource) Name() string
type GlobalConfig ¶
type GlobalConfig struct {
Cloudflare struct {
Token string `yaml:"token" validate:"required"`
} `yaml:"cloudflare"`
}
GlobalConfig represents the global application configuration
type GlobalManager ¶ added in v2.2.0
type GlobalManager = Manager[GlobalConfig]
GlobalManager manages global configuration
func NewGlobalManager ¶ added in v2.2.0
func NewGlobalManager(cmd *cli.Command) (*GlobalManager, error)
NewGlobalManager creates a new global configuration manager
type Manager ¶ added in v2.2.0
type Manager[T any] struct { // contains filtered or unexported fields }
Manager manages configuration loading and persistence
func New ¶ added in v2.2.0
func New[T any](path string, defaultConfig *T, opts ...ConfigOption[T]) (*Manager[T], error)
New creates a new config manager with functional options
type TunnelConfig ¶
type TunnelConfig struct {
Tunnel *domain.Tunnel `yaml:"tunnel" validate:"required"`
Ingress *domain.Ingress `yaml:"ingress" validate:"required"`
}
TunnelConfig represents tunnel-specific configuration
func ExampleTunnelConfig ¶ added in v2.2.0
func ExampleTunnelConfig() (*TunnelConfig, error)
type TunnelManager ¶ added in v2.2.0
type TunnelManager = Manager[TunnelConfig]
TunnelManager manages tunnel configuration
func NewTunnelManager ¶ added in v2.2.0
func NewTunnelManager(path string) (*TunnelManager, error)
NewTunnelManager creates a new tunnel configuration manager
Click to show internal directories.
Click to hide internal directories.