config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	Mode AuthMode
	OIDC OIDCConfig
}

type AuthMode

type AuthMode string
const (
	AuthModeDisabled AuthMode = "disabled"
	AuthModeOIDC     AuthMode = "oidc"
)

type Config

type Config struct {
	Server        ServerConfig
	Auth          AuthConfig
	GitHub        GitHubConfig
	Database      DatabaseConfig
	Orchestrator  OrchestratorConfig
	Event         EventConfig
	Observability ObservabilityConfig
	Logging       LoggingConfig
	Metadata      Metadata
}

func Load

func Load(opts LoadOptions) (Config, error)

func (Config) ResolvedEventDriver

func (cfg Config) ResolvedEventDriver() (EventDriver, error)

type DatabaseConfig

type DatabaseConfig struct {
	DSN string
}

type EventConfig

type EventConfig struct {
	Driver EventDriver
}

type EventDriver

type EventDriver string
const (
	EventDriverAuto     EventDriver = "auto"
	EventDriverChannel  EventDriver = "channel"
	EventDriverPGNotify EventDriver = "pgnotify"
)

type GitHubConfig

type GitHubConfig struct {
	WebhookSecret string
}

type LoadOptions

type LoadOptions struct {
	ConfigFile string
	Overrides  map[string]any
}

type LogFormat

type LogFormat string
const (
	LogFormatText LogFormat = "text"
	LogFormatJSON LogFormat = "json"
)

type LoggingConfig

type LoggingConfig struct {
	Level  slog.Level
	Format LogFormat
}

type Metadata

type Metadata struct {
	ConfigFile string
}

type MetricsConfig

type MetricsConfig struct {
	Enabled bool
	Export  MetricsExportConfig
}

type MetricsExportConfig

type MetricsExportConfig struct {
	Prometheus   bool
	OTLPEndpoint string
}

type OIDCConfig

type OIDCConfig struct {
	IssuerURL            string
	ClientID             string
	ClientSecret         string
	RedirectURL          string
	Scopes               []string
	EmailClaim           string
	NameClaim            string
	UsernameClaim        string
	GroupsClaim          string
	AllowedEmailDomains  []string
	BootstrapAdminEmails []string
	SessionTTL           time.Duration
	SessionIdleTTL       time.Duration
}

type ObservabilityConfig

type ObservabilityConfig struct {
	Metrics MetricsConfig
	Tracing TraceConfig
}

type OrchestratorConfig

type OrchestratorConfig struct {
	TickInterval time.Duration
}

type ServerConfig

type ServerConfig struct {
	Mode            ServerMode
	Host            string
	Port            int
	ReadTimeout     time.Duration
	WriteTimeout    time.Duration
	ShutdownTimeout time.Duration
}

type ServerMode

type ServerMode string
const (
	ServerModeAllInOne    ServerMode = "all-in-one"
	ServerModeServe       ServerMode = "serve"
	ServerModeOrchestrate ServerMode = "orchestrate"
)

type TraceConfig

type TraceConfig struct {
	Enabled     bool
	Endpoint    string
	ServiceName string
	SampleRatio float64
}

Jump to

Keyboard shortcuts

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