config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2018 License: MIT Imports: 10 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// by parameter
	Email      string
	PrivateKey string

	// by file
	Filename string

	Scopes   []string
	TokenURL string
	Timeout  time.Duration

	CredsJSONBody    string
	UseTempCredsFile bool
	// contains filtered or unexported fields
}

func (Config) Client

func (c Config) Client() (*http.Client, error)

func (*Config) CredsFilePath added in v0.5.0

func (c *Config) CredsFilePath() (string, error)

CredsFilePath returns credential file path. if UseTempCredsFile is true, then temporary creds json file will be created.

func (Config) DeleteTempCredsFile added in v0.5.0

func (c Config) DeleteTempCredsFile() error

DeleteTempCredsFile deletes temporary creds json file.

func (Config) JWTConfig

func (c Config) JWTConfig() (conf *jwt.Config, err error)

func (Config) NewContext

func (c Config) NewContext() context.Context

Jump to

Keyboard shortcuts

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