condition

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	Result string // Result store the condition result after a condition run. This variable can't be set by an updatecli configuration
	Config Config // Config defines condition input parameters
}

Condition defines which condition needs to be met in order to update targets based on the source output

func (*Condition) Run

func (c *Condition) Run(source string) (err error)

Run tests if a specific condition is true

type Conditioner added in v0.10.0

type Conditioner interface {
	Condition(version string) (bool, error)
	ConditionFromSCM(version string, scm scm.Scm) (bool, error)
}

Conditioner is an interface that test if condition is met

func Unmarshal

func Unmarshal(condition *Condition) (conditioner Conditioner, err error)

Unmarshal decodes a condition struct

type Config added in v0.10.0

type Config struct {
	DependsOn          []string `yaml:"depends_on"`
	Name               string
	Kind               string
	Prefix             string // Deprecated in favor of Transformers on 2021/01/3
	Postfix            string // Deprecated in favor of Transformers on 2021/01/3
	Transformers       transformer.Transformers
	Spec               interface{}
	Scm                map[string]interface{}
	SourceID           string `yaml:"sourceID"`
	DisableSourceInput bool
}

Config defines conditions input parameters

Jump to

Keyboard shortcuts

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