gcp

package
v1.0.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 6 Imported by: 2

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddServiceAccountPerms

func AddServiceAccountPerms(projectID, email, roles string) error

func CreateServiceAccount

func CreateServiceAccount(name, displayName string) error

func CreateServiceAccountKey

func CreateServiceAccountKey(email, keyFilepath string) error

func EnableAPIs

func EnableAPIs(apis []string) error

EnableAPIs enables given APIs in user's GCP project.

func GetConfigMap

func GetConfigMap() (map[string]interface{}, error)

GetConfigMap returns all the gcloud config in a JSON struct.

func GetConfigValue

func GetConfigValue(section, property string) (string, error)

GetConfigValue returns a property value from given section of gcloud's default config.

func RemoveAllServiceAccountKeys

func RemoveAllServiceAccountKeys(email string) error

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.

func RemoveServiceAccountPerms

func RemoveServiceAccountPerms(projectID, email, roles string) error

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL