Documentation
¶
Index ¶
- func CountSections(d interface{ ... }) int
- func Metadata(d Document) map[string]any
- func WalkSections(d interface{ ... }, fn func(s Section) error) error
- type BaseCollection
- type Collection
- type CollectionID
- type CollectionStats
- type Document
- type DocumentID
- type PersistedCollection
- type PersistedDocument
- type Section
- type SectionID
- type WithID
- type WithLifecycle
- type WithMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountSections ¶
Types ¶
type BaseCollection ¶
type BaseCollection struct {
// contains filtered or unexported fields
}
func NewCollection ¶
func NewCollection(id CollectionID, label string, description string) *BaseCollection
func (*BaseCollection) Description ¶
func (c *BaseCollection) Description() string
Description implements Collection.
type Collection ¶
type Collection interface {
WithID[CollectionID]
Label() string
Description() string
}
type CollectionID ¶
type CollectionID string
func NewCollectionID ¶
func NewCollectionID() CollectionID
type CollectionStats ¶
type CollectionStats struct {
TotalDocuments int64
}
type PersistedCollection ¶
type PersistedCollection interface {
Collection
WithLifecycle
}
type PersistedDocument ¶
type PersistedDocument interface {
Document
WithLifecycle
}
type WithMetadata ¶ added in v0.0.3
WithMetadata is an optional capability a Document may implement to carry arbitrary key/value metadata (author, tags, dates, ...). It is used for metadata filtering at search time. Implementations that don't need metadata can simply not implement it.
Click to show internal directories.
Click to hide internal directories.