Documentation
¶
Overview ¶
Package corpus defines the neutral record unit that Stroma indexes.
Index ¶
Constants ¶
View Source
const ( // DefaultKind is used when callers omit a more specific record kind. DefaultKind = "artifact" // FormatMarkdown stores Markdown bodies that can be heading-chunked. FormatMarkdown = "markdown" // FormatPlaintext stores plain text bodies as a single chunk. FormatPlaintext = "plaintext" )
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
Fingerprint summarizes a set of records deterministically.
func HashRecord ¶
HashRecord returns a deterministic content hash for a normalized record.
Types ¶
type Record ¶
type Record struct {
Ref string
Kind string
Title string
SourceRef string
BodyFormat string
BodyText string
ContentHash string
Metadata map[string]string
}
Record is the neutral corpus unit Stroma indexes.
func (Record) Normalized ¶
Normalized returns a trimmed, validated record with safe defaults applied.
Click to show internal directories.
Click to hide internal directories.