dedup

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MPL-2.0 Imports: 5 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"`
	// IsConstant represents whether the build arg has a constant value.
	IsConstant bool `json:"isConstant"`
	// ConstantValue is the constant value of this build arg. Only set if IsConstant is true.
	ConstantValue string `json:"constantValue"`
	// DefaultValue represents the default value of the build arg.
	DefaultValue string `json:"defaultConstant"`
	// VariableFromInput is the definition of the conditions in which the build arg was formed.
	// It is only set if IsConstant is false.
	VariableFromInput VariableFromInput `json:"variableFromInput"`
}

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 BuildArgInput is constant and its value 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"`
}

TargetInput represents the conditions in which a target is invoked.

func (TargetInput) Equals

func (ti TargetInput) Equals(other TargetInput) bool

Equals compares to another TargetInput for equality.

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.

type VariableFromInput

type VariableFromInput struct {
	// TargetInput is the target where this variable's expression is executed.
	TargetInput TargetInput `json:"targetInput"`
	// Index is the order number of the expression for the build arg. Starts at 0 for each target.
	Index int `json:"index"`
}

VariableFromInput represents the conditions in which a variable build arg is passed.

func (VariableFromInput) Equals

func (vfi VariableFromInput) Equals(other VariableFromInput) bool

Equals compares to another VariableFromInput for equality.

Jump to

Keyboard shortcuts

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