Documentation
¶
Overview ¶
Package renderartifact holds authenticated immutable auxiliary render output.
Index ¶
- func ReconcileSnapshot(authority *Authority, base *Snapshot, desired *Snapshot) (*Snapshot, *Delta, error)
- type Artifact
- type Authority
- type Builder
- type Content
- type Delta
- type Descriptor
- type Family
- type Handle
- type Snapshot
- func (s *Snapshot) ExactEqual(other *Snapshot) (bool, error)
- func (s *Snapshot) Len() (int, error)
- func (s *Snapshot) Lookup(descriptor Descriptor) (*Handle, bool, error)
- func (s *Snapshot) SameRoot(other *Snapshot) (bool, error)
- func (s *Snapshot) ValidateAuthentication() error
- func (s *Snapshot) Walk(visit func(*Artifact) error) error
- type SnapshotChange
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Artifact ¶
type Artifact struct {
// contains filtered or unexported fields
}
Artifact is an authenticated descriptor and immutable content pair.
func (*Artifact) Descriptor ¶
func (a *Artifact) Descriptor() (Descriptor, error)
Descriptor returns a detached descriptor value.
func (*Artifact) ValidateAuthentication ¶
ValidateAuthentication verifies the artifact's exact ownership chain.
type Authority ¶
type Authority struct {
// contains filtered or unexported fields
}
Authority owns one lineage of exact snapshot roots.
func NewAuthority ¶
func NewAuthority() *Authority
NewAuthority creates an isolated snapshot lineage.
func (*Authority) ValidateAuthentication ¶
ValidateAuthentication verifies the authority's exact identity.
func (*Authority) ValidateSnapshot ¶
ValidateSnapshot verifies that snapshot is authenticated by this authority.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder seals one complete canonical artifact set.
func NewBuilder ¶
NewBuilder starts a complete set under authority. Previous must belong to the same authority so exact roots and unchanged artifacts can be reused.
type Content ¶
type Content struct {
// contains filtered or unexported fields
}
Content is one authenticated immutable artifact payload.
func NewDocumentContent ¶
func NewDocumentContent(document rendercontent.Document, final string, direct bool) (*Content, error)
NewDocumentContent retains an authenticated source document and seals the final artifact bytes. Direct content must equal the document exactly.
func NewLiteralContent ¶
NewLiteralContent detaches and seals literal artifact bytes.
func (*Content) ValidateAuthentication ¶
ValidateAuthentication verifies the exact immutable representation in constant time.
type Delta ¶
type Delta struct {
// contains filtered or unexported fields
}
Delta is an authenticated transition between exact artifact roots.
func (*Delta) Changes ¶
func (d *Delta) Changes() ([]SnapshotChange, error)
Changes returns the authenticated changed artifacts without materializing content.
func (*Delta) RequiresFullValidation ¶
RequiresFullValidation reports set or descriptor changes that affect unchanged consumers.
func (*Delta) ValidateAuthentication ¶
ValidateAuthentication verifies the exact transition and every changed record.
type Descriptor ¶
type Descriptor struct {
Family Family
// Name is Filename for general families and the canonical path identity otherwise.
Name string
// Path is the compatibility output path and remains part of equality.
Path string
// RuntimePath is the path declared in the render plan. Empty defaults to Path.
RuntimePath string
// ReloadOnChange is effective General metadata; every other family normalizes false.
ReloadOnChange bool
}
Descriptor is the deployment-relevant identity and metadata of one artifact.
type Family ¶
type Family uint8
Family identifies one legacy AuxiliaryFiles family without collapsing files that happen to share deployment behaviour.
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle proves the exact artifact currently stored under one canonical key.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
Snapshot is an authenticated immutable sorted artifact set.
func (*Snapshot) ExactEqual ¶
ExactEqual compares every descriptor and final byte when roots differ; digests only reject.
func (*Snapshot) Lookup ¶
func (s *Snapshot) Lookup(descriptor Descriptor) (*Handle, bool, error)
Lookup returns an exact handle for descriptor's canonical key.
func (*Snapshot) ValidateAuthentication ¶
ValidateAuthentication verifies the exact immutable root in constant time.
type SnapshotChange ¶
SnapshotChange is one authenticated artifact transition.
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
Transaction atomically path-copies artifact changes from one exact base.
func BeginTransaction ¶
func BeginTransaction(authority *Authority, base *Snapshot) (*Transaction, error)
BeginTransaction starts an atomic edit against base.
func (*Transaction) Commit ¶
func (t *Transaction) Commit() (*Snapshot, *Delta, error)
Commit seals the next snapshot and its exact base-to-next proof.
func (*Transaction) Delete ¶
func (t *Transaction) Delete(expected *Handle) error
Delete removes only the exact artifact proven by expected.
func (*Transaction) Insert ¶
func (t *Transaction) Insert(descriptor Descriptor, content *Content) error
Insert adds an artifact only when its canonical key is absent from base.
func (*Transaction) Replace ¶
func (t *Transaction) Replace(expected *Handle, descriptor Descriptor, content *Content) error
Replace changes only the exact artifact proven by expected.