Documentation ¶
Overview ¶
Copyright 2017 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func AddServiceAccountPerms(projectID, email, roles string) error
- func CreateServiceAccount(name, displayName string) error
- func CreateServiceAccountKey(email, keyFilepath string) error
- func EnableAPIs(apis []string) error
- func GetConfigMap() (map[string]interface{}, error)
- func GetConfigValue(section, property string) (string, error)
- func RemoveAllServiceAccountKeys(email string) error
- func RemoveServiceAccountKey(email, keyID string)
- func RemoveServiceAccountPerms(projectID, email, roles string) error
- type ServiceAccount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddServiceAccountPerms ¶
func CreateServiceAccount ¶
func CreateServiceAccountKey ¶
func EnableAPIs ¶
EnableAPIs enables given APIs in user's GCP project.
func GetConfigMap ¶
GetConfigMap returns all the gcloud config in a JSON struct.
func GetConfigValue ¶
GetConfigValue returns a property value from given section of gcloud's default config.
func RemoveAllServiceAccountKeys ¶
RemoveAllServiceAccountKeys removes all the keys associated with the service account.
func RemoveServiceAccountKey ¶
func RemoveServiceAccountKey(email, keyID string)
RemoveServiceAccountKey removes the given key from the service account.
Types ¶
type ServiceAccount ¶
type ServiceAccount struct { Email string `json:"email"` Name string `json:"name"` DisplayName string `json:"displayName"` }
func GetServiceAccount ¶
func GetServiceAccount(email string) (*ServiceAccount, error)