-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
client.go
35 lines (27 loc) · 921 Bytes
/
client.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
package test
import (
kapi "k8s.io/kubernetes/pkg/api"
"github.com/openshift/origin/pkg/oauth/api"
)
type ClientRegistry struct {
Err error
Clients *api.OAuthClientList
Client *api.OAuthClient
DeletedClientName string
}
func (r *ClientRegistry) ListClients(ctx kapi.Context, options *kapi.ListOptions) (*api.OAuthClientList, error) {
return r.Clients, r.Err
}
func (r *ClientRegistry) GetClient(ctx kapi.Context, name string) (*api.OAuthClient, error) {
return r.Client, r.Err
}
func (r *ClientRegistry) CreateClient(ctx kapi.Context, client *api.OAuthClient) (*api.OAuthClient, error) {
return r.Client, r.Err
}
func (r *ClientRegistry) UpdateClient(ctx kapi.Context, client *api.OAuthClient) (*api.OAuthClient, error) {
return r.Client, r.Err
}
func (r *ClientRegistry) DeleteClient(ctx kapi.Context, name string) error {
r.DeletedClientName = name
return r.Err
}