@@ -313,6 +313,21 @@ func (m MatchingLabels) ApplyToDeleteAllOf(opts *DeleteAllOfOptions) {
313
313
m .ApplyToList (& opts .ListOptions )
314
314
}
315
315
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
+
316
331
// MatchingField filters the list operation on the given field selector
317
332
// (or index in the case of cached lists).
318
333
//
@@ -321,7 +336,7 @@ func MatchingField(name, val string) MatchingFields {
321
336
return MatchingFields {name : val }
322
337
}
323
338
324
- // MatchingField filters the list/delete operation on the given field selector
339
+ // MatchingField filters the list/delete operation on the given field Set
325
340
// (or index in the case of cached lists).
326
341
type MatchingFields fields.Set
327
342
@@ -335,6 +350,21 @@ func (m MatchingFields) ApplyToDeleteAllOf(opts *DeleteAllOfOptions) {
335
350
m .ApplyToList (& opts .ListOptions )
336
351
}
337
352
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
+
338
368
// InNamespace restricts the list/delete operation to the given namespace.
339
369
type InNamespace string
340
370
0 commit comments