remote

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 21 Imported by: 8

Documentation

Index

Constants

View Source
const (
	SimpleSigningMediaType = "application/vnd.dev.cosign.simplesigning.v1+json"

	BundleKey           = "dev.sigstore.cosign/bundle"
	DockerMediaTypesEnv = "COSIGN_DOCKER_MEDIA_TYPES"
)

Variables

This section is empty.

Functions

func DefaultMediaTypeGetter added in v0.6.0

func DefaultMediaTypeGetter(b []byte) types.MediaType

func Descriptors

func Descriptors(ref name.Reference, remoteOpts ...remote.Option) ([]v1.Descriptor, error)

func DockerMediaTypes

func DockerMediaTypes() bool

func SignatureImage

func SignatureImage(ref name.Reference, opts ...remote.Option) (v1.Image, error)

SignatureImage returns the existing destination image, or a new, empty one.

func UploadFile

func UploadFile(b []byte, ref name.Reference, layerMt, configMt types.MediaType, remoteOpts ...remote.Option) (v1.Image, error)

func UploadSignature

func UploadSignature(signature, payload []byte, dst name.Reference, opts UploadOpts) (uploadedSig []byte, err error)

Types

type Bundle

type Bundle struct {
	SignedEntryTimestamp strfmt.Base64
	Payload              BundlePayload
}

type BundlePayload added in v0.6.0

type BundlePayload struct {
	Body           interface{} `json:"body"`
	IntegratedTime int64       `json:"integratedTime"`
	LogIndex       int64       `json:"logIndex"`
	LogID          string      `json:"logID"`
}

type Digester

type Digester interface {
	Digest() (v1.Hash, error)
}

func UploadFiles

func UploadFiles(ref name.Reference, files []File, getMt MediaTypeGetter, remoteOpts ...remote.Option) (Digester, error)

type File

type File interface {
	Contents() ([]byte, error)
	Platform() *v1.Platform
	String() string
	Path() string
}

func FileFromFlag added in v1.1.0

func FileFromFlag(s string) File

type MediaTypeGetter added in v0.6.0

type MediaTypeGetter func(b []byte) types.MediaType

type UploadOpts

type UploadOpts struct {
	Cert                  []byte
	Chain                 []byte
	DupeDetector          signature.Verifier
	Bundle                *Bundle
	AdditionalAnnotations map[string]string
	RemoteOpts            []remote.Option
	MediaType             string
}

Jump to

Keyboard shortcuts

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