gcp

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package gcp declares common Google API clients options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFlags

func InitFlags(cmd *cobra.Command)

InitFlags initializes the Cobra command with flags common to Google API clients.

Types

type Helper

type Helper struct {
	*cli.FlagSet
}

Helper provides convenient access to the Google API Cobra flags.

func NewHelper

func NewHelper(cmd *cobra.Command) *Helper

NewHelper wraps the Cobra command's flags with a utility wrapper to assist in the collection of Google API client options.

func (*Helper) AddInterceptors

func (h *Helper) AddInterceptors() error

AddInterceptors will register interceptors which handle Google load balancer user agent checks for a GCE ingress agent.

func (*Helper) CollectAPIKeyOption

func (h *Helper) CollectAPIKeyOption(options []option.ClientOption) []option.ClientOption

CollectAPIKeyOption adds the Google API key, if passed as a command flag, to the Google API client options.

func (*Helper) CollectCredentialsFileOption

func (h *Helper) CollectCredentialsFileOption(options []option.ClientOption) ([]option.ClientOption, error)

CollectCredentialsFileOption adds the Google credentials file, if passed as a command flag, to the Google API client options.

func (*Helper) CollectCredentialsOption

func (h *Helper) CollectCredentialsOption(options []option.ClientOption) ([]option.ClientOption, error)

CollectCredentialsOption adds the Google credentials, if passed as a command flag, to the Google API client options.

func (*Helper) GetClientOptions

func (h *Helper) GetClientOptions() ([]option.ClientOption, error)

GetClientOptions obtains the Google API client options.

Directories

Path Synopsis
Package datastore contains the datastore sub-command.
Package datastore contains the datastore sub-command.
Package spanner contains the spanner sub-command.
Package spanner contains the spanner sub-command.

Jump to

Keyboard shortcuts

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