Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 (*Manager[T]) Get ¶ added in v2.2.0
func (m *Manager[T]) Get() *T
Get returns the configuration
type Option ¶ added in v2.2.0
Option configures a Manager
func WithSources ¶ added in v2.2.0
WithSources adds configuration sources
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.