defaultprovider

package
v0.0.0-...-f090fa9 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

README

Default Provider

This is the default auth provider and provides basic HTTP authentication using bearer tokens

Configuration:

Key Example Required Description
api-url https://my.functions.com/ Yes The API endpoint to contact for accessing the service API
call-url https://my.functions.com/ No The call endpoint base URL for calling functions- this defaults to api-url
token 0YHQtdC60YHRg9Cw0LvRjNC90YvQuSDQsdCw0L3QsNC9Cg== No (Unless server requires authentication The Bearer token to use for API auth

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromConfig

func NewFromConfig(configSource provider.ConfigSource, _ provider.PassPhraseSource) (provider.Provider, error)

NewFromConfig creates a default provider that does un-authenticated calls to

Types

type Provider

type Provider struct {
	// Optional token to add as  bearer token to auth calls
	Token string
	// API url to use for FN API interactions
	FnApiUrl *url.URL
	// URL to use for FN call interactions
	CallUrl *url.URL
}

Provider is the default Auth provider

func (*Provider) APIClient

func (dp *Provider) APIClient() *client.Fn

func (*Provider) APIClientv2

func (dp *Provider) APIClientv2() *clientv2.Fn

func (*Provider) APIURL

func (dp *Provider) APIURL() *url.URL

func (*Provider) CallURL

func (dp *Provider) CallURL(appName string) (*url.URL, error)

func (*Provider) VersionClient

func (op *Provider) VersionClient() *version.Client

func (*Provider) WrapCallTransport

func (dp *Provider) WrapCallTransport(t http.RoundTripper) http.RoundTripper

Jump to

Keyboard shortcuts

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