config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 2 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 {
	ListenAddr       string            `toml:"listen_addr"`
	DataDir          string            `toml:"data_dir"`
	Store            StoreConfig       `toml:"store"`
	Token            TokenConfig       `toml:"token"`
	Evidence         EvidenceConfig    `toml:"evidence"`
	Log              LogConfig         `toml:"log"`
	ToolDescriptions map[string]string `toml:"tool_descriptions"`
}

Config is the full server configuration. Missing keys fall back to defaults.

func Get

func Get() *Config

Get returns the already-loaded config.

func Load

func Load(path string) *Config

Load parses config from path (missing keys use defaults, never panics), idempotent.

type EvidenceConfig

type EvidenceConfig struct {
	MaxObjectBytes     int64 `toml:"max_object_bytes"`
	MaxTotalBytes      int64 `toml:"max_total_bytes"`
	AllowLocalFileRead bool  `toml:"allow_local_file_read"`
}

type LogConfig

type LogConfig struct {
	LogDir        string `toml:"log_dir"`
	LogRotate     string `toml:"log_rotate"`
	LogMaxAgeDays int    `toml:"log_max_age_days"`
}

type StoreConfig

type StoreConfig struct {
	Driver        string `toml:"driver"`
	DSN           string `toml:"dsn"`
	RetentionDays int    `toml:"retention_days"`
}

type TokenConfig

type TokenConfig struct {
	HMACSecretEnv string `toml:"hmac_secret_env"`
	PrevSecretEnv string `toml:"prev_secret_env"`
	TTLHours      int    `toml:"ttl_hours"`
}

Jump to

Keyboard shortcuts

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