blob

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob

type Blob interface {
	Common
	RawBody() ([]byte, error)
}

Blob interface is used for returning blobs

type Common

type Common interface {
	Digest() digest.Digest
	Length() int64
	MediaType() string
	Response() *http.Response
	RawHeaders() http.Header
	SetMeta(ref types.Ref, d digest.Digest, cl int64)
	SetResp(resp *http.Response)
}

Common interface is provided by all Blob implementations

type OCIConfig

type OCIConfig interface {
	Blob
	GetConfig() ociv1.Image
}

OCIConfig wraps an OCI Config struct extracted from a Blob

func NewOCIConfig

func NewOCIConfig(ociImage ociv1.Image) OCIConfig

NewOCIConfig creates a new BlobOCIConfig from an OCI Image

type Reader

type Reader interface {
	Blob
	io.ReadCloser
	ToOCIConfig() (OCIConfig, error)
}

Reader is an unprocessed Blob with an available ReadCloser for reading the Blob

func NewReader

func NewReader(rdr io.ReadCloser) Reader

NewReader creates a new reader

Jump to

Keyboard shortcuts

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