releasetrustfixture

package
v0.7.26 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocumentTransport

type DocumentTransport struct {
	// contains filtered or unexported fields
}

func (*DocumentTransport) Calls

func (transport *DocumentTransport) Calls() int

func (*DocumentTransport) FetchReleaseDocument

func (*DocumentTransport) FirstDeadlineRemaining added in v0.7.8

func (transport *DocumentTransport) FirstDeadlineRemaining() (time.Duration, bool)

func (*DocumentTransport) SetBlocked added in v0.7.7

func (transport *DocumentTransport) SetBlocked(blocked bool)

type Fixture

type Fixture struct {
	Service               *releasetrust.ReleaseTrustService
	ServiceSet            *releasetrust.ServiceSet
	Identity              releasetrust.ReleaseIdentity
	SourcePolicy          releasecontract.SourcePolicyV2
	Package               pluginpkg.Package
	PackageBytes          []byte
	Metadata              releasecontract.ReleaseMetadataV8
	MetadataBytes         []byte
	MetadataSignature     []byte
	PackageSignature      releasecontract.PackageSignatureV1
	SigningPrivateKey     ed25519.PrivateKey
	CapabilityBundle      *capabilitycontract.Bundle
	DocumentTransport     *DocumentTransport
	LedgerTransport       *LedgerTransport
	StateStore            *StateStore
	TrustedTime           *TrustedTimeAdapter
	ReleaseArtifactSHA256 string
	GeneratedAt           time.Time
	ExpiresAt             time.Time
}

func New

func New(packageBytes []byte, options Options) (*Fixture, error)

func (*Fixture) AdvanceTrustedTime added in v0.7.21

func (fixture *Fixture) AdvanceTrustedTime(ctx context.Context) (releasetrust.TrustedTimeStatus, error)

AdvanceTrustedTime commits a valid successor state through the same trust service used by host tests. It is intentionally test-only fixture support.

func (*Fixture) SetCapabilityBundle

func (fixture *Fixture) SetCapabilityBundle(bundle capabilitycontract.Bundle)

type LedgerTransport

type LedgerTransport struct {
	// contains filtered or unexported fields
}

func (*LedgerTransport) Calls

func (transport *LedgerTransport) Calls() int

func (*LedgerTransport) FetchSigningLedgerArtifact

func (transport *LedgerTransport) FetchSigningLedgerArtifact(_ context.Context, request releasetrust.SigningLedgerRequest) (releasetrust.SigningLedgerResult, error)

type Options

type Options struct {
	SourceID             string
	Channel              string
	SourceType           string
	SourceClass          string
	InstallPolicy        string
	DowngradePolicy      string
	AllowedArtifactHosts []string
	HostRequirements     []releasecontract.ReleaseHostRequirement
	GeneratedAt          time.Time
	ExpiresAt            time.Time
	StateStore           *StateStore
	TrustedTime          *TrustedTimeAdapter
	UseMonotonicState    bool
	RotateSigningLedger  bool
}

type StateStore

type StateStore struct {
	// contains filtered or unexported fields
}

func (*StateStore) CommittedBytes added in v0.7.19

func (store *StateStore) CommittedBytes() []byte

func (*StateStore) CompareAndSwapMonotonicState added in v0.7.26

func (store *StateStore) CompareAndSwapMonotonicState(_ context.Context, request releasetrust.MonotonicStateCASRequest) (releasetrust.StateMutationOutcome, error)

func (*StateStore) ReadMonotonicState added in v0.7.26

func (*StateStore) ReplaceCommittedBytes added in v0.7.19

func (store *StateStore) ReplaceCommittedBytes(value []byte)

func (*StateStore) SetLoadHook added in v0.7.19

func (store *StateStore) SetLoadHook(hook func())

type TrustedTimeAdapter

type TrustedTimeAdapter struct {
	// contains filtered or unexported fields
}

func (*TrustedTimeAdapter) Observe

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL