Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Supported envelope format. COSE = "cose" JWS = "jws" // MediaTypePayloadV1 is the supported content type for signature's payload. MediaTypePayloadV1 = "application/vnd.cncf.notary.payload.v1+json" )
Variables ¶
This section is empty.
Functions ¶
func DescriptorFromSignaturePayload ¶
func DescriptorFromSignaturePayload(payload *signature.Payload) (*ocispec.Descriptor, error)
DescriptorFromPayload parses a signature payload and returns the descriptor that was signed. Note: the descriptor was signed but may not be trusted
func GetEnvelopeMediaType ¶
GetEnvelopeMediaType converts the envelope type to mediaType name.
func ValidatePayloadContentType ¶
ValidatePayloadContentType validates signature payload's content type.
Types ¶
type Payload ¶
type Payload struct {
TargetArtifact ocispec.Descriptor `json:"targetArtifact"`
}
Payload describes the content that gets signed.
Click to show internal directories.
Click to hide internal directories.