core

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	ReferrerStores []referrerstore.ReferrerStore
	PolicyEnforcer policyprovider.PolicyProvider
	Verifiers      []vr.ReferenceVerifier
	Config         *config.ExecutorConfig
}

Executor describes an execution engine that queries the stores for the supply chain content, runs them through the verifiers as governed by the policy enforcer

func (Executor) GetMutationRequestTimeout

func (executor Executor) GetMutationRequestTimeout() time.Duration

func (Executor) GetVerifyRequestTimeout

func (executor Executor) GetVerifyRequestTimeout() time.Duration

func (Executor) VerifySubject

func (executor Executor) VerifySubject(ctx context.Context, verifyParameters e.VerifyParameters) (types.VerifyResult, error)

TODO Logging within executor VerifySubject verifies the subject and returns results.

type ExecutorWithCache

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

ExecutorWithCache wraps the executor with a verifier cache

func (ExecutorWithCache) VerifySubject

func (executor ExecutorWithCache) VerifySubject(ctx context.Context, verifyParameters executor.VerifyParameters) (types.VerifyResult, error)

type TestVerifier

type TestVerifier struct {
	CanVerifyFunc func(artifactType string) bool
	VerifyResult  func(artifactType string) bool
	// contains filtered or unexported fields
}

func (*TestVerifier) CanVerify

func (s *TestVerifier) CanVerify(_ context.Context, referenceDescriptor ocispecs.ReferenceDescriptor) bool

func (*TestVerifier) GetNestedReferences

func (s *TestVerifier) GetNestedReferences() []string

func (*TestVerifier) Name

func (s *TestVerifier) Name() string

func (*TestVerifier) Type

func (s *TestVerifier) Type() string

func (*TestVerifier) Verify

Jump to

Keyboard shortcuts

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