Documentation
¶
Index ¶
- Constants
- Variables
- func ExtractAssetRows(notes []domain.Note) []domain.DatabaseRow
- func ExtractBacklinkRows(notes []domain.Note) []domain.DatabaseRow
- func ExtractLinkRows(notes []domain.Note) []domain.DatabaseRow
- func ExtractProperties(note domain.Note) map[string]domain.PropertyValue
- func ExtractPropertyRows(notes []domain.Note) []domain.DatabaseRow
- func ExtractRelationRows(notes []domain.Note) []domain.DatabaseRow
- func ExtractTaskRows(notes []domain.Note) []domain.DatabaseRow
- func InferPropertyDefinitions(rows []domain.DatabaseRow) []domain.PropertyDefinition
- func ListAssetLinks(root string) ([]AssetLinkRecord, Status, error)
- func ListFolders(root string) ([]FolderRecord, Status, error)
- func ListVaultFiles(root string) ([]VaultFileRecord, Status, error)
- func ReplaceAssetProjection(root string, assets []domain.Asset) error
- type AssetLinkRecord
- type AssetRecord
- type AttachmentRecord
- type Counts
- type DimensionCountRecord
- type DoctorReport
- type FolderRecord
- type IncrementalResult
- type IndexCoordinator
- func (c *IndexCoordinator) BeginEpoch() uint64
- func (c *IndexCoordinator) CommitWriteBatch(ctx context.Context, batch IndexWriteBatch) error
- func (c *IndexCoordinator) Emit(ctx context.Context, event IndexEvent) (IndexEvent, error)
- func (c *IndexCoordinator) ProcessReady(ctx context.Context, handle func(context.Context, IndexEvent) error) error
- func (c *IndexCoordinator) RuntimeFacts() map[string]string
- type IndexCoordinatorOptions
- type IndexEvent
- type IndexEventKind
- type IndexMetaRecord
- type IndexWriteBatch
- type Issue
- type LinkRecord
- type LookupRequest
- type LookupResult
- type NoteDelete
- type NoteRecord
- type NoteTextRecord
- type NoteUpdate
- type PromptAssetRecord
- type PromptAssetSourceRefRecord
- type PromptAssetVersionRecord
- type PromptUsageFeedbackRecord
- type PropertyDefinitionRecord
- type PropertyValueRecord
- type RefreshOptions
- type RefreshResult
- type RepairOperation
- type RepairPlan
- type RepairResult
- type ResultItem
- type SearchRequest
- type SearchResult
- type SearchTokenRecord
- type Status
- type SyncResult
- type TagRecord
- type TaskRecord
- type VaultFileRecord
Constants ¶
View Source
const PropertySchemaVersion = "pinax.properties.v1"
View Source
const SchemaVersion = "pinax.index.v2"
Variables ¶
View Source
var ErrStaleIndexEpoch = errors.New("stale index epoch")
Functions ¶
func ExtractAssetRows ¶ added in v0.1.3
func ExtractAssetRows(notes []domain.Note) []domain.DatabaseRow
func ExtractBacklinkRows ¶ added in v0.1.3
func ExtractBacklinkRows(notes []domain.Note) []domain.DatabaseRow
func ExtractLinkRows ¶ added in v0.1.3
func ExtractLinkRows(notes []domain.Note) []domain.DatabaseRow
func ExtractProperties ¶
func ExtractProperties(note domain.Note) map[string]domain.PropertyValue
func ExtractPropertyRows ¶
func ExtractPropertyRows(notes []domain.Note) []domain.DatabaseRow
func ExtractRelationRows ¶ added in v0.1.3
func ExtractRelationRows(notes []domain.Note) []domain.DatabaseRow
func ExtractTaskRows ¶ added in v0.1.3
func ExtractTaskRows(notes []domain.Note) []domain.DatabaseRow
func InferPropertyDefinitions ¶
func InferPropertyDefinitions(rows []domain.DatabaseRow) []domain.PropertyDefinition
func ListAssetLinks ¶
func ListAssetLinks(root string) ([]AssetLinkRecord, Status, error)
func ListFolders ¶
func ListFolders(root string) ([]FolderRecord, Status, error)
func ListVaultFiles ¶
func ListVaultFiles(root string) ([]VaultFileRecord, Status, error)
Types ¶
type AssetLinkRecord ¶
type AssetLinkRecord = model.AssetLinkRecord
type AssetRecord ¶
type AssetRecord = model.AssetRecord
type AttachmentRecord ¶
type AttachmentRecord = model.AttachmentRecord
type Counts ¶
type DimensionCountRecord ¶
type DimensionCountRecord = model.DimensionCountRecord
type DoctorReport ¶
type FolderRecord ¶
type FolderRecord = model.FolderRecord
type IncrementalResult ¶
func DeleteNote ¶
func DeleteNote(root string, del NoteDelete) (IncrementalResult, error)
func UpdateNote ¶
func UpdateNote(root string, update NoteUpdate) (IncrementalResult, error)
type IndexCoordinator ¶
type IndexCoordinator struct {
// contains filtered or unexported fields
}
func NewIndexCoordinator ¶
func NewIndexCoordinator(opts IndexCoordinatorOptions) *IndexCoordinator
func (*IndexCoordinator) BeginEpoch ¶
func (c *IndexCoordinator) BeginEpoch() uint64
func (*IndexCoordinator) CommitWriteBatch ¶
func (c *IndexCoordinator) CommitWriteBatch(ctx context.Context, batch IndexWriteBatch) error
func (*IndexCoordinator) Emit ¶
func (c *IndexCoordinator) Emit(ctx context.Context, event IndexEvent) (IndexEvent, error)
func (*IndexCoordinator) ProcessReady ¶
func (c *IndexCoordinator) ProcessReady(ctx context.Context, handle func(context.Context, IndexEvent) error) error
func (*IndexCoordinator) RuntimeFacts ¶
func (c *IndexCoordinator) RuntimeFacts() map[string]string
type IndexCoordinatorOptions ¶
type IndexEvent ¶
type IndexEventKind ¶
type IndexEventKind string
const ( IndexEventNoteChanged IndexEventKind = "note_changed" IndexEventNoteMoved IndexEventKind = "note_moved" IndexEventNoteDeleted IndexEventKind = "note_deleted" IndexEventRebuildRequested IndexEventKind = "rebuild_requested" )
type IndexMetaRecord ¶
type IndexMetaRecord = model.IndexMetaRecord
type IndexWriteBatch ¶
type LinkRecord ¶
type LinkRecord = model.LinkRecord
func LinksByTargetObjectID ¶ added in v0.1.6
func LinksByTargetObjectID(root, objectID string) ([]LinkRecord, error)
type LookupRequest ¶
type LookupResult ¶
type LookupResult struct {
Status Status `json:"status"`
Candidates []domain.VaultObjectCandidate `json:"candidates"`
}
func Lookup ¶
func Lookup(root string, req LookupRequest) (LookupResult, error)
type NoteDelete ¶
type NoteDelete struct {
Path string
}
type NoteRecord ¶
type NoteRecord = model.NoteRecord
type NoteTextRecord ¶
type NoteTextRecord = model.NoteTextRecord
type NoteUpdate ¶
type PromptAssetRecord ¶ added in v0.1.1
type PromptAssetRecord = model.PromptAssetRecord
type PromptAssetSourceRefRecord ¶ added in v0.1.1
type PromptAssetSourceRefRecord = model.PromptAssetSourceRefRecord
type PromptAssetVersionRecord ¶ added in v0.1.1
type PromptAssetVersionRecord = model.PromptAssetVersionRecord
type PromptUsageFeedbackRecord ¶ added in v0.1.1
type PromptUsageFeedbackRecord = model.PromptUsageFeedbackRecord
type PropertyDefinitionRecord ¶
type PropertyDefinitionRecord = model.PropertyDefinitionRecord
type PropertyValueRecord ¶
type PropertyValueRecord = model.PropertyValueRecord
type RefreshOptions ¶
type RefreshOptions struct {
BatchSize int `json:"batch_size,omitempty"`
}
type RefreshResult ¶
type RefreshResult struct {
Scanned int `json:"scanned"`
Changed int `json:"changed"`
Skipped int `json:"skipped"`
Indexed int `json:"indexed"`
Created int `json:"created"`
Moved int `json:"moved"`
Deleted int `json:"deleted"`
Failed int `json:"failed"`
Batches int `json:"batches"`
DurationMillis int64 `json:"duration_ms"`
IndexStatus string `json:"index_status"`
FailedPaths []string `json:"failed_paths,omitempty"`
}
func Refresh ¶
func Refresh(root string, notes []domain.Note, opts RefreshOptions) (RefreshResult, error)
func RefreshChanged ¶
func RefreshChanged(root string, notes []domain.Note, changed []domain.ChangedPath, opts RefreshOptions) (RefreshResult, error)
type RepairOperation ¶
type RepairPlan ¶
type RepairPlan struct {
Kind string `json:"kind"`
DryRun bool `json:"dry_run"`
Writes bool `json:"writes"`
Operations []RepairOperation `json:"operations"`
}
type RepairResult ¶
type RepairResult struct {
Plan RepairPlan `json:"plan"`
IndexStatus string `json:"index_status"`
BackupPath string `json:"backup_path,omitempty"`
Counts Counts `json:"counts,omitempty"`
}
type ResultItem ¶
type SearchRequest ¶
type SearchResult ¶
type SearchResult struct {
Engine string `json:"engine"`
IndexStatus string `json:"index_status"`
Total int `json:"total"`
Returned int `json:"returned"`
Results []ResultItem `json:"results"`
}
func Search ¶
func Search(root string, req SearchRequest) (SearchResult, error)
type SearchTokenRecord ¶
type SearchTokenRecord = model.SearchTokenRecord
type Status ¶
type SyncResult ¶
type TaskRecord ¶ added in v0.1.3
type TaskRecord = model.TaskRecord
type VaultFileRecord ¶
type VaultFileRecord = model.VaultFileRecord
Source Files
¶
Click to show internal directories.
Click to hide internal directories.