Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Canonicalizer ¶
type Canonicalizer interface {
Canonicalize(
ctx context.Context,
raw []byte,
) (ParsedDocument, error)
}
Canonicalizer is the narrow validation capability needed by artifact-family hydration and linked-source descriptor readers.
type Codec ¶
type Codec interface {
Key() SchemaKey
JSONSchema() []byte
// Canonicalize strictly decodes, validates, calculates or verifies the
// optional supplied digest, and returns canonical JSON containing the
// calculated digest. It does not persist source content.
Canonicalize(
ctx context.Context,
raw []byte,
) (ParsedDocument, error)
}
type ParsedDocument ¶
type ParsedDocument struct {
Key SchemaKey
Digest cryptoutil.Digest
Raw json.RawMessage
}
func (ParsedDocument) Clone ¶
func (d ParsedDocument) Clone() ParsedDocument
func (ParsedDocument) Validate ¶
func (d ParsedDocument) Validate() error
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func (*Registry) Canonicalize ¶
Click to show internal directories.
Click to hide internal directories.