buildinfo

package
v0.10.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExportNone doesn't export build dependencies.
	ExportNone ExportMode = 0
	// ExportImageConfig exports build dependencies to
	// the image config.
	ExportImageConfig = 1 << iota
	// ExportMetadata exports build dependencies as metadata to
	// the exporter response.
	ExportMetadata
	// ExportAll exports build dependencies as metadata and
	// image config.
	ExportAll = -1
)
View Source
const ExportDefault = ExportAll

ExportDefault is the default export mode for buildinfo opt.

Variables

This section is empty.

Functions

func Decode

func Decode(enc string) (bi binfotypes.BuildInfo, _ error)

Decode decodes a base64 encoded build info.

func Encode

func Encode(ctx context.Context, buildInfo []byte, buildSources map[string]string) ([]byte, error)

Encode encodes build info.

func Format

func Format(dt []byte, format FormatOpts) (_ []byte, err error)

Format formats build info.

func GetMetadata

func GetMetadata(metadata map[string][]byte, key string, reqFrontend string, reqAttrs map[string]string) ([]byte, error)

GetMetadata returns buildinfo metadata for the specified key. If the key is already there, result will be merged.

Types

type ExportMode

type ExportMode int

ExportMode represents the export mode for buildinfo opt.

func ParseExportMode

func ParseExportMode(s string) (ExportMode, error)

ParseExportMode returns the export mode matching a string.

type FormatOpts

type FormatOpts struct {
	RemoveAttrs bool
}

FormatOpts holds build info format options.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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