remote

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 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 struct {
	Path     string
	Platform *v1.Platform
}

func (*File) String

func (f *File) String() string

type MediaTypeGetter added in v0.6.0

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

type StaticLayer

type StaticLayer struct {
	B  []byte
	Mt types.MediaType
}

func (*StaticLayer) Compressed

func (l *StaticLayer) Compressed() (io.ReadCloser, error)

Compressed returns an io.ReadCloser for the compressed layer contents.

func (*StaticLayer) DiffID

func (l *StaticLayer) DiffID() (v1.Hash, error)

DiffID returns the Hash of the uncompressed layer.

func (*StaticLayer) Digest

func (l *StaticLayer) Digest() (v1.Hash, error)

func (*StaticLayer) MediaType

func (l *StaticLayer) MediaType() (types.MediaType, error)

MediaType returns the media type of the Layer.

func (*StaticLayer) Size

func (l *StaticLayer) Size() (int64, error)

Size returns the compressed size of the Layer.

func (*StaticLayer) Uncompressed

func (l *StaticLayer) Uncompressed() (io.ReadCloser, error)

Uncompressed returns an io.ReadCloser for the uncompressed layer contents.

type UploadOpts

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

Jump to

Keyboard shortcuts

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