credentials

package
v3.16.9 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials interface {
	Token(context.Context) (string, error)
}

Credentials is an interface that contains options used to authorize a client.

func MultiCredentials

func MultiCredentials(cs ...Credentials) Credentials

MultiCredentials creates Credentials which represents multiple ways of obtaining token. Its Token() method proxies call to the underlying credentials in order. When first successful call met, it returns. If there are no successful calls, it returns last error.

func NewAccessTokenCredentials

func NewAccessTokenCredentials(token string, sourceInfo string) Credentials

func NewAnonymousCredentials

func NewAnonymousCredentials(sourceInfo string) Credentials

Jump to

Keyboard shortcuts

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