artifacts

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Digest

func Digest(c WithRawConfig) (v1.Hash, error)

func Size

func Size(c WithRawConfig) (int64, error)

Types

type Config

type Config interface {
	// Raw returns the config bytes
	Raw() ([]byte, error)

	Digest() (v1.Hash, error)

	MediaType() (types.MediaType, error)

	Size() (int64, error)
}

func ToConfig

func ToConfig(i Marshallable, opts ...ConfigOption) Config

ToConfig takes anything that is marshallabe and converts it into a Config

type ConfigOption

type ConfigOption func(*marshallableConfig)

func WithConfigMediaType

func WithConfigMediaType(mediaType string) ConfigOption

type Marshallable

type Marshallable interface{}

type OCI

type OCI interface {
	MediaType() string

	Manifest() (*v1.Manifest, error)

	RawConfig() ([]byte, error)

	Layers() ([]v1.Layer, error)
}

OCI is the bare minimum we need to represent an artifact in an oci layout

At a high level, it is not constrained by an Image's config, manifests, and layer ordinality
This specific implementation fully encapsulates v1.Layer's within a more generic form

type OCICollection

type OCICollection interface {
	// Contents returns the list of contents in the collection
	Contents() (map[string]OCI, error)
}

type WithRawConfig

type WithRawConfig interface {
	Raw() ([]byte, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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