Documentation
¶
Overview ¶
Package notes queries indexed summaries and coordinates deletion and index rebuilding. Source documents remain authoritative; index operations never rewrite their content.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteCommand ¶
type DeleteCommand struct {
ID string
}
DeleteCommand identifies any kind of note using raw input.
type DeleteHandler ¶
type DeleteHandler struct {
// contains filtered or unexported fields
}
DeleteHandler removes a source document before deleting its searchable projection.
func NewDeleteHandler ¶
func NewDeleteHandler(store ports.NoteStore, index ports.Index) *DeleteHandler
NewDeleteHandler creates the use-case handler with its dependencies.
func (*DeleteHandler) Handle ¶
func (handler *DeleteHandler) Handle(ctx context.Context, command DeleteCommand) (DeleteResult, error)
Handle removes the source document before its derived index entry. Both removals are idempotent, so retrying also repairs a previous partial failure.
type DeleteResult ¶
DeleteResult identifies the note whose source and projection have been removed.
type ListHandler ¶
type ListHandler struct {
// contains filtered or unexported fields
}
ListHandler validates filters and queries derived note summaries.
func NewListHandler ¶
func NewListHandler(index ports.Index) *ListHandler
NewListHandler creates the use-case handler with its dependencies.
func (*ListHandler) Handle ¶
func (handler *ListHandler) Handle(ctx context.Context, query ListQuery) (ListResult, error)
Handle normalizes type and tag filters and applies bounded pagination to the index query.
type ListResult ¶
type ListResult struct {
Notes []ports.NoteSummary
}
ListResult contains one page of indexed note summaries.
type ReindexCommand ¶
type ReindexCommand struct{}
ReindexCommand requests a complete rebuild from the current vault documents.
type ReindexHandler ¶
type ReindexHandler struct {
// contains filtered or unexported fields
}
ReindexHandler scans the vault and rebuilds all projections in one index transaction.
func NewReindexHandler ¶
func NewReindexHandler(store ports.NoteStore, index ports.Index) *ReindexHandler
NewReindexHandler creates the use-case handler with its dependencies.
func (*ReindexHandler) Handle ¶
func (handler *ReindexHandler) Handle(ctx context.Context, _ ReindexCommand) (ReindexResult, error)
Handle reconstructs the complete index from documents. A failed scan or projection rolls back the replacement, including removals of stale entries.
type ReindexResult ¶
type ReindexResult struct {
Indexed int
}
ReindexResult counts documents indexed after a successful transaction.