gateclient

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OAuth2Authenticate added in v0.2.0

func OAuth2Authenticate(floodgateConfig *config.Config) (*oauth2.Token, error)

OAuth2Authenticate is used to authenticate using oauth2

func X509Authenticate added in v0.2.0

func X509Authenticate(httpClient *http.Client, floodgateConfig *config.Config) (*http.Client, error)

X509Authenticate is used to authenticate using x509

Types

type GateapiClient

type GateapiClient struct {
	// Gate API Client
	*gateapi.APIClient

	// request context
	Context context.Context
}

GateapiClient is a Client for Gate API which has instance-specific information.

func NewGateapiClient

func NewGateapiClient(floodgateConfig *config.Config) *GateapiClient

NewGateapiClient creates instance of Gate API wrapper based on Floodgate's Config

func (GateapiClient) WaitForSuccessfulTask

func (c GateapiClient) WaitForSuccessfulTask(checkTask map[string]interface{}, maxRetries int) error

WaitForSuccessfulTask function is waiting for task to finish

type OAuth2Authentication added in v0.2.0

type OAuth2Authentication struct {
	Config       *oauth2.Config
	CodeVerifier oauth2.AuthCodeOption
	Token        *oauth2.Token
	CachedToken  oauth2.Token
	Done         chan bool
}

OAuth2Authentication struct is used to authenticate using oauth2

Jump to

Keyboard shortcuts

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