Documentation ¶
Index ¶
- func GetLabels(labels v1.Labels, sel ...LabelSelector) []v1.Label
- func SelectLabels(labels v1.Labels, sel ...LabelSelector) ([]v1.Label, error)
- func SelectReferences(list accessors.ElementListAccessor, sel ...ReferenceSelector) []accessors.ReferenceAccessor
- func SelectResources(list accessors.ElementListAccessor, sel ...ResourceSelector) []accessors.ResourceAccessor
- func SelectSources(list accessors.ElementListAccessor, sel ...SourceSelector) []accessors.SourceAccessor
- func ValidateSelectors[T any](sel ...T) error
- func ValidateSubSelectors[T any](msg string, sel ...T) error
- func VersionConstraint(expr string) *semverConstraint
- type ArtifactErrorSelectorImpl
- type ArtifactSelector
- type ArtifactSelectorImpl
- type ErrorProvider
- type ErrorSelectorBase
- type IdentityErrorSelectorImpl
- type IdentitySelector
- type IdentitySelectorImpl
- func Identity(identity v1.Identity) *IdentitySelectorImpl
- func IdentityAttrRegex(name, ex string) *IdentitySelectorImpl
- func IdentityAttributes(identity v1.Identity) *IdentitySelectorImpl
- func IdentityAttributesByKeyPairs(extra ...string) *IdentitySelectorImpl
- func IdentityByKeyPairs(extra ...string) *IdentitySelectorImpl
- func NumberOfIdentityAttributes(n int) *IdentitySelectorImpl
- func (i *IdentitySelectorImpl) MatchReference(list accessors.ElementListAccessor, a accessors.ReferenceAccessor) bool
- func (i *IdentitySelectorImpl) MatchResource(list accessors.ElementListAccessor, a accessors.ResourceAccessor) bool
- func (i *IdentitySelectorImpl) MatchSource(list accessors.ElementListAccessor, a accessors.SourceAccessor) bool
- type LabelErrPropSelectorImpl
- type LabelErrorSelectorImpl
- type LabelSelector
- type LabelSelectorFunc
- type LabelSelectorImpl
- func (i *LabelSelectorImpl) MatchReference(list accessors.ElementListAccessor, a accessors.ReferenceAccessor) bool
- func (i *LabelSelectorImpl) MatchResource(list accessors.ElementListAccessor, a accessors.ResourceAccessor) bool
- func (i *LabelSelectorImpl) MatchSource(list accessors.ElementListAccessor, a accessors.SourceAccessor) bool
- type Name
- func (n Name) MatchIdentity(identity v1.Identity) bool
- func (n Name) MatchReference(list accessors.ElementListAccessor, r accessors.ReferenceAccessor) bool
- func (n Name) MatchResource(list accessors.ElementListAccessor, r accessors.ResourceAccessor) bool
- func (n Name) MatchSource(list accessors.ElementListAccessor, r accessors.SourceAccessor) bool
- type ReferenceErrorSelectorImpl
- type ReferenceSelector
- type ReferenceSelectorFunc
- type ResourceErrorSelectorImpl
- type ResourceSelector
- type ResourceSelectorFunc
- type SourceErrorSelectorImpl
- type SourceSelector
- type SourceSelectorFunc
- type Version
- func (v Version) MatchIdentity(identity v1.Identity) bool
- func (v Version) MatchReference(list accessors.ElementListAccessor, r accessors.ReferenceAccessor) bool
- func (v Version) MatchResource(list accessors.ElementListAccessor, r accessors.ResourceAccessor) bool
- func (v Version) MatchSource(list accessors.ElementListAccessor, r accessors.SourceAccessor) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SelectLabels ¶
func SelectReferences ¶
func SelectReferences(list accessors.ElementListAccessor, sel ...ReferenceSelector) []accessors.ReferenceAccessor
SelectReferences select resources by a set of selectors. It requires to be called with a compdesc.References list.
func SelectResources ¶
func SelectResources(list accessors.ElementListAccessor, sel ...ResourceSelector) []accessors.ResourceAccessor
SelectResources select resources by a set of selectors. It requires to be called with a compdesc.Resources list.
func SelectSources ¶
func SelectSources(list accessors.ElementListAccessor, sel ...SourceSelector) []accessors.SourceAccessor
SelectSources select sources by a set of selectors. It requires to be called with a compdesc.Sources list.
func ValidateSelectors ¶
func ValidateSubSelectors ¶
func VersionConstraint ¶
func VersionConstraint(expr string) *semverConstraint
Types ¶
type ArtifactErrorSelectorImpl ¶
type ArtifactErrorSelectorImpl struct { ErrorSelectorBase ArtifactSelectorImpl }
func NewArtifactErrorSelectorImpl ¶
func NewArtifactErrorSelectorImpl(s ArtifactSelector, err error) *ArtifactErrorSelectorImpl
type ArtifactSelector ¶
type ArtifactSelector interface {
MatchArtifact(a accessors.ArtifactAccessor) bool
}
type ArtifactSelectorImpl ¶
type ArtifactSelectorImpl struct {
ArtifactSelector
}
func AccessKind ¶
func AccessKind(n string) *ArtifactSelectorImpl
func ArtifactType ¶
func ArtifactType(n string) *ArtifactSelectorImpl
func (*ArtifactSelectorImpl) MatchResource ¶
func (i *ArtifactSelectorImpl) MatchResource(list accessors.ElementListAccessor, a accessors.ResourceAccessor) bool
func (*ArtifactSelectorImpl) MatchSource ¶
func (i *ArtifactSelectorImpl) MatchSource(list accessors.ElementListAccessor, a accessors.SourceAccessor) bool
type ErrorProvider ¶
type ErrorProvider interface {
GetError() error
}
ErrorProvider is an optional interface a Selector can offer to propagate an error determined setting up the selector. Such an error cannot be returned directly by the function creating the selector, because this would prohibit to compose selector sets as variadic arguments.
type ErrorSelectorBase ¶
type ErrorSelectorBase struct {
// contains filtered or unexported fields
}
func NewErrorSelectorBase ¶
func NewErrorSelectorBase(err error) ErrorSelectorBase
func (*ErrorSelectorBase) GetError ¶
func (s *ErrorSelectorBase) GetError() error
type IdentityErrorSelectorImpl ¶
type IdentityErrorSelectorImpl struct { ErrorSelectorBase IdentitySelectorImpl }
func NewIdentityErrorSelectorImpl ¶
func NewIdentityErrorSelectorImpl(s IdentitySelector, err error) *IdentityErrorSelectorImpl
type IdentitySelector ¶
type IdentitySelectorImpl ¶
type IdentitySelectorImpl struct {
IdentitySelector
}
func Identity ¶
func Identity(identity v1.Identity) *IdentitySelectorImpl
func IdentityAttrRegex ¶
func IdentityAttrRegex(name, ex string) *IdentitySelectorImpl
func IdentityAttributes ¶
func IdentityAttributes(identity v1.Identity) *IdentitySelectorImpl
func IdentityAttributesByKeyPairs ¶
func IdentityAttributesByKeyPairs(extra ...string) *IdentitySelectorImpl
func IdentityByKeyPairs ¶
func IdentityByKeyPairs(extra ...string) *IdentitySelectorImpl
func NumberOfIdentityAttributes ¶
func NumberOfIdentityAttributes(n int) *IdentitySelectorImpl
func (*IdentitySelectorImpl) MatchReference ¶
func (i *IdentitySelectorImpl) MatchReference(list accessors.ElementListAccessor, a accessors.ReferenceAccessor) bool
func (*IdentitySelectorImpl) MatchResource ¶
func (i *IdentitySelectorImpl) MatchResource(list accessors.ElementListAccessor, a accessors.ResourceAccessor) bool
func (*IdentitySelectorImpl) MatchSource ¶
func (i *IdentitySelectorImpl) MatchSource(list accessors.ElementListAccessor, a accessors.SourceAccessor) bool
type LabelErrPropSelectorImpl ¶
type LabelErrPropSelectorImpl struct {
LabelSelectorImpl
}
func Label ¶
func Label(sel ...LabelSelector) *LabelErrPropSelectorImpl
func (*LabelErrPropSelectorImpl) GetError ¶
func (l *LabelErrPropSelectorImpl) GetError() error
type LabelErrorSelectorImpl ¶
type LabelErrorSelectorImpl struct { ErrorSelectorBase LabelSelectorImpl }
func NewLabelErrorSelectorImpl ¶
func NewLabelErrorSelectorImpl(s LabelSelector, err error) *LabelErrorSelectorImpl
type LabelSelector ¶
type LabelSelectorFunc ¶
func (LabelSelectorFunc) MatchLabel ¶
func (f LabelSelectorFunc) MatchLabel(l *metav1.Label) bool
type LabelSelectorImpl ¶
type LabelSelectorImpl struct {
LabelSelector
}
func (*LabelSelectorImpl) MatchReference ¶
func (i *LabelSelectorImpl) MatchReference(list accessors.ElementListAccessor, a accessors.ReferenceAccessor) bool
func (*LabelSelectorImpl) MatchResource ¶
func (i *LabelSelectorImpl) MatchResource(list accessors.ElementListAccessor, a accessors.ResourceAccessor) bool
func (*LabelSelectorImpl) MatchSource ¶
func (i *LabelSelectorImpl) MatchSource(list accessors.ElementListAccessor, a accessors.SourceAccessor) bool
type Name ¶
type Name string
func (Name) MatchReference ¶
func (n Name) MatchReference(list accessors.ElementListAccessor, r accessors.ReferenceAccessor) bool
func (Name) MatchResource ¶
func (n Name) MatchResource(list accessors.ElementListAccessor, r accessors.ResourceAccessor) bool
func (Name) MatchSource ¶
func (n Name) MatchSource(list accessors.ElementListAccessor, r accessors.SourceAccessor) bool
type ReferenceErrorSelectorImpl ¶
type ReferenceErrorSelectorImpl struct { ErrorSelectorBase ReferenceSelector }
func NewReferenceErrorSelectorImpl ¶
func NewReferenceErrorSelectorImpl(s ReferenceSelector, err error) *ReferenceErrorSelectorImpl
type ReferenceSelector ¶
type ReferenceSelector interface {
MatchReference(accessors.ElementListAccessor, accessors.ReferenceAccessor) bool
}
type ReferenceSelectorFunc ¶
type ReferenceSelectorFunc func(accessors.ElementListAccessor, accessors.ReferenceAccessor) bool
func (ReferenceSelectorFunc) MatchReference ¶
func (f ReferenceSelectorFunc) MatchReference(list accessors.ElementListAccessor, a accessors.ReferenceAccessor) bool
type ResourceErrorSelectorImpl ¶
type ResourceErrorSelectorImpl struct { ErrorSelectorBase ResourceSelector }
func NewResourceErrorSelectorImpl ¶
func NewResourceErrorSelectorImpl(s ResourceSelector, err error) *ResourceErrorSelectorImpl
type ResourceSelector ¶
type ResourceSelector interface {
MatchResource(accessors.ElementListAccessor, accessors.ResourceAccessor) bool
}
type ResourceSelectorFunc ¶
type ResourceSelectorFunc func(accessors.ElementListAccessor, accessors.ResourceAccessor) bool
func (ResourceSelectorFunc) MatchResource ¶
func (f ResourceSelectorFunc) MatchResource(list accessors.ElementListAccessor, a accessors.ResourceAccessor) bool
type SourceErrorSelectorImpl ¶
type SourceErrorSelectorImpl struct { ErrorSelectorBase SourceSelector }
func NewSourceErrorSelectorImpl ¶
func NewSourceErrorSelectorImpl(s SourceSelector, err error) *SourceErrorSelectorImpl
type SourceSelector ¶
type SourceSelector interface {
MatchSource(accessors.ElementListAccessor, accessors.SourceAccessor) bool
}
type SourceSelectorFunc ¶
type SourceSelectorFunc func(accessors.ElementListAccessor, accessors.SourceAccessor) bool
func (SourceSelectorFunc) MatchSource ¶
func (f SourceSelectorFunc) MatchSource(list accessors.ElementListAccessor, a accessors.SourceAccessor) bool
type Version ¶
type Version string
func (Version) MatchReference ¶
func (v Version) MatchReference(list accessors.ElementListAccessor, r accessors.ReferenceAccessor) bool
func (Version) MatchResource ¶
func (v Version) MatchResource(list accessors.ElementListAccessor, r accessors.ResourceAccessor) bool
func (Version) MatchSource ¶
func (v Version) MatchSource(list accessors.ElementListAccessor, r accessors.SourceAccessor) bool
Click to show internal directories.
Click to hide internal directories.