layer

package
v0.3.19 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LayerProcess

func LayerProcess(ctx context.Context, args []string)

Types

type FileMetadata

type FileMetadata struct {
	Mode       *string           `json:"mode,omitempty"`
	Uid        *int              `json:"uid,omitempty"`
	Gid        *int              `json:"gid,omitempty"`
	Uname      *string           `json:"uname,omitempty"`
	Gname      *string           `json:"gname,omitempty"`
	Mtime      *string           `json:"mtime,omitempty"`
	PAXRecords map[string]string `json:"pax_records,omitempty"`
}

FileMetadata represents the metadata that can be set on files in a layer

type LayerMetadata

type LayerMetadata struct {
	Defaults      *FileMetadata
	FileOverrides map[string]*FileMetadata
	// contains filtered or unexported fields
}

LayerMetadata holds all metadata configuration for a layer

func ParseLayerMetadata

func ParseLayerMetadata(defaultJSON string, fileMetadata map[string]string) (*LayerMetadata, error)

ParseLayerMetadata parses the default metadata and file-specific metadata

func (*LayerMetadata) ApplyToHeader

func (lm *LayerMetadata) ApplyToHeader(hdr *tar.Header, pathInImage string) error

ApplyToHeader applies the metadata to a tar header, with file-specific overrides taking precedence This implements the tree.MetadataProvider interface

func (*LayerMetadata) VerifyAllFileMetadataUsed

func (lm *LayerMetadata) VerifyAllFileMetadataUsed() error

VerifyAllFileMetadataUsed checks if all file metadata entries have been used at least once Returns an error if any entries are unused, listing all unused paths

Jump to

Keyboard shortcuts

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