Documentation ¶
Index ¶
- Constants
- func CreateTempDir(t *testing.T, dir, pattern string) string
- func GetMockSigner(ctx context.Context) (dsse.SignerVerifier, error)
- func Setup(t *testing.T) (context.Context, dsse.SignerVerifier)
- type AnnotatedStatement
- type MockRegistryResolver
- type MockResolver
- func (r MockResolver) Attestations(ctx context.Context, mediaType string) ([]*attestation.Envelope, error)
- func (r MockResolver) ImageDescriptor(ctx context.Context) (*v1.Descriptor, error)
- func (r MockResolver) ImageName(ctx context.Context) (string, error)
- func (r MockResolver) ImagePlatform(ctx context.Context) (*v1.Platform, error)
Constants ¶
View Source
const ( USE_MOCK_TL = true USE_MOCK_KMS = true USE_MOCK_POLICY = true AwsRegion = "us-east-1" AwsKmsKeyArn = "arn:aws:kms:us-east-1:175142243308:alias/doi-signing" // sandbox )
Variables ¶
This section is empty.
Functions ¶
func GetMockSigner ¶ added in v0.1.2
func GetMockSigner(ctx context.Context) (dsse.SignerVerifier, error)
Types ¶
type AnnotatedStatement ¶ added in v0.1.3
type AnnotatedStatement struct { OCIDescriptor *v1.Descriptor InTotoStatement *intoto.Statement Annotations map[string]string }
func ExtractAnnotatedStatements ¶ added in v0.1.3
func ExtractAnnotatedStatements(path string, mediaType string) ([]*AnnotatedStatement, error)
func ExtractStatementsFromIndex ¶ added in v0.1.5
func ExtractStatementsFromIndex(idx v1.ImageIndex, mediaType string) ([]*AnnotatedStatement, error)
type MockRegistryResolver ¶ added in v0.1.8
type MockRegistryResolver struct { Subject *v1.Descriptor ImageNameStr string *MockResolver }
func (*MockRegistryResolver) ImageDescriptor ¶ added in v0.1.8
func (r *MockRegistryResolver) ImageDescriptor(ctx context.Context) (*v1.Descriptor, error)
type MockResolver ¶ added in v0.1.8
type MockResolver struct {
Envs []*attestation.Envelope
}
func (MockResolver) Attestations ¶ added in v0.1.8
func (r MockResolver) Attestations(ctx context.Context, mediaType string) ([]*attestation.Envelope, error)
func (MockResolver) ImageDescriptor ¶ added in v0.1.8
func (r MockResolver) ImageDescriptor(ctx context.Context) (*v1.Descriptor, error)
func (MockResolver) ImageName ¶ added in v0.1.8
func (r MockResolver) ImageName(ctx context.Context) (string, error)
func (MockResolver) ImagePlatform ¶ added in v0.1.8
Click to show internal directories.
Click to hide internal directories.