manager

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessTokenChangedCallback

func AccessTokenChangedCallback(newToken *goauth2.Token, private interface{}) error

AccessTokenChangedCallback is the callback to get a new access token As there is no session, a new token should never be acquired

Types

type APISDKManager

type APISDKManager struct {
	APIKey string
	APIURL string
}

APISDKManager struct holds the required values to provide API to API communication

func (APISDKManager) GetPrivateSDK

func (manager APISDKManager) GetPrivateSDK(req *http.Request, usePassthrough bool) (*privatesdk.Service, error)

GetPrivateSDK will return an instance of the Private Go SDK using an oauth2 authenticated HTTP client if requested, else an API-key authenticated HTTP client will be used

func (APISDKManager) GetSDK

func (manager APISDKManager) GetSDK(req *http.Request, usePassthrough bool) (*sdk.Service, error)

GetSDK will return an instance of the Go SDK using an oauth2 authenticated HTTP client if requested, else an API-key authenticated HTTP client will be used

Jump to

Keyboard shortcuts

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