forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
48 lines (36 loc) · 1.29 KB
/
types.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
42
43
44
45
46
47
48
package api
import (
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
)
// Auth system gets identity name and provider
// POST to UserIdentityMapping, get back error or a filled out UserIdentityMapping object
type User struct {
kapi.TypeMeta `json:",inline"`
kapi.ObjectMeta `json:"metadata,omitempty"`
FullName string `json:"fullName,omitempty"`
}
type UserList struct {
kapi.TypeMeta `json:",inline"`
kapi.ObjectMeta `json:"metadata,omitempty"`
Items []User `json:"items"`
}
type Identity struct {
kapi.TypeMeta `json:",inline"`
kapi.ObjectMeta `json:"metadata,omitempty"`
// Provider is the source of identity information - if empty, the default provider
// is assumed.
Provider string `json:"provider"`
// UserName uniquely represents this identity in the scope of the identity provider
UserName string `json:"userName"`
Extra map[string]string `json:"extra,omitempty"`
}
type UserIdentityMapping struct {
kapi.TypeMeta `json:",inline"`
kapi.ObjectMeta `json:"metadata,omitempty"`
Identity Identity `json:"identity,omitempty"`
User User `json:"user,omitempty"`
}
func (*User) IsAnAPIObject() {}
func (*UserList) IsAnAPIObject() {}
func (*Identity) IsAnAPIObject() {}
func (*UserIdentityMapping) IsAnAPIObject() {}