-
Notifications
You must be signed in to change notification settings - Fork 23
/
service_accounts_client.go
71 lines (58 loc) · 1.63 KB
/
service_accounts_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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package fakes
import (
gcpcrm "google.golang.org/api/cloudresourcemanager/v1"
gcpiam "google.golang.org/api/iam/v1"
)
type ServiceAccountsClient struct {
GetProjectIamPolicyCall struct {
CallCount int
Returns struct {
Output *gcpcrm.Policy
Error error
}
}
SetProjectIamPolicyCall struct {
CallCount int
Receives struct {
Input *gcpcrm.Policy
}
Returns struct {
Output *gcpcrm.Policy
Error error
}
}
ListServiceAccountsCall struct {
CallCount int
Returns struct {
Output []*gcpiam.ServiceAccount
Error error
}
}
DeleteServiceAccountCall struct {
CallCount int
Receives struct {
ServiceAccount string
}
Returns struct {
Error error
}
}
}
func (s *ServiceAccountsClient) SetProjectIamPolicy(input *gcpcrm.Policy) (*gcpcrm.Policy, error) {
s.SetProjectIamPolicyCall.CallCount++
s.SetProjectIamPolicyCall.Receives.Input = input
return s.SetProjectIamPolicyCall.Returns.Output, s.SetProjectIamPolicyCall.Returns.Error
}
func (s *ServiceAccountsClient) GetProjectIamPolicy() (*gcpcrm.Policy, error) {
s.GetProjectIamPolicyCall.CallCount++
return s.GetProjectIamPolicyCall.Returns.Output, s.GetProjectIamPolicyCall.Returns.Error
}
func (s *ServiceAccountsClient) ListServiceAccounts() ([]*gcpiam.ServiceAccount, error) {
s.ListServiceAccountsCall.CallCount++
return s.ListServiceAccountsCall.Returns.Output, s.ListServiceAccountsCall.Returns.Error
}
func (s *ServiceAccountsClient) DeleteServiceAccount(account string) error {
s.DeleteServiceAccountCall.CallCount++
s.DeleteServiceAccountCall.Receives.ServiceAccount = account
return s.DeleteServiceAccountCall.Returns.Error
}