defaultprovider

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 1

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
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
}

Provider is the default Auth provider

func (*Provider) APIClient

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

func (*Provider) APIClientv2

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

func (*Provider) APIURL

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

func (*Provider) UnavailableResources

func (dp *Provider) UnavailableResources() []provider.FnResourceType

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