Documentation
¶
Index ¶
- type Agent
- func (a *Agent) CreateServiceAccount(name string) (*adminpb.ServiceAccount, error)
- func (a *Agent) CreateServiceAccountKey(sa *adminpb.ServiceAccount) ([]byte, error)
- func (a *Agent) GetProjectIDForGKECluster(endpoint string) (string, error)
- func (a *Agent) SetServiceAccountIAMPolicy(sa *adminpb.ServiceAccount) error
- type ServiceAccountKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
Ctx context.Context
ProjectID string
IAMClient *admin.IamClient
CloudResourceManagerService *crm.Service
GKEService *gke.Service
}
func (*Agent) CreateServiceAccount ¶
func (a *Agent) CreateServiceAccount(name string) (*adminpb.ServiceAccount, error)
func (*Agent) CreateServiceAccountKey ¶
func (a *Agent) CreateServiceAccountKey(sa *adminpb.ServiceAccount) ([]byte, error)
CreateServiceAccountKey will create a new key for the specified service account
func (*Agent) GetProjectIDForGKECluster ¶
GetProjectIDForGKECluster automatically determines the project ID for a cluster that a user has access to
func (*Agent) SetServiceAccountIAMPolicy ¶
func (a *Agent) SetServiceAccountIAMPolicy(sa *adminpb.ServiceAccount) error
type ServiceAccountKey ¶
type ServiceAccountKey struct {
// set to service_account
Type string `json:"type"`
ProjectID string `json:"project_id"`
PrivateKeyID string `json:"private_key_id"`
// the private key, not base64 encoded
PrivateKey string `json:"private_key"`
ClientEmail string `json:"client_email"`
ClientID string `json:"client_id"`
AuthURI string `json:"auth_uri"`
TokenURI string `json:"token_uri"`
AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url"`
ClientX509CertURL string `json:"client_x509_cert_url"`
}
Click to show internal directories.
Click to hide internal directories.