Documentation
¶
Index ¶
- func LoadClaudeMD(dsn string) *gorm.DB
- func LoadSearchIndex(indexPath string) (bleve.Index, error)
- func NewClaudeDB(dsn string) *gorm.DB
- func WalkDirectory(fsys fs.FS, dir string, processFunc ProcessFileFunc) error
- type ConfigManager
- type DB
- type PinnedDocsConfig
- type ProcessFileFunc
- type SearchIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadClaudeMD ¶
func NewClaudeDB ¶
NewClaudeDB creates a new database connection for Claude operations
func WalkDirectory ¶
func WalkDirectory(fsys fs.FS, dir string, processFunc ProcessFileFunc) error
Types ¶
type ConfigManager ¶
type ConfigManager[T any] struct { // contains filtered or unexported fields }
ConfigManager provides a simple interface for configuration management
func NewConfigManager ¶
func NewConfigManager[T any](configDir string) (*ConfigManager[T], error)
NewConfigManager creates a new configuration manager for type T
func (*ConfigManager[T]) GetConfig ¶
func (cm *ConfigManager[T]) GetConfig(id string, defaultValue T) T
GetConfig retrieves configuration by ID, returns default value if not found
func (*ConfigManager[T]) SetConfig ¶
func (cm *ConfigManager[T]) SetConfig(id string, config T) error
SetConfig stores configuration by ID
func (*ConfigManager[T]) UpdateConfig ¶
func (cm *ConfigManager[T]) UpdateConfig(id string, defaultValue T, updateFn func(T) T) error
UpdateConfig applies a transformation function to the existing config
type DB ¶
type DB[T any] struct { // contains filtered or unexported fields }
type PinnedDocsConfig ¶
type PinnedDocsConfig struct {
PinnedDocuments []string `json:"pinnedDocuments"`
Version string `json:"version"`
LastUpdated time.Time `json:"lastUpdated"`
}
PinnedDocsConfig represents the pinned documents configuration
func DefaultPinnedDocsConfig ¶
func DefaultPinnedDocsConfig() PinnedDocsConfig
DefaultPinnedDocsConfig returns the default configuration for pinned documents
func (*PinnedDocsConfig) IsPinned ¶
func (config *PinnedDocsConfig) IsPinned(docID string) bool
IsPinned checks if a document ID is in the pinned list
func (*PinnedDocsConfig) TogglePin ¶
func (config *PinnedDocsConfig) TogglePin(docID string) bool
TogglePin adds or removes a document ID from the pinned list
type ProcessFileFunc ¶
type SearchIndex ¶
func NewSearchIndex ¶
func NewSearchIndex(indexPath string) (*SearchIndex, error)
func (*SearchIndex) DeleteDocument ¶
func (s *SearchIndex) DeleteDocument(id string) error
func (*SearchIndex) IndexDocument ¶
func (s *SearchIndex) IndexDocument(id string, data any) error
func (*SearchIndex) Search ¶
func (s *SearchIndex) Search(query string) (*bleve.SearchResult, error)
Click to show internal directories.
Click to hide internal directories.