Documentation
¶
Index ¶
- Constants
- func EnsureRuntimeDirs(cfg Config) error
- func ExpandPath(path string) (string, error)
- func NormalizeBotToken(raw string) string
- func ResolvePath(flagPath string) string
- func Write(path string, cfg Config) error
- type Config
- type DesktopConfig
- type DiscordConfig
- type EmbeddingsConfig
- type SearchConfig
- type ShareConfig
- type ShareFilterConfig
- type SyncConfig
- type TokenResolution
Constants ¶
View Source
const ( DefaultConfigEnv = "DISCRAWL_CONFIG" DefaultTokenEnv = "DISCORD_BOT_TOKEN" DefaultTokenKeyringService = "discrawl" DefaultTokenKeyringAccount = "discord_bot_token" )
Variables ¶
This section is empty.
Functions ¶
func EnsureRuntimeDirs ¶
func ExpandPath ¶
func NormalizeBotToken ¶
func ResolvePath ¶
Types ¶
type Config ¶
type Config struct {
Version int `toml:"version"`
GuildID string `toml:"guild_id,omitempty"`
DefaultGuildID string `toml:"default_guild_id,omitempty"`
GuildIDs []string `toml:"guild_ids,omitempty"`
DBPath string `toml:"db_path"`
CacheDir string `toml:"cache_dir"`
LogDir string `toml:"log_dir"`
Discord DiscordConfig `toml:"discord"`
Desktop DesktopConfig `toml:"desktop"`
Sync SyncConfig `toml:"sync"`
Search SearchConfig `toml:"search"`
}
func (Config) AttachmentMediaEnabled ¶ added in v0.8.0
func (Config) AttachmentTextEnabled ¶
func (Config) EffectiveDefaultGuildID ¶
func (Config) SearchGuildDefaults ¶
func (Config) ShareEnabled ¶
func (Config) ShareMediaEnabled ¶ added in v0.8.0
type DesktopConfig ¶
type DiscordConfig ¶
type EmbeddingsConfig ¶
type EmbeddingsConfig struct {
Enabled bool `toml:"enabled"`
Provider string `toml:"provider"`
Model string `toml:"model"`
BaseURL string `toml:"base_url"`
APIKeyEnv string `toml:"api_key_env"`
BatchSize int `toml:"batch_size"`
MaxInputChars int `toml:"max_input_chars"`
RequestTimeout string `toml:"request_timeout"`
}
type SearchConfig ¶
type SearchConfig struct {
DefaultMode string `toml:"default_mode"`
Embeddings EmbeddingsConfig `toml:"embeddings"`
}
type ShareConfig ¶
type ShareConfig struct {
}
type ShareFilterConfig ¶ added in v0.7.1
type ShareFilterConfig struct {
}
type SyncConfig ¶
type SyncConfig struct {
Source string `toml:"source"`
Concurrency int `toml:"concurrency"`
RepairEvery string `toml:"repair_every"`
FullHistory bool `toml:"full_history"`
AttachmentText *bool `toml:"attachment_text"`
AttachmentMedia *bool `toml:"attachment_media"`
MaxAttachmentBytes int64 `toml:"max_attachment_bytes"`
}
type TokenResolution ¶
func ResolveDiscordToken ¶
func ResolveDiscordToken(cfg Config) (TokenResolution, error)
Click to show internal directories.
Click to hide internal directories.