util

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortImageArrayString

func SortImageArrayString(images string) string

Types

type ByImageName

type ByImageName []*ImageRef

func (ByImageName) Len

func (b ByImageName) Len() int

func (ByImageName) Less

func (b ByImageName) Less(i, j int) bool

func (ByImageName) String

func (b ByImageName) String() string

func (ByImageName) Swap

func (b ByImageName) Swap(i, j int)

type ImageRef

type ImageRef struct {
	ImageName string `json:"n"`
	ImageTag  string `json:"t"`
}

func NewImageRef

func NewImageRef(s string) ([]*ImageRef, error)

func (ImageRef) DeepCopy

func (i ImageRef) DeepCopy() *ImageRef

func (ImageRef) JsonConfigFile

func (i ImageRef) JsonConfigFile() string

func (ImageRef) String

func (i ImageRef) String() string

type OutputEntry

type OutputEntry struct {
	Source       int   // maps to Consolidator.source
	SourceOffset int64 // offset in the source layer

	Offset         int64
	CompressedSize int64
}

type Protocol

type Protocol struct {
	Images                []*ImageRef                   `json:"refs"`
	Tables                [][]*common.TraceableEntry    `json:"tables"`
	Configs               []string                      `json:"config"`
	DigestList            []*common.TraceableBlobDigest `json:"digests"`
	ImageDigestReferences [][]int                       `json:"idr"`
	Offsets               []int64                       `json:"offsets"`
}

type ProtocolTemplate

type ProtocolTemplate struct {
	Protocol

	OutputQueue   []*OutputEntry `json:"-"`
	RequiredLayer []bool         `json:"-"` // requiredLayer index starts from 1 not 0
}

func (ProtocolTemplate) Json

func (oc ProtocolTemplate) Json() (buf []byte)

func (ProtocolTemplate) Write

func (oc ProtocolTemplate) Write(w io.Writer, beautify bool) error

Jump to

Keyboard shortcuts

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