Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultConfigEnv = "GITCRAWL_CONFIG" DefaultTokenEnv = "GITHUB_TOKEN" DefaultOpenAIEnv = "OPENAI_API_KEY" )
Variables ¶
This section is empty.
Functions ¶
func EnsureRuntimeDirs ¶
func ResolvePath ¶
Types ¶
type Config ¶
type Config struct {
Version int `toml:"version"`
DBPath string `toml:"db_path"`
CacheDir string `toml:"cache_dir"`
VectorDir string `toml:"vector_dir"`
LogDir string `toml:"log_dir"`
Env map[string]string `toml:"env"`
GitHub GitHubConfig `toml:"github"`
OpenAI OpenAIConfig `toml:"openai"`
EmbeddingBasis string `toml:"embedding_basis"`
TUI TUIConfig `toml:"tui"`
}
func LoadRuntime ¶ added in v0.3.2
func (*Config) ApplyRuntimeEnv ¶ added in v0.3.2
func (c *Config) ApplyRuntimeEnv()
type GitHubConfig ¶
type GitHubConfig struct {
TokenEnv string `toml:"token_env"`
}
type OpenAIConfig ¶
type TokenResolution ¶
func ResolveGitHubToken ¶
func ResolveGitHubToken(cfg Config) TokenResolution
func ResolveOpenAIKey ¶
func ResolveOpenAIKey(cfg Config) TokenResolution
Click to show internal directories.
Click to hide internal directories.