config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 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 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"`
	WebDAV   WebDAVConfig   `yaml:"webdav"`
	Generate GenerateConfig `yaml:"generate"`
}

func Default

func Default() *Config

func Load

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

type GenerateConfig

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

type GitHubConfig

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

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