Documentation
¶
Overview ¶
Package filesystem implements the built-in bounded filesystem source adapter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrLimit reports that a configured filesystem source exceeded a bound. ErrLimit = errors.New("filesystem source exceeds a limit") // ErrPathRejected reports an unsafe or unsupported filesystem path. ErrPathRejected = errors.New("filesystem source path rejected") // ErrPageToken reports an invalid or stale filesystem page token. ErrPageToken = errors.New("filesystem source page token invalid") // ErrDocumentNotFound reports that a listed document is no longer present. ErrDocumentNotFound = errors.New("filesystem source document not found") // ErrRevisionChanged reports that a document changed after it was listed. ErrRevisionChanged = errors.New("filesystem source document revision changed") )
Functions ¶
func DocumentMediaType ¶
DocumentMediaType reports the deterministic media type of one descriptor.
func DocumentTitle ¶
DocumentTitle derives the deterministic fallback title of one descriptor.
func DocumentURI ¶
func DocumentURI(config knowl.FilesystemSourceConfig, relative string) string
DocumentURI reconstructs the canonical descriptor URI from configuration and the document's source-relative path without touching the source root.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter lists filesystem descriptors without retaining their content.
func NewDefault ¶
func NewDefault() *Adapter
NewDefault constructs an Adapter with conservative local bounds.
type Limits ¶
type Limits struct {
PageSize int
MaxVisited int
MaxDocuments int
MaxPathBytes int
MaxTokenBytes int
MaxFileBytes int64
MaxMetadataBytes int
}
Limits bounds one adapter invocation. Values are validated by New.
func DefaultLimits ¶
func DefaultLimits() Limits
DefaultLimits returns conservative local filesystem adapter bounds.
Click to show internal directories.
Click to hide internal directories.