Documentation
¶
Index ¶
- Constants
- type Content
- type DB
- func (db *DB) AllDocuments() ([]Document, error)
- func (db *DB) AllStats() (docCount int, totalPages int, err error)
- func (db *DB) BlockGeminiBatchRequests(batchID int64, message string, now time.Time) error
- func (db *DB) BlockGeminiRequest(requestID int64, message string, now time.Time) error
- func (db *DB) BlockUnownedGeminiRequest(requestID int64, message string, now time.Time) error
- func (db *DB) BlockedGeminiRequests() ([]GeminiBatchRequest, error)
- func (db *DB) CleanupOrphanContents() (int, error)
- func (db *DB) CompleteGeminiDirectRequest(requestID int64, pages []PageInput, knownCost int64, indeterminate bool, ...) (contentComplete bool, err error)
- func (db *DB) ContentOCRCoverage(contentID int64) (int, []ModelCount, error)
- func (db *DB) CopyContentPages(sourceContentID, targetContentID int64) (err error)
- func (db *DB) CountGeminiCleanup() (int, error)
- func (db *DB) CountTrackedGeminiBatches() (int, error)
- func (db *DB) CreateBlockedGeminiRequest(plan GeminiRequestPlan, message string, now time.Time) (int64, error)
- func (db *DB) CreateGeminiBatch(displayName, model string, inputPrice, outputPrice int64, replacementOf *int64, ...) (int64, error)
- func (db *DB) CreateGeminiBatchForRequests(displayName, model string, inputPrice, outputPrice int64, replacementOf *int64, ...) (batchID int64, err error)
- func (db *DB) CreateGeminiBatchWork(creations []GeminiBatchCreation, blocked []GeminiBlockedRequest, now time.Time) (batchIDs []int64, err error)
- func (db *DB) DeleteGeminiCleanup(cleanupID int64) error
- func (db *DB) DetachGeminiBatchForReplacement(batchID int64, message string, now time.Time) (retryable []int64, err error)
- func (db *DB) DetachGeminiBatchRequestsForRegeneration(batchID int64, message string, now time.Time) error
- func (db *DB) FinalizeGeminiBatch(batchID int64, now time.Time) (cleanup []GeminiCleanup, err error)
- func (db *DB) ForgetGeminiBatch(batchID int64, now time.Time) (batch *GeminiBatch, err error)
- func (db *DB) GeminiRequestByID(requestID int64) (*GeminiBatchRequest, error)
- func (db *DB) GeminiRequestsForBatch(batchID int64) ([]GeminiBatchRequest, error)
- func (db *DB) GetContentByChecksum(checksum string) (*Content, error)
- func (db *DB) GetContentByID(contentID int64) (*Content, error)
- func (db *DB) GetDocumentByPath(path string) (*Document, error)
- func (db *DB) GetDocumentMetadataByPath(path string) (*Document, error)
- func (db *DB) GetDocumentPathForContent(contentID int64) (string, error)
- func (db *DB) GetDocumentPathsForContent(contentID int64) ([]string, error)
- func (db *DB) GetGeminiBatch(batchID int64) (*GeminiBatch, error)
- func (db *DB) GetPageMarkdownByPathAndIndex(path string, pageIndex int) (string, error)
- func (db *DB) GetPagesMarkdownByPathAndRange(path string, startInclusive, endInclusive int) ([]PageRecord, error)
- func (db *DB) InsertContent(checksum string, pageCount int) (int64, error)
- func (db *DB) InsertDocument(path string, contentID int64, createdAt, modifiedAt time.Time) (int64, error)
- func (db *DB) ListDocuments(opts ListOptions) ([]Document, error)
- func (db *DB) ListGeminiBatches() ([]GeminiBatch, error)
- func (db *DB) ListGeminiCleanup() ([]GeminiCleanup, error)
- func (db *DB) MissingPageIndexes(contentID int64) ([]int, error)
- func (db *DB) MissingPageRanges(contentID int64) ([]PageRange, error)
- func (db *DB) MissingPageRangesWithin(contentID int64, start, end int) ([]PageRange, error)
- func (db *DB) MissingUnownedPageRanges(contentID int64) ([]PageRange, error)
- func (db *DB) PendingContents() ([]Content, error)
- func (db *DB) PendingContentsForDirect() ([]Content, int, error)
- func (db *DB) PendingContentsForGeminiBatch() ([]Content, error)
- func (db *DB) PendingDocuments() ([]Document, error)
- func (db *DB) PendingStats() (docCount int, totalPages int, err error)
- func (db *DB) RecomputeContentPending(contentID int64) (err error)
- func (db *DB) ReplaceContentPages(contentID int64, pages []PageInput) error
- func (db *DB) ReplaceContentPagesDirect(contentID int64, pages []PageInput, now time.Time) (err error)
- func (db *DB) RestoreDocument(id int64, contentID int64, modifiedAt time.Time) error
- func (db *DB) RetireCompletedGeminiRequests() (completed int, err error)
- func (db *DB) RetryGeminiRequest(requestID int64, message string, now time.Time) (bool, error)
- func (db *DB) RetryableGeminiRequests() ([]GeminiBatchRequest, error)
- func (db *DB) Search(query string) ([]SearchResult, error)
- func (db *DB) SearchWithOptions(opts SearchOptions) ([]SearchResult, error)
- func (db *DB) SetGeminiBatchError(batchID int64, message string, now time.Time) error
- func (db *DB) SetGeminiBatchPrepared(batchID int64, message string, now time.Time) error
- func (db *DB) SetGeminiBatchPrices(batchID, inputPrice, outputPrice int64, now time.Time) error
- func (db *DB) SetGeminiBatchRemote(batchID int64, remoteName, state, outputFileName, message string, ...) error
- func (db *DB) SetGeminiBatchState(batchID int64, state, outputFileName, message string, now time.Time) error
- func (db *DB) SetGeminiBatchSubmissionUnknown(batchID int64, now time.Time) error
- func (db *DB) SetGeminiBatchUploadUnknown(batchID int64, now time.Time) error
- func (db *DB) SetGeminiBatchUploaded(batchID int64, inputFileName string, now time.Time) error
- func (db *DB) SetGeminiCleanupError(cleanupID int64, message string, now time.Time) error
- func (db *DB) SoftDeleteMissing(seenPaths map[string]bool, roots []string) (int, error)
- func (db *DB) SplitGeminiRequest(requestID int64, leftKey, rightKey, message string, now time.Time) (requestIDs []int64, err error)
- func (db *DB) StageGeminiDirectRequest(requestID int64, pages []GeminiStagedPage, knownCost int64, indeterminate bool, ...) error
- func (db *DB) StageGeminiRequest(requestID int64, pages []GeminiStagedPage, inputTokens, outputTokens *int64, ...) error
- func (db *DB) UpdateDocument(id int64, contentID int64, modifiedAt time.Time) error
- func (db *DB) UpsertContentPages(contentID int64, pages []PageInput) (err error)
- func (db *DB) UpsertPage(contentID int64, pageIndex int, markdown string) error
- type Document
- type GeminiBatch
- type GeminiBatchCreation
- type GeminiBatchRequest
- type GeminiBlockedRequest
- type GeminiCleanup
- type GeminiRequestPlan
- type GeminiStagedPage
- type ListOptions
- type ModelCount
- type PageInput
- type PageRange
- type PageRecord
- type SearchOptions
- type SearchResult
Constants ¶
View Source
const ( GeminiBatchPrepared = "prepared" GeminiBatchUploadUnknown = "upload_unknown" GeminiBatchUploaded = "uploaded" GeminiBatchSubmissionUnknown = "submission_unknown" GeminiBatchPending = "pending" GeminiBatchRunning = "running" GeminiBatchCancelling = "cancelling" GeminiBatchSucceeded = "succeeded" GeminiBatchFailed = "failed" GeminiBatchCancelled = "cancelled" GeminiBatchExpired = "expired" GeminiRequestAssigned = "assigned" GeminiRequestStaged = "staged" GeminiRequestRetryable = "retryable" GeminiRequestBlocked = "blocked" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) AllDocuments ¶
func (*DB) BlockGeminiBatchRequests ¶ added in v0.3.0
func (*DB) BlockGeminiRequest ¶ added in v0.3.0
func (*DB) BlockUnownedGeminiRequest ¶ added in v0.3.0
func (*DB) BlockedGeminiRequests ¶ added in v0.3.0
func (db *DB) BlockedGeminiRequests() ([]GeminiBatchRequest, error)
func (*DB) CleanupOrphanContents ¶
func (*DB) CompleteGeminiDirectRequest ¶ added in v0.3.0
func (*DB) ContentOCRCoverage ¶ added in v0.3.0
func (db *DB) ContentOCRCoverage(contentID int64) (int, []ModelCount, error)
func (*DB) CopyContentPages ¶ added in v0.3.0
func (*DB) CountGeminiCleanup ¶ added in v0.3.0
func (*DB) CountTrackedGeminiBatches ¶ added in v0.3.0
func (*DB) CreateBlockedGeminiRequest ¶ added in v0.3.0
func (*DB) CreateGeminiBatch ¶ added in v0.3.0
func (*DB) CreateGeminiBatchForRequests ¶ added in v0.3.0
func (*DB) CreateGeminiBatchWork ¶ added in v0.3.0
func (db *DB) CreateGeminiBatchWork( creations []GeminiBatchCreation, blocked []GeminiBlockedRequest, now time.Time, ) (batchIDs []int64, err error)
func (*DB) DeleteGeminiCleanup ¶ added in v0.3.0
func (*DB) DetachGeminiBatchForReplacement ¶ added in v0.3.0
func (*DB) DetachGeminiBatchRequestsForRegeneration ¶ added in v0.3.0
func (*DB) FinalizeGeminiBatch ¶ added in v0.3.0
func (*DB) ForgetGeminiBatch ¶ added in v0.3.0
func (*DB) GeminiRequestByID ¶ added in v0.3.0
func (db *DB) GeminiRequestByID(requestID int64) (*GeminiBatchRequest, error)
func (*DB) GeminiRequestsForBatch ¶ added in v0.3.0
func (db *DB) GeminiRequestsForBatch(batchID int64) ([]GeminiBatchRequest, error)
func (*DB) GetContentByChecksum ¶
func (*DB) GetContentByID ¶ added in v0.3.0
func (*DB) GetDocumentMetadataByPath ¶ added in v0.3.0
func (*DB) GetDocumentPathForContent ¶
func (*DB) GetDocumentPathsForContent ¶ added in v0.3.0
func (*DB) GetGeminiBatch ¶ added in v0.3.0
func (db *DB) GetGeminiBatch(batchID int64) (*GeminiBatch, error)
func (*DB) GetPageMarkdownByPathAndIndex ¶
OCR-backed reads follow the same all-pages-visible-at-once rule as FTS.
func (*DB) GetPagesMarkdownByPathAndRange ¶
func (db *DB) GetPagesMarkdownByPathAndRange(path string, startInclusive, endInclusive int) ([]PageRecord, error)
func (*DB) InsertContent ¶
func (*DB) InsertDocument ¶
func (*DB) ListDocuments ¶
func (db *DB) ListDocuments(opts ListOptions) ([]Document, error)
func (*DB) ListGeminiBatches ¶ added in v0.3.0
func (db *DB) ListGeminiBatches() ([]GeminiBatch, error)
func (*DB) ListGeminiCleanup ¶ added in v0.3.0
func (db *DB) ListGeminiCleanup() ([]GeminiCleanup, error)
func (*DB) MissingPageIndexes ¶ added in v0.3.0
func (*DB) MissingPageRanges ¶ added in v0.3.0
func (*DB) MissingPageRangesWithin ¶ added in v0.3.0
func (*DB) MissingUnownedPageRanges ¶ added in v0.3.0
func (*DB) PendingContents ¶
func (*DB) PendingContentsForDirect ¶ added in v0.3.0
func (*DB) PendingContentsForGeminiBatch ¶ added in v0.3.0
func (*DB) PendingDocuments ¶
func (*DB) RecomputeContentPending ¶ added in v0.3.0
func (*DB) ReplaceContentPages ¶
ReplaceContentPages remains as a compatibility name for callers that already have a complete set. Page writes are additive: partial retries must never erase successful pages from an earlier provider or run.
func (*DB) ReplaceContentPagesDirect ¶ added in v0.3.0
func (*DB) RestoreDocument ¶
func (*DB) RetireCompletedGeminiRequests ¶ added in v0.3.0
func (*DB) RetryGeminiRequest ¶ added in v0.3.0
func (*DB) RetryableGeminiRequests ¶ added in v0.3.0
func (db *DB) RetryableGeminiRequests() ([]GeminiBatchRequest, error)
func (*DB) SearchWithOptions ¶
func (db *DB) SearchWithOptions(opts SearchOptions) ([]SearchResult, error)
func (*DB) SetGeminiBatchError ¶ added in v0.3.0
func (*DB) SetGeminiBatchPrepared ¶ added in v0.3.0
func (*DB) SetGeminiBatchPrices ¶ added in v0.3.0
func (*DB) SetGeminiBatchRemote ¶ added in v0.3.0
func (*DB) SetGeminiBatchState ¶ added in v0.3.0
func (*DB) SetGeminiBatchSubmissionUnknown ¶ added in v0.3.0
func (*DB) SetGeminiBatchUploadUnknown ¶ added in v0.3.0
func (*DB) SetGeminiBatchUploaded ¶ added in v0.3.0
func (*DB) SetGeminiCleanupError ¶ added in v0.3.0
func (*DB) SoftDeleteMissing ¶
func (*DB) SplitGeminiRequest ¶ added in v0.3.0
func (*DB) StageGeminiDirectRequest ¶ added in v0.3.0
func (*DB) StageGeminiRequest ¶ added in v0.3.0
func (*DB) UpdateDocument ¶
func (*DB) UpsertContentPages ¶ added in v0.3.0
type GeminiBatch ¶ added in v0.3.0
type GeminiBatchCreation ¶ added in v0.3.0
type GeminiBatchRequest ¶ added in v0.3.0
type GeminiBatchRequest struct {
ID int64
ContentID int64
BatchID *int64
RequestKey string
FileType string
PageStart int
PageEnd int
State string
AttemptCount int
ReplacementCount int
PreviousBatchID *int64
SplitDepth int
InputTokens *int64
OutputTokens *int64
KnownCost int64
CostIndeterminate bool
LastError string
CreatedAt time.Time
UpdatedAt time.Time
Path string
Checksum string
PageCount int
}
type GeminiBlockedRequest ¶ added in v0.3.0
type GeminiBlockedRequest struct {
Plan GeminiRequestPlan
Message string
}
type GeminiCleanup ¶ added in v0.3.0
type GeminiRequestPlan ¶ added in v0.3.0
type GeminiStagedPage ¶ added in v0.3.0
type ListOptions ¶
type ModelCount ¶ added in v0.3.0
type PageRecord ¶
type SearchOptions ¶
Click to show internal directories.
Click to hide internal directories.