config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDir

func DefaultDir() (string, error)

func DefaultPath

func DefaultPath() (string, error)

func ResolveAIKey

func ResolveAIKey(cfg *Config, flagKey string) string

func ResolveEmbeddingKey added in v0.0.6

func ResolveEmbeddingKey(cfg *Config, flagKey string) string

func ResolveToken

func ResolveToken(cfg *Config, flagToken string) string

func ResolveWebDAVPassword

func ResolveWebDAVPassword(cfg *Config) string

Types

type AIConfig

type AIConfig struct {
	BaseURL      string `yaml:"base_url"`
	APIKey       string `yaml:"api_key"`
	Model        string `yaml:"model"`
	Concurrency  int    `yaml:"concurrency"`
	CustomPrompt string `yaml:"custom_prompt"`
}

type Config

type Config struct {
	GitHub    GitHubConfig    `yaml:"github"`
	AI        AIConfig        `yaml:"ai"`
	Embedding EmbeddingConfig `yaml:"embedding"`
	WebDAV    WebDAVConfig    `yaml:"webdav"`
	Generate  GenerateConfig  `yaml:"generate"`
	TUI       TUIConfig       `yaml:"tui"`
}

func Default

func Default() *Config

func Load

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

type EmbeddingConfig added in v0.0.6

type EmbeddingConfig struct {
	BaseURL string `yaml:"base_url"`
	APIKey  string `yaml:"api_key"`
	Model   string `yaml:"model"`
}

type GenerateConfig

type GenerateConfig struct {
	Sort string `yaml:"sort"`
}

type GitHubConfig

type GitHubConfig struct {
	Token    string `yaml:"token"`
	Username string `yaml:"username"`
}

type PreviewConfig added in v0.0.17

type PreviewConfig struct {
	Open     bool    `yaml:"open"`
	Position string  `yaml:"position"`
	Width    float64 `yaml:"width"`
	Height   float64 `yaml:"height"`
}

type StarsKeybindings added in v0.1.0

type StarsKeybindings struct {
	Sync       string `yaml:"sync"`
	Analyze    string `yaml:"analyze"`
	ToggleStar string `yaml:"toggle_star"`
	EditCat    string `yaml:"edit_category"`
	EditTag    string `yaml:"edit_tag"`
}

type TUIConfig added in v0.0.17

type TUIConfig struct {
	Preview     PreviewConfig  `yaml:"preview"`
	DefaultView string         `yaml:"default_view"`
	ConfirmQuit bool           `yaml:"confirm_quit"`
	Theme       string         `yaml:"theme"`
	Keybindings TUIKeybindings `yaml:"keybindings"`
}

type TUIKeybindings added in v0.1.0

type TUIKeybindings struct {
	Universal UniversalKeybindings `yaml:"universal"`
	Stars     StarsKeybindings     `yaml:"stars"`
}

type UniversalKeybindings added in v0.1.0

type UniversalKeybindings struct {
	Quit          string `yaml:"quit"`
	Refresh       string `yaml:"refresh"`
	Search        string `yaml:"search"`
	Command       string `yaml:"command"`
	ToggleSidebar string `yaml:"toggle_sidebar"`
	Help          string `yaml:"help"`
}

type WebDAVConfig

type WebDAVConfig struct {
	URL      string `yaml:"url"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Path     string `yaml:"path"`
}

Jump to

Keyboard shortcuts

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