gcloud

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2024 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

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

Variables

View Source
var (
	ErrNilGoogleCredentials          = errors.New("google credentials cannot be nil")
	ErrNilTokenSource                = errors.New("token source cannot be nil")
	ErrFailedToLoadGoogleCredentials = errors.New("failed to load google credentials")
	ErrFailedToCreateTokenSource     = errors.New("failed to create token source")
)

Functions

func LoadGoogleCredentials

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

type AuthorizationIdx int
const (
	TokenIdx AuthorizationIdx = iota
)

func (AuthorizationIdx) Int

func (i AuthorizationIdx) Int() int

Int returns the integer value of the index

type Logger

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

Logger is the logger for Google Cloud

func NewLogger

func NewLogger(logger gologger.Logger) (*Logger, error)

NewLogger is the logger for Google Cloud

func (*Logger) LoadedTokenSource

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