layers

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ELFStart = [4]byte{127, 69, 76, 70} // this is { 0x7f, 'E', 'L', 'F' }

Functions

func CalculateELFMetadata added in v1.7.2

func CalculateELFMetadata(reader io.Reader) (bool, string, error)

CalculateELFMetadata returns whether the file is an ELF and if so, returns its SHA256

Types

type ExecutableFile

type ExecutableFile struct {
	Digest          string       `json:"digest"` // the file's SHA256
	Path            string       `json:"path"`
	Size            uint64       `json:"size"`
	Category        FileCategory `json:"file_category"`
	InSquashedImage bool         `json:"in_squashed_image"`
}

type FileCategory added in v1.7.2

type FileCategory string
const (
	// CategoryElf is a linux executable
	CategoryElf FileCategory = "ELF"
)

Keep below definitions in sync with whatever is on used on the control plane for consistent conversions.

type Layer

type Layer struct {
	Digest  string           `json:"digest"`
	Command string           `json:"command"`
	Size    uint64           `json:"size"`
	Index   int              `json:"index"`
	IsEmpty bool             `json:"is_empty"`
	Files   []ExecutableFile `json:"files"`
}

Jump to

Keyboard shortcuts

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