forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fields.go
41 lines (36 loc) · 1.25 KB
/
fields.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package api
import "k8s.io/kubernetes/pkg/fields"
// OAuthAccessTokenToSelectableFields returns a label set that represents the object
func OAuthAccessTokenToSelectableFields(obj *OAuthAccessToken) fields.Set {
return fields.Set{
"metadata.name": obj.Name,
"clientName": obj.ClientName,
"userName": obj.UserName,
"userUID": obj.UserUID,
"authorizeToken": obj.AuthorizeToken,
}
}
// OAuthAuthorizeTokenToSelectableFields returns a label set that represents the object
func OAuthAuthorizeTokenToSelectableFields(obj *OAuthAuthorizeToken) fields.Set {
return fields.Set{
"metadata.name": obj.Name,
"clientName": obj.ClientName,
"userName": obj.UserName,
"userUID": obj.UserUID,
}
}
// OAuthClientToSelectableFields returns a label set that represents the object
func OAuthClientToSelectableFields(obj *OAuthClient) fields.Set {
return fields.Set{
"metadata.name": obj.Name,
}
}
// OAuthClientAuthorizationToSelectableFields returns a label set that represents the object
func OAuthClientAuthorizationToSelectableFields(obj *OAuthClientAuthorization) fields.Set {
return fields.Set{
"metadata.name": obj.Name,
"clientName": obj.ClientName,
"userName": obj.UserName,
"userUID": obj.UserUID,
}
}