option

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2019 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientOption

type ClientOption interface {
	GetClient() (*http.Client, error)
}

ClientOption is an option for herschel client

func WithConfigAndToken

func WithConfigAndToken(config *oauth2.Config, token *oauth2.Token) ClientOption

WithConfigAndToken returns a ClientOption that uses given config and token

func WithConfigFileAndTokenFile

func WithConfigFileAndTokenFile(configFile string, tokenFile string) ClientOption

WithConfigFileAndTokenFile returns a ClientOption that loads config and token from given file paths

func WithConfigReaderAndTokenReader

func WithConfigReaderAndTokenReader(configReader io.Reader, tokenReader io.Reader) ClientOption

WithConfigReaderAndTokenReader returns a ClientOption that loads config and token from given readers

func WithServiceAccountCredentials

func WithServiceAccountCredentials(file string) ClientOption

WithServiceAccountCredentials returns a ClientOption that loads credentials from given file path

Jump to

Keyboard shortcuts

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