github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+incompatible/cf/api/apifakes/old_fake_auth_token_repo.go (about) 1 package apifakes 2 3 import "code.cloudfoundry.org/cli/cf/models" 4 5 type OldFakeAuthTokenRepo struct { 6 CreatedServiceAuthTokenFields models.ServiceAuthTokenFields 7 8 FindAllAuthTokens []models.ServiceAuthTokenFields 9 10 FindByLabelAndProviderLabel string 11 FindByLabelAndProviderProvider string 12 FindByLabelAndProviderServiceAuthTokenFields models.ServiceAuthTokenFields 13 FindByLabelAndProviderAPIResponse error 14 15 UpdatedServiceAuthTokenFields models.ServiceAuthTokenFields 16 17 DeletedServiceAuthTokenFields models.ServiceAuthTokenFields 18 } 19 20 func (repo *OldFakeAuthTokenRepo) Create(authToken models.ServiceAuthTokenFields) (apiErr error) { 21 repo.CreatedServiceAuthTokenFields = authToken 22 return 23 } 24 25 func (repo *OldFakeAuthTokenRepo) FindAll() (authTokens []models.ServiceAuthTokenFields, apiErr error) { 26 authTokens = repo.FindAllAuthTokens 27 return 28 } 29 func (repo *OldFakeAuthTokenRepo) FindByLabelAndProvider(label, provider string) (authToken models.ServiceAuthTokenFields, apiErr error) { 30 repo.FindByLabelAndProviderLabel = label 31 repo.FindByLabelAndProviderProvider = provider 32 33 authToken = repo.FindByLabelAndProviderServiceAuthTokenFields 34 apiErr = repo.FindByLabelAndProviderAPIResponse 35 return 36 } 37 38 func (repo *OldFakeAuthTokenRepo) Delete(authToken models.ServiceAuthTokenFields) (apiErr error) { 39 repo.DeletedServiceAuthTokenFields = authToken 40 return 41 } 42 43 func (repo *OldFakeAuthTokenRepo) Update(authToken models.ServiceAuthTokenFields) (apiErr error) { 44 repo.UpdatedServiceAuthTokenFields = authToken 45 return 46 }