config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GitHub    GitHubConfig
	Reconcile ReconcileConfig
	Log       LogConfig
	WebAPI    WebAPIConfig
}

Config represents the entire application configuration.

func Load

func Load() (*Config, error)

Load reads configuration from GHACRON_* environment variables.

func (*Config) GetPrivateKey

func (c *Config) GetPrivateKey() ([]byte, error)

GetPrivateKey returns the private key bytes. Priority: GHACRON_APP_PRIVATE_KEY env > GHACRON_APP_PRIVATE_KEY_PATH file.

type GitHubConfig

type GitHubConfig struct {
	AppID          int64
	PrivateKey     string
	PrivateKeyPath string
}

GitHubConfig holds GitHub App credentials.

type LogConfig

type LogConfig struct {
	Level  string
	Format string
}

LogConfig holds logging settings.

func (*LogConfig) SlogLevel

func (lc *LogConfig) SlogLevel() slog.Level

SlogLevel converts the Level string to slog.Level.

type ReconcileConfig

type ReconcileConfig struct {
	IntervalMinutes       int
	DuplicateGuardSeconds int
	DryRun                bool
	Timezone              string
}

ReconcileConfig holds reconciliation loop settings.

type WebAPIConfig

type WebAPIConfig struct {
	Enabled bool
	Host    string
	Port    int
}

WebAPIConfig holds web API server settings.

Jump to

Keyboard shortcuts

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