specialimage

package
v27.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigTarget

func ConfigTarget(dir string) (*ocispec.Index, error)

ConfigTarget creates an image index with an image config being used as an image target instead of a manifest or index.

func Dangling

func Dangling(dir string) (*ocispec.Index, error)

Dangling creates an image with no layers and no tag. It also has an extra org.mobyproject.test.specialimage=1 label set. Layout: OCI.

func EmptyFS

func EmptyFS(dir string) (*ocispec.Index, error)

EmptyFS builds an image with an empty rootfs. Layout: Legacy Docker Archive See https://github.com/docker/docker/pull/5262 and also https://github.com/docker/docker/issues/4242

func EmptyIndex

func EmptyIndex(dir string) (*ocispec.Index, error)

EmptyIndex creates an image index with no manifests. This is equivalent to `tianon/scratch:index`.

func Load

func Load(ctx context.Context, t *testing.T, apiClient client.APIClient, imageFunc SpecialImageFunc) string

func MultiLayer

func MultiLayer(dir string) (*ocispec.Index, error)

func MultiLayerCustom

func MultiLayerCustom(dir string, imageRef string, layers []SingleFileLayer) (*ocispec.Index, error)

func MultiPlatform

func MultiPlatform(dir string, imageRef string, imagePlatforms []ocispec.Platform) (*ocispec.Index, []ocispec.Descriptor, error)

func RandomSinglePlatform

func RandomSinglePlatform(dir string, platform ocispec.Platform, source rand.Source) (*ocispec.Index, error)

func TextPlain

func TextPlain(dir string) (*ocispec.Index, error)

TextPlain creates an non-container image that only contains a text/plain blob.

func TwoPlatform

func TwoPlatform(dir string) (*ocispec.Index, error)

Types

type FileInLayer

type FileInLayer struct {
	Path    string
	Content []byte
}

type SingleFileLayer

type SingleFileLayer struct {
	Name    string
	Content []byte
}

type SpecialImageFunc

type SpecialImageFunc func(string) (*ocispec.Index, error)

Jump to

Keyboard shortcuts

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