auth

package
v1.26.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHandler

type AuthHandler interface {
	// GetAuthOption returns the object that holds a valid
	// authentication/authorization to perform requests to Google APIs
	GetAuthOption(
		context.Context,
		...string,
	) (option.ClientOption, error)
}

AuthHandler defines the type of authentication/authorization to allow interactions with Google APIs

type FileAuthHandler

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

FileAuthHandler defines the type of authentication/authorization when token is stored in a file to allow interactions with Google APIs

func NewFileAuthHandler

func NewFileAuthHandler(
	tokenFilename string,
	credentialsJsonKey []byte,
) (*FileAuthHandler, error)

NewFileAuthHandler creates an instance of FileAuthHandler

func (*FileAuthHandler) GetAuthOption

func (fah *FileAuthHandler) GetAuthOption(
	ctx context.Context,
	scopes ...string,
) (option.ClientOption, error)

GetAuthOption returns the object that holds a valid authentication/authorization to perform requests to Google APIs

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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