forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
registry.go
21 lines (18 loc) · 805 Bytes
/
registry.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package accesstoken
import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/openshift/origin/pkg/oauth/api"
)
// Registry is an interface for things that know how to store AccessToken objects.
type Registry interface {
// ListAccessTokens obtains a list of access tokens that match a selector.
ListAccessTokens(selector labels.Selector) (*api.OAuthAccessTokenList, error)
// GetAccessToken retrieves a specific access token.
GetAccessToken(name string) (*api.OAuthAccessToken, error)
// CreateAccessToken creates a new access token.
CreateAccessToken(token *api.OAuthAccessToken) error
// UpdateAccessToken updates an access token.
UpdateAccessToken(token *api.OAuthAccessToken) error
// DeleteAccessToken deletes an access token.
DeleteAccessToken(name string) error
}