fakev1layer

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package fakev1layer provides a fake implementation of the v1.Layer interface for testing purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeV1Layer

type FakeV1Layer struct {
	// contains filtered or unexported fields
}

FakeV1Layer is a fake implementation of the v1.Layer interface for testing purposes.

func New

func New(diffID string, buildCommand string, isEmpty bool, uncompressed io.ReadCloser) *FakeV1Layer

New creates a new FakeV1Layer.

func (*FakeV1Layer) Compressed

func (fakeV1Layer *FakeV1Layer) Compressed() (io.ReadCloser, error)

Compressed is not used for the purposes of layer scanning, thus a nil value is returned.

func (*FakeV1Layer) DiffID

func (fakeV1Layer *FakeV1Layer) DiffID() (v1.Hash, error)

DiffID returns the diffID of the layer.

func (*FakeV1Layer) Digest

func (fakeV1Layer *FakeV1Layer) Digest() (v1.Hash, error)

Digest is not used for the purposes of layer scanning, thus an empty hash is returned.

func (*FakeV1Layer) MediaType

func (fakeV1Layer *FakeV1Layer) MediaType() (types.MediaType, error)

MediaType returns a fake media type.

func (*FakeV1Layer) Size

func (fakeV1Layer *FakeV1Layer) Size() (int64, error)

Size is not used for the purposes of layer scanning, thus a zero value is returned.

func (*FakeV1Layer) Uncompressed

func (fakeV1Layer *FakeV1Layer) Uncompressed() (io.ReadCloser, error)

Uncompressed returns the uncompressed tar reader.

Jump to

Keyboard shortcuts

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