condition

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: MIT Imports: 15 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 {
	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"`
}

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) (ok bool, err error)

Run tests if a specific condition is true

type Spec

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

Spec is an interface that test if condition is met

func Unmarshal

func Unmarshal(condition *Condition) (spec Spec, err error)

Unmarshal decodes a condition struct

Jump to

Keyboard shortcuts

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