gcloud

package
v0.6.24 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AuthorizationMetadataKey is the key of the authorization metadata
	AuthorizationMetadataKey = "x-serverless-authorization"
)

Variables

View Source
var (
	FailedToLoadGoogleCredentialsError = errors.New("failed to load google credentials")
	FailedToCreateTokenSourceError     = errors.New("failed to create token source")
)

Functions

func LoadGoogleCredentials added in v0.5.11

func LoadGoogleCredentials(ctx context.Context) (*google.Credentials, error)

LoadGoogleCredentials loads the Google credentials

func LoadServiceAccountCredentials

func LoadServiceAccountCredentials(
	ctx context.Context, url string, credentials *google.Credentials,
) (*oauth.TokenSource, error)

LoadServiceAccountCredentials loads the service account credentials

Types

type AuthorizationIdx added in v0.5.1

type AuthorizationIdx int
const (
	TokenIdx AuthorizationIdx = iota
)

func (AuthorizationIdx) Int added in v0.5.1

func (i AuthorizationIdx) Int() int

Int returns the integer value of the index

type Logger added in v0.5.9

type Logger struct {
	// contains filtered or unexported fields
}

Logger is the logger for Google Cloud

func NewLogger added in v0.5.9

func NewLogger(logger commonlogger.Logger) Logger

NewLogger is the logger for Google Cloud

func (Logger) LoadedTokenSource added in v0.5.9

func (l Logger) LoadedTokenSource(tokenSource *oauth.TokenSource)

LoadedTokenSource logs the loaded token source

Jump to

Keyboard shortcuts

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