@@ -313,6 +313,21 @@ func (m MatchingLabels) ApplyToDeleteAllOf(opts *DeleteAllOfOptions) {
313313 m .ApplyToList (& opts .ListOptions )
314314}
315315
316+ // MatchingLabelsSelector filters the list/delete operation on the given label
317+ // selector (or index in the case of cached lists). A struct is used because
318+ // labels.Selector is an interface, which cannot be aliased.
319+ type MatchingLabelsSelector struct {
320+ labels.Selector
321+ }
322+
323+ func (m MatchingLabelsSelector ) ApplyToList (opts * ListOptions ) {
324+ opts .LabelSelector = m
325+ }
326+
327+ func (m MatchingLabelsSelector ) ApplyToDeleteAllOf (opts * DeleteAllOfOptions ) {
328+ m .ApplyToList (& opts .ListOptions )
329+ }
330+
316331// MatchingField filters the list operation on the given field selector
317332// (or index in the case of cached lists).
318333//
@@ -321,7 +336,7 @@ func MatchingField(name, val string) MatchingFields {
321336 return MatchingFields {name : val }
322337}
323338
324- // MatchingField filters the list/delete operation on the given field selector
339+ // MatchingField filters the list/delete operation on the given field Set
325340// (or index in the case of cached lists).
326341type MatchingFields fields.Set
327342
@@ -335,6 +350,21 @@ func (m MatchingFields) ApplyToDeleteAllOf(opts *DeleteAllOfOptions) {
335350 m .ApplyToList (& opts .ListOptions )
336351}
337352
353+ // MatchingFieldsSelector filters the list/delete operation on the given field
354+ // selector (or index in the case of cached lists). A struct is used because
355+ // fields.Selector is an interface, which cannot be aliased.
356+ type MatchingFieldsSelector struct {
357+ fields.Selector
358+ }
359+
360+ func (m MatchingFieldsSelector ) ApplyToList (opts * ListOptions ) {
361+ opts .FieldSelector = m
362+ }
363+
364+ func (m MatchingFieldsSelector ) ApplyToDeleteAllOf (opts * DeleteAllOfOptions ) {
365+ m .ApplyToList (& opts .ListOptions )
366+ }
367+
338368// InNamespace restricts the list/delete operation to the given namespace.
339369type InNamespace string
340370
0 commit comments