dedup

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildArgInput

type BuildArgInput struct {
	// Name is the name of the build arg.
	Name string `json:"name"`
	// ConstantValue is the constant value of this build arg.
	ConstantValue string `json:"constantValue"`
	// DefaultValue represents the default value of the build arg.
	// Not used as part of the hashing.
	DefaultValue string `json:"-"`
}

BuildArgInput represents the conditions in which a build arg is passed.

func (BuildArgInput) Equals

func (bai BuildArgInput) Equals(other BuildArgInput) bool

Equals compares to another BuildArgInput for equality.

func (BuildArgInput) IsDefaultValue

func (bai BuildArgInput) IsDefaultValue() bool

IsDefaultValue returns whether the value of the BuildArgInput is set as the same as the default.

type TargetInput

type TargetInput struct {
	// TargetCanonical is the identifier of this target in canonical form.
	TargetCanonical string `json:"targetCanonical"`
	// BuildArgs are the build args used to build this target.
	BuildArgs []BuildArgInput `json:"buildArgs"`
	// Platform is the target platform of the target.
	Platform string `json:"platform"`
	// AllowPrivileged is true if the target will allow privileged access
	AllowPrivileged bool `json:"allowPrivileged"`
}

TargetInput represents the conditions in which a target is invoked.

func (TargetInput) Hash

func (ti TargetInput) Hash() (string, error)

Hash returns a hash of the target input.

func (TargetInput) HashNoTag

func (ti TargetInput) HashNoTag() (string, error)

HashNoTag returns a hash of the target input with tag info stripped away.

func (TargetInput) WithBuildArgInput

func (ti TargetInput) WithBuildArgInput(bai BuildArgInput) TargetInput

WithBuildArgInput returns a clone of the current target input, with a BuildArgInput added to it.

func (TargetInput) WithFilterBuildArgs added in v0.6.15

func (ti TargetInput) WithFilterBuildArgs(buildArgNames map[string]bool) TargetInput

WithFilterBuildArgs returns a clone of the current target input, with filtered build args, based on an include-list of names.

Jump to

Keyboard shortcuts

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