...

Source file src/github.com/sigstore/cosign/v2/pkg/oci/interface.go

Documentation: github.com/sigstore/cosign/v2/pkg/oci

     1  //
     2  // Copyright 2021 The Sigstore Authors.
     3  //
     4  // Licensed under the Apache License, Version 2.0 (the "License");
     5  // you may not use this file except in compliance with the License.
     6  // You may obtain a copy of the License at
     7  //
     8  //     http://www.apache.org/licenses/LICENSE-2.0
     9  //
    10  // Unless required by applicable law or agreed to in writing, software
    11  // distributed under the License is distributed on an "AS IS" BASIS,
    12  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  // See the License for the specific language governing permissions and
    14  // limitations under the License.
    15  
    16  package oci
    17  
    18  import v1 "github.com/google/go-containerregistry/pkg/v1"
    19  
    20  type SignedEntity interface {
    21  	// Digest returns the sha256 of this image's manifest.
    22  	Digest() (v1.Hash, error)
    23  
    24  	// Signatures returns the set of signatures currently associated with this
    25  	// entity, or the empty equivalent if none are found.
    26  	Signatures() (Signatures, error)
    27  
    28  	// Attestations returns the set of attestations currently associated with this
    29  	// entity, or the empty equivalent if none are found.
    30  	// Attestations are just like a Signature, but they do not contain
    31  	// Base64Signature because it's baked into the payload.
    32  	Attestations() (Signatures, error)
    33  
    34  	// Attachment returns a named entity associated with this entity, or error if not found.
    35  	Attachment(name string) (File, error)
    36  }
    37  

View as plain text