google

package
v1.1.38 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clients

type Clients interface {
	// Bucket constructs a new Bucket using Thelma's globally-configured Google authentication options
	Bucket(name string, options ...bucket.BucketOption) (bucket.Bucket, error)
	// Terra returns a new terraapi.TerraClient instance
	Terra() (terraapi.TerraClient, error)
	// PubSub returns a new google pubsub client
	PubSub(projectId string) (*pubsub.Client, error)
	// ClusterManager returns a new google container cluster manager client
	ClusterManager() (*container.ClusterManagerClient, error)
	// SqlAdmin returns a new google sql admin client
	SqlAdmin() (sqladmin.Client, error)
	// TokenSource returns an oauth TokenSource for this client factory's configured identity
	TokenSource() (oauth2.TokenSource, error)
	// IdTokenGenerator returns a function suitable to be an issueFn for credentials.TokenProvider
	IdTokenGenerator(audience string, serviceAccountChain ...string) (func() ([]byte, error), error)
}

Clients factory for GCP api clients

func New

func New(options ...Option) Clients

type Option added in v1.1.3

type Option func(*Options)

func OptionForceADC added in v1.1.3

func OptionForceADC(
	allowNonBroad bool,
) Option

func OptionForceVaultSA added in v1.1.3

func OptionForceVaultSA(
	saVaultPath string,
	saVaultKey string,
) Option

type Options added in v1.1.3

type Options struct {
	// ConfigSource should be provided if neither OptionForceADC nor OptionForceVaultSA are passed.
	ConfigSource config.Config
	// VaultFactory will be lazily executed if Vault SA auth is used.
	VaultFactory func() (*vaultapi.Client, error)
	// Subject, when set, indicates that delegation to that subject should be attempted.
	Subject string
	// contains filtered or unexported fields
}

Directories

Path Synopsis
testing/assert
Package assert contains helper functions for making Testify assertions about objects in GCS buckets.
Package assert contains helper functions for making Testify assertions about objects in GCS buckets.

Jump to

Keyboard shortcuts

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