Documentation
¶
Index ¶
- func ExtractTitle(content string) string
- func GetIndexPath(baseDir string) string
- type Index
- func (idx *Index) Close() error
- func (idx *Index) DeleteNote(ctx context.Context, path string) error
- func (idx *Index) FullRebuild(ctx context.Context, notesDir string, opts *SyncOptions) (*SyncResult, error)
- func (idx *Index) GetIndexedPaths(ctx context.Context) (map[string]int64, error)
- func (idx *Index) GetStats(ctx context.Context) (map[string]interface{}, error)
- func (idx *Index) IndexNote(ctx context.Context, path, title, content string, modTime time.Time) error
- func (idx *Index) Search(ctx context.Context, query string, limit int) ([]SearchResult, error)
- func (idx *Index) SearchByTag(ctx context.Context, tag string, limit int) ([]SearchResult, error)
- func (idx *Index) Sync(ctx context.Context, notesDir string, opts *SyncOptions) (*SyncResult, error)
- type SearchResult
- type SyncOptions
- type SyncResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractTitle ¶
func GetIndexPath ¶
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
func (*Index) FullRebuild ¶
func (idx *Index) FullRebuild(ctx context.Context, notesDir string, opts *SyncOptions) (*SyncResult, error)
func (*Index) GetIndexedPaths ¶
func (*Index) SearchByTag ¶
func (*Index) Sync ¶
func (idx *Index) Sync(ctx context.Context, notesDir string, opts *SyncOptions) (*SyncResult, error)
type SearchResult ¶
type SyncOptions ¶
Click to show internal directories.
Click to hide internal directories.