config

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config loads gitrakz's runtime configuration from environment variables prefixed with GITRAKZ_.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AuthToken string `env:"GITRAKZ_AUTH_TOKEN"`
	GHUser    string `env:"GITRAKZ_GH_USER"`
	DBPath    string `default:"/data/gitrakz.db" env:"GITRAKZ_DB_PATH"`
	SyncSince string `default:"2025-01-01"       env:"GITRAKZ_SYNC_SINCE"`

	SyncInterval  time.Duration `default:"30m" env:"GITRAKZ_SYNC_INTERVAL"`
	SessionGap    time.Duration `default:"30m" env:"GITRAKZ_SESSION_GAP"`
	SessionLeadIn time.Duration `default:"25m" env:"GITRAKZ_SESSION_LEADIN"`

	ElelemType    string `env:"GITRAKZ_ELELEM_TYPE"`
	ElelemBaseURL string `env:"GITRAKZ_ELELEM_BASE_URL"`
	ElelemModel   string `env:"GITRAKZ_ELELEM_MODEL"`
	ElelemAPIKey  string `env:"GITRAKZ_ELELEM_API_KEY"`
}

Config holds gitrakz's runtime configuration.

func Load

func Load() (Config, error)

Load parses Config from the environment. GHUser is optional: when it's empty the sync engine defaults to the gh CLI's authenticated login (see ghsync.Syncer), so tracking yourself needs no configuration at all.

Jump to

Keyboard shortcuts

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