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

envelope

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

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

func GetEnvelopeMediaType(sigFormat string) (string, error)

GetEnvelopeMediaType converts the envelope type to mediaType name.

func ValidatePayloadContentType

func ValidatePayloadContentType(payload *signature.Payload) error

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.

Jump to

Keyboard shortcuts

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