Documentation ¶
Index ¶
- Variables
- func BuildNameForConfigVersion(name string, version int) string
- func FilterBuilds(builds []buildv1.Build, predicate PredicateFunc) []buildv1.Build
- func GetInputReference(strategy buildv1.BuildStrategy) *corev1.ObjectReference
- func IsBuildComplete(build *buildv1.Build) bool
- func IsTerminalPhase(phase buildv1.BuildPhase) bool
- func StrategyType(strategy buildv1.BuildStrategy) string
- type BuildPtrSliceByCreationTimestamp
- type BuildSliceByCreationTimestamp
- type PredicateFunc
- type WebHookURLInterface
Constants ¶
This section is empty.
Variables ¶
var ErrTriggerIsNotAWebHook = errors.New("the specified trigger is not a webhook")
Functions ¶
func BuildNameForConfigVersion ¶
BuildNameForConfigVersion returns the name of the version-th build for the config that has the provided name.
func FilterBuilds ¶
func FilterBuilds(builds []buildv1.Build, predicate PredicateFunc) []buildv1.Build
FilterBuilds returns array of builds that satisfies predicate function.
func GetInputReference ¶
func GetInputReference(strategy buildv1.BuildStrategy) *corev1.ObjectReference
GetInputReference returns the From ObjectReference associated with the BuildStrategy.
func IsBuildComplete ¶
IsBuildComplete returns whether the provided build is complete or not
func IsTerminalPhase ¶
func IsTerminalPhase(phase buildv1.BuildPhase) bool
IsTerminalPhase returns true if the provided phase is terminal
func StrategyType ¶
func StrategyType(strategy buildv1.BuildStrategy) string
Types ¶
type BuildPtrSliceByCreationTimestamp ¶
BuildPtrSliceByCreationTimestamp implements sort.Interface for []*Build based on the CreationTimestamp field.
func (BuildPtrSliceByCreationTimestamp) Len ¶
func (b BuildPtrSliceByCreationTimestamp) Len() int
func (BuildPtrSliceByCreationTimestamp) Less ¶
func (b BuildPtrSliceByCreationTimestamp) Less(i, j int) bool
func (BuildPtrSliceByCreationTimestamp) Swap ¶
func (b BuildPtrSliceByCreationTimestamp) Swap(i, j int)
type BuildSliceByCreationTimestamp ¶
BuildSliceByCreationTimestamp implements sort.Interface for []Build based on the CreationTimestamp field.
func (BuildSliceByCreationTimestamp) Len ¶
func (b BuildSliceByCreationTimestamp) Len() int
func (BuildSliceByCreationTimestamp) Less ¶
func (b BuildSliceByCreationTimestamp) Less(i, j int) bool
func (BuildSliceByCreationTimestamp) Swap ¶
func (b BuildSliceByCreationTimestamp) Swap(i, j int)
type PredicateFunc ¶
type PredicateFunc func(interface{}) bool
PredicateFunc is testing an argument and decides does it meet some criteria or not.
func ByBuildConfigPredicate ¶
func ByBuildConfigPredicate(labelValue string) PredicateFunc
ByBuildConfigPredicate matches all builds that have build config annotation or label with specified value.
type WebHookURLInterface ¶
type WebHookURLInterface interface {
WebHookURL(name string, trigger *buildv1.BuildTriggerPolicy) (*url.URL, error)
}
func NewWebhookURLClient ¶
func NewWebhookURLClient(c rest.Interface, ns string) WebHookURLInterface