action

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceRefIndexKey     = ".metadata.sourceref"
	ArtifactOwnerIndexKey = ".metadata.artifactowner"
)

Variables

This section is empty.

Functions

func DefaultRequestMapper

func DefaultRequestMapper(list []runtime.Object) []reconcile.Request

func Setup

func Setup[T any, P ActionResourcePointerType[T]](ctx context.Context, mgr ctrl.Manager, client ctrlclient.Client, options ...Option) (*builder.Builder, error)

func SourceReferenceIndex

func SourceReferenceIndex[T ActionResource]() func(o ctrlclient.Object) []string

func TriggerAlwaysPredicate

func TriggerAlwaysPredicate(_ ActionResource, _ ArtifactSource) bool

Types

type ActionResource

type ActionResource interface {
	ctrlclient.Object
	GetSourceRef() (utils.SourceRefProvider, error)
}

type ActionResourcePointerType

type ActionResourcePointerType[T any] interface {
	*T
	ActionResource
}

type ArtifactSource

type ArtifactSource interface {
	GetArtifact() *sourcev1.Artifact
}

func GetSource

func GetSource(ctx context.Context, client ctrlclient.Client, action ActionResource, options ...Option) (ArtifactSource, error)

type Option

type Option interface {
	Apply(options *Options)
}

func WithAllowedSourceKinds

func WithAllowedSourceKinds(m SourceMatcher) Option

func WithForOptions

func WithForOptions(foroption ...builder.ForOption) Option

func WithNoCrossNamespaceRefs

func WithNoCrossNamespaceRefs(b ...bool) Option

type Options

type Options struct {
	ForOptions           []builder.ForOption
	NoCrossNamespaceRefs *bool
	AllowedSourceKinds   SourceMatcher
	TriggerPredicate     TriggerPredicate
	RequestMapper        RequestMapper
}

func EvalOptions

func EvalOptions(optList ...Option) *Options

func (*Options) Apply

func (o *Options) Apply(opts *Options)

func (*Options) CrossNamespaceRefsForbidden

func (o *Options) CrossNamespaceRefsForbidden() bool

type RequestMapper

type RequestMapper func(list []runtime.Object) []reconcile.Request

type SourceMatcher

type SourceMatcher = matchers.SourceMatcher

type SourceRevisionChangePredicate

type SourceRevisionChangePredicate struct {
	predicate.Funcs
}

func (SourceRevisionChangePredicate) Update

type TriggerPredicate

type TriggerPredicate func(action ActionResource, art ArtifactSource) bool

type WithRequestMapper

type WithRequestMapper RequestMapper

func (WithRequestMapper) Apply

func (o WithRequestMapper) Apply(opts *Options)

type WithTriggerPredicate

type WithTriggerPredicate TriggerPredicate

func (WithTriggerPredicate) Apply

func (o WithTriggerPredicate) Apply(opts *Options)

Jump to

Keyboard shortcuts

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