Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts. Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation. Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
36 lines
1.6 KiB
Go
36 lines
1.6 KiB
Go
package store
|
|
|
|
import (
|
|
"context"
|
|
|
|
"pageswiki/internal/mestionora"
|
|
)
|
|
|
|
type SearchResult = mestionora.SearchResult
|
|
type PathSuggestion = mestionora.PathSuggestion
|
|
|
|
const (
|
|
SearchCandidateLimit = mestionora.SearchCandidateLimit
|
|
SearchExcerptDocumentBytes = mestionora.SearchExcerptDocumentBytes
|
|
SearchExcerptTotalBytes = mestionora.SearchExcerptTotalBytes
|
|
)
|
|
|
|
// SearchPathsInDomain is the legacy trusted-caller entry point. HTTP callers
|
|
// must pass their request policy to the filtered APIs; there is no implicit
|
|
// allow-all entry point in Mestionora itself.
|
|
func (s *Store) SearchPathsInDomain(domainUUID, scope, query string, limit int) ([]SearchResult, error) {
|
|
return s.SearchPathsInDomainFiltered(context.Background(), domainUUID, scope, query, limit, func(string) bool { return true })
|
|
}
|
|
|
|
func (s *Store) SearchPathsInDomainFiltered(ctx context.Context, domainUUID, scope, query string, limit int, allowed func(string) bool) ([]SearchResult, error) {
|
|
return mestionora.NewSQLite(s.DB).SearchPathsInDomainFiltered(ctx, domainUUID, scope, query, limit, allowed)
|
|
}
|
|
|
|
func (s *Store) SearchPathsInDomainWithOptions(ctx context.Context, domainUUID, scope, query string, limit int, allowed func(string) bool, options SearchOptions) ([]SearchResult, error) {
|
|
return mestionora.NewSQLite(s.DB).SearchPathsInDomainWithOptions(ctx, domainUUID, scope, query, limit, allowed, options)
|
|
}
|
|
|
|
func (s *Store) SearchPathSuggestionsInDomain(ctx context.Context, domainUUID, scope, query string, limit int, allowed func(string) bool) ([]PathSuggestion, error) {
|
|
return mestionora.NewSQLite(s.DB).SearchPathSuggestionsInDomain(ctx, domainUUID, scope, query, limit, allowed)
|
|
}
|