config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 5 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 {
	TokenPrefix string `yaml:"token_prefix"`
}

type Config

type Config struct {
	Server    ServerConfig    `yaml:"server"`
	Database  DatabaseConfig  `yaml:"database"`
	Search    SearchConfig    `yaml:"search"`
	GitStore  GitStoreConfig  `yaml:"gitstore"`
	RateLimit RateLimitConfig `yaml:"rate_limit"`
	Auth      AuthConfig      `yaml:"auth"`
}

func DefaultConfig

func DefaultConfig() *Config

func Load

func Load(configPath string) (*Config, error)

type DatabaseConfig

type DatabaseConfig struct {
	Driver       string `yaml:"driver"` // "sqlite" (default) or "postgres"
	URL          string `yaml:"url"`    // SQLite file path or PostgreSQL DSN
	MaxOpenConns int    `yaml:"max_open_conns"`
	MaxIdleConns int    `yaml:"max_idle_conns"`
}

type GitStoreConfig

type GitStoreConfig struct {
	BasePath string       `yaml:"base_path"`
	Mirror   MirrorConfig `yaml:"mirror"`
	Import   ImportConfig `yaml:"import"`
}

type ImportConfig

type ImportConfig struct {
	Enabled          bool     `yaml:"enabled"`
	WebhookSecretEnv string   `yaml:"webhook_secret_env"`
	AllowedOrigins   []string `yaml:"allowed_origins"`
	AutoPublish      bool     `yaml:"auto_publish"`
	RequireSkillMD   bool     `yaml:"require_skill_md"`
}

type MirrorConfig

type MirrorConfig struct {
	Enabled       bool   `yaml:"enabled"`
	Provider      string `yaml:"provider"`
	BaseURL       string `yaml:"base_url"`
	Org           string `yaml:"org"`
	TokenEnv      string `yaml:"token_env"`
	AutoPush      bool   `yaml:"auto_push"`
	PushOnStartup bool   `yaml:"push_on_startup"`
}

type RateLimitConfig

type RateLimitConfig struct {
	ReadLimit      int `yaml:"read_limit"`
	ReadWindow     int `yaml:"read_window"`
	WriteLimit     int `yaml:"write_limit"`
	WriteWindow    int `yaml:"write_window"`
	DownloadLimit  int `yaml:"download_limit"`
	DownloadWindow int `yaml:"download_window"`
}

type SearchConfig

type SearchConfig struct {
	IndexPath string `yaml:"index_path"` // Bleve index directory
}

type ServerConfig

type ServerConfig struct {
	Port    int    `yaml:"port"`
	Host    string `yaml:"host"`
	BaseURL string `yaml:"base_url"`
}

Jump to

Keyboard shortcuts

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