forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.go
35 lines (27 loc) · 790 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 (
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/openshift/origin/pkg/oauth/api"
)
type ClientRegistry struct {
Err error
Clients *api.OAuthClientList
Client *api.OAuthClient
DeletedClientName string
}
func (r *ClientRegistry) ListClients(labels labels.Selector) (*api.OAuthClientList, error) {
return r.Clients, r.Err
}
func (r *ClientRegistry) GetClient(name string) (*api.OAuthClient, error) {
return r.Client, r.Err
}
func (r *ClientRegistry) CreateClient(client *api.OAuthClient) error {
return r.Err
}
func (r *ClientRegistry) UpdateClient(client *api.OAuthClient) error {
return r.Err
}
func (r *ClientRegistry) DeleteClient(name string) error {
r.DeletedClientName = name
return r.Err
}