Help us shape the future of Go! Take the 2026 Go Developer Survey

mocks

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TestSubjectWithDigest = "localhost:5000/net-monitor:v1@sha256:b556844e6e59451caf4429eb1de50aa7c50e4b1cc985f9f5893affe4b73f9935"
	SbomArtifactType      = "application/spdx+json"
	SignatureArtifactType = "application/vnd.cncf.notary.signature"
)

Variables

This section is empty.

Functions

func CreateNewTestStoreForNestedSbom

func CreateNewTestStoreForNestedSbom() referrerstore.ReferrerStore

Types

type MemoryTestStore

type MemoryTestStore struct {
	Subjects  map[digest.Digest]*ocispecs.SubjectDescriptor
	Referrers map[digest.Digest][]ocispecs.ReferenceDescriptor
	Manifests map[digest.Digest]ocispecs.ReferenceManifest
	Blobs     map[digest.Digest][]byte
}

func (*MemoryTestStore) GetBlobContent

func (store *MemoryTestStore) GetBlobContent(_ context.Context, _ common.Reference, digest digest.Digest) ([]byte, error)

func (*MemoryTestStore) GetConfig

func (store *MemoryTestStore) GetConfig() *config.StoreConfig

func (*MemoryTestStore) GetReferenceManifest

func (*MemoryTestStore) GetSubjectDescriptor

func (store *MemoryTestStore) GetSubjectDescriptor(_ context.Context, subjectReference common.Reference) (*ocispecs.SubjectDescriptor, error)

func (*MemoryTestStore) ListReferrers

func (*MemoryTestStore) Name

func (store *MemoryTestStore) Name() string

type TestStore

type TestStore struct {
	References   []ocispecs.ReferenceDescriptor
	ResolveMap   map[string]digest.Digest
	ExtraSubject string
}

func (*TestStore) GetBlobContent

func (s *TestStore) GetBlobContent(_ context.Context, _ common.Reference, _ digest.Digest) ([]byte, error)

func (*TestStore) GetConfig

func (s *TestStore) GetConfig() *config.StoreConfig

func (*TestStore) GetSubjectDescriptor

func (s *TestStore) GetSubjectDescriptor(_ context.Context, subjectReference common.Reference) (*ocispecs.SubjectDescriptor, error)

func (*TestStore) Name

func (s *TestStore) Name() string

Jump to

Keyboard shortcuts

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