gcloud

package
v1.339.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateServiceAccount

func ActivateServiceAccount(keyFilePath string) error

ActivateServiceAccount activates the service account with gcloud.

func ActivateServiceAccounts

func ActivateServiceAccounts(keyFilePaths string) error

ActivateServiceAccounts uses the given CSV of JSON key filepaths to activate the associated service accounts.

func MaybeUseServiceAccount

func MaybeUseServiceAccount(
	serviceAccount string,
	useServiceAccount bool,
	cmd []string) []string

MaybeUseServiceAccount injects a '--account=...' argument to the command with the given service account.

Types

type Token

type Token string

Token is the oauth2 access token used for API calls over HTTP.

func GetServiceAccountToken

func GetServiceAccountToken(
	serviceAccount string,
	useServiceAccount bool) (Token, error)

GetServiceAccountToken calls gcloud to get an access token for the specified service account.

Jump to

Keyboard shortcuts

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