forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
old_fake_auth_token_repo.go
46 lines (35 loc) · 1.52 KB
/
old_fake_auth_token_repo.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
package apifakes
import "github.com/cloudfoundry/cli/cf/models"
type OldFakeAuthTokenRepo struct {
CreatedServiceAuthTokenFields models.ServiceAuthTokenFields
FindAllAuthTokens []models.ServiceAuthTokenFields
FindByLabelAndProviderLabel string
FindByLabelAndProviderProvider string
FindByLabelAndProviderServiceAuthTokenFields models.ServiceAuthTokenFields
FindByLabelAndProviderAPIResponse error
UpdatedServiceAuthTokenFields models.ServiceAuthTokenFields
DeletedServiceAuthTokenFields models.ServiceAuthTokenFields
}
func (repo *OldFakeAuthTokenRepo) Create(authToken models.ServiceAuthTokenFields) (apiErr error) {
repo.CreatedServiceAuthTokenFields = authToken
return
}
func (repo *OldFakeAuthTokenRepo) FindAll() (authTokens []models.ServiceAuthTokenFields, apiErr error) {
authTokens = repo.FindAllAuthTokens
return
}
func (repo *OldFakeAuthTokenRepo) FindByLabelAndProvider(label, provider string) (authToken models.ServiceAuthTokenFields, apiErr error) {
repo.FindByLabelAndProviderLabel = label
repo.FindByLabelAndProviderProvider = provider
authToken = repo.FindByLabelAndProviderServiceAuthTokenFields
apiErr = repo.FindByLabelAndProviderAPIResponse
return
}
func (repo *OldFakeAuthTokenRepo) Delete(authToken models.ServiceAuthTokenFields) (apiErr error) {
repo.DeletedServiceAuthTokenFields = authToken
return
}
func (repo *OldFakeAuthTokenRepo) Update(authToken models.ServiceAuthTokenFields) (apiErr error) {
repo.UpdatedServiceAuthTokenFields = authToken
return
}