providers

package
v0.0.0-...-22d3fb1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdditionalHeadersRoundTripper

type AdditionalHeadersRoundTripper struct {
	Headers map[string]string
	// contains filtered or unexported fields
}

func NewAdditionalHeadersRoundTripper

func NewAdditionalHeadersRoundTripper(rtp http.RoundTripper) *AdditionalHeadersRoundTripper

func (*AdditionalHeadersRoundTripper) RoundTrip

func (rt *AdditionalHeadersRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

type Adsolut

type Adsolut struct {
	// contains filtered or unexported fields
}

func NewAdsolut

func NewAdsolut() *Adsolut

func (Adsolut) Exchange

func (v Adsolut) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Adsolut) Name

func (v Adsolut) Name() string

func (Adsolut) Route

func (v Adsolut) Route() string

func (Adsolut) TokenSource

func (v Adsolut) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Adsolut) WithAuthURL

func (v Adsolut) WithAuthURL(u string) Adsolut

func (Adsolut) WithName

func (v Adsolut) WithName(name string) Adsolut

func (Adsolut) WithTokenURL

func (v Adsolut) WithTokenURL(u string) Adsolut

type Amadeus

type Amadeus struct {
	// contains filtered or unexported fields
}

func NewAmadeus

func NewAmadeus() *Amadeus

func (Amadeus) Exchange

func (am Amadeus) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Amadeus) Name

func (am Amadeus) Name() string

func (Amadeus) Route

func (am Amadeus) Route() string

func (Amadeus) TokenSource

func (am Amadeus) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Amadeus) WithName

func (am Amadeus) WithName(name string) Amadeus

type Apaleo

type Apaleo struct {
	// contains filtered or unexported fields
}

func NewApaleo

func NewApaleo() *Apaleo

func (Apaleo) Exchange

func (m Apaleo) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Apaleo) Name

func (m Apaleo) Name() string

func (Apaleo) Route

func (m Apaleo) Route() string

func (Apaleo) TokenSource

func (m Apaleo) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Apaleo) WithName

func (m Apaleo) WithName(name string) Apaleo

type Apicbase

type Apicbase struct {
	// contains filtered or unexported fields
}

func NewApicbase

func NewApicbase() *Apicbase

func (Apicbase) Exchange

func (ab Apicbase) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Apicbase) Name

func (ab Apicbase) Name() string

func (Apicbase) Route

func (ab Apicbase) Route() string

func (Apicbase) TokenSource

func (ab Apicbase) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Apicbase) WithName

func (ab Apicbase) WithName(name string) Apicbase

type Asperion

type Asperion struct {
	// contains filtered or unexported fields
}

func NewAsperion

func NewAsperion() *Asperion

func (Asperion) Exchange

func (f Asperion) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Asperion) Name

func (f Asperion) Name() string

func (Asperion) Route

func (f Asperion) Route() string

func (Asperion) TokenSource

func (f Asperion) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Asperion) WithName

func (f Asperion) WithName(name string) Asperion

type AuthCodeOptionClientID

type AuthCodeOptionClientID struct {
	// contains filtered or unexported fields
}

type Bizcuit

type Bizcuit struct {
	// contains filtered or unexported fields
}

func NewBizcuit

func NewBizcuit() *Bizcuit

func (Bizcuit) Exchange

func (p Bizcuit) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Bizcuit) Name

func (p Bizcuit) Name() string

func (Bizcuit) Route

func (p Bizcuit) Route() string

func (Bizcuit) TokenSource

func (p Bizcuit) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Bizcuit) WithBaseURL

func (p Bizcuit) WithBaseURL(url url.URL) Bizcuit

func (Bizcuit) WithName

func (p Bizcuit) WithName(name string) Bizcuit

type BookingExperts

type BookingExperts struct {
	// contains filtered or unexported fields
}

func NewBookingExperts

func NewBookingExperts() *BookingExperts

func (BookingExperts) Exchange

func (BookingExperts) Name

func (v BookingExperts) Name() string

func (BookingExperts) Route

func (v BookingExperts) Route() string

func (BookingExperts) TokenSource

func (BookingExperts) WithAuthURL

func (v BookingExperts) WithAuthURL(u string) BookingExperts

func (BookingExperts) WithName

func (v BookingExperts) WithName(name string) BookingExperts

func (BookingExperts) WithTokenURL

func (v BookingExperts) WithTokenURL(u string) BookingExperts

type Chronogolf

type Chronogolf struct {
	// contains filtered or unexported fields
}

func NewChronogolf

func NewChronogolf() *Chronogolf

func (Chronogolf) Exchange

func (v Chronogolf) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Chronogolf) Name

func (v Chronogolf) Name() string

func (Chronogolf) Route

func (v Chronogolf) Route() string

func (Chronogolf) TokenSource

func (v Chronogolf) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Chronogolf) WithAuthURL

func (v Chronogolf) WithAuthURL(u string) Chronogolf

func (Chronogolf) WithName

func (v Chronogolf) WithName(name string) Chronogolf

func (Chronogolf) WithTokenURL

func (v Chronogolf) WithTokenURL(u string) Chronogolf

type Cloudbeds

type Cloudbeds struct {
	// contains filtered or unexported fields
}

func NewCloudbeds

func NewCloudbeds() *Cloudbeds

func (Cloudbeds) Exchange

func (m Cloudbeds) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Cloudbeds) Name

func (m Cloudbeds) Name() string

func (Cloudbeds) Route

func (m Cloudbeds) Route() string

func (Cloudbeds) TokenSource

func (m Cloudbeds) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Cloudbeds) WithName

func (m Cloudbeds) WithName(name string) Cloudbeds

type Cockpit

type Cockpit struct {
	// contains filtered or unexported fields
}

Cockpit has a non-standard Token Exchange. Instead of 'x-www-form-urlencoded' they use 'application/json'. The custom NewJSONTokenExchangeClient http.Client works around that

func NewCockpit

func NewCockpit() *Cockpit

func (Cockpit) Exchange

func (m Cockpit) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Cockpit) Name

func (m Cockpit) Name() string

func (Cockpit) Route

func (m Cockpit) Route() string

func (Cockpit) TokenSource

func (m Cockpit) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Cockpit) WithName

func (m Cockpit) WithName(name string) Cockpit

type Datev

type Datev struct {
	// contains filtered or unexported fields
}

func NewDatev

func NewDatev() *Datev

func (Datev) Exchange

func (v Datev) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Datev) IDTokenVerifier

func (v Datev) IDTokenVerifier(params TokenRequestParams) *oidc.IDTokenVerifier

func (Datev) Name

func (v Datev) Name() string

func (Datev) RevokeRoute

func (v Datev) RevokeRoute() string

func (Datev) RevokeURL

func (v Datev) RevokeURL() string

func (Datev) Route

func (v Datev) Route() string

func (Datev) TokenSource

func (v Datev) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Datev) WithAuthURL

func (v Datev) WithAuthURL(u string) Datev

func (Datev) WithIssuerURL

func (v Datev) WithIssuerURL(u string) Datev

func (Datev) WithName

func (v Datev) WithName(name string) Datev

func (Datev) WithRemoteKeysetURL

func (v Datev) WithRemoteKeysetURL(u string) Datev

func (Datev) WithRevokeURL

func (v Datev) WithRevokeURL(u string) Datev

func (Datev) WithTokenURL

func (v Datev) WithTokenURL(u string) Datev

type ExactOnline

type ExactOnline struct {
	// contains filtered or unexported fields
}

func NewExactOnline

func NewExactOnline() *ExactOnline

func (ExactOnline) Exchange

func (eo ExactOnline) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (ExactOnline) Name

func (eo ExactOnline) Name() string

func (ExactOnline) Route

func (eo ExactOnline) Route() string

func (ExactOnline) TokenSource

func (eo ExactOnline) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (ExactOnline) WithBaseURL

func (eo ExactOnline) WithBaseURL(url url.URL) ExactOnline

func (ExactOnline) WithName

func (eo ExactOnline) WithName(name string) ExactOnline

type Fortnox

type Fortnox struct {
	// contains filtered or unexported fields
}

func NewFortnox

func NewFortnox() *Fortnox

func (Fortnox) Exchange

func (f Fortnox) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Fortnox) Name

func (f Fortnox) Name() string

func (Fortnox) Route

func (f Fortnox) Route() string

func (Fortnox) TokenSource

func (f Fortnox) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Fortnox) WithName

func (f Fortnox) WithName(name string) Fortnox

type Izettle

type Izettle struct {
	// contains filtered or unexported fields
}

func NewIzettle

func NewIzettle() *Izettle

func (Izettle) Exchange

func (iz Izettle) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Izettle) Name

func (iz Izettle) Name() string

func (Izettle) Route

func (iz Izettle) Route() string

func (Izettle) TokenSource

func (iz Izettle) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Izettle) WithName

func (iz Izettle) WithName(name string) Izettle

type JSONTokenExchangeRoundTripper

type JSONTokenExchangeRoundTripper struct {
	// contains filtered or unexported fields
}

func NewJSONTokenExchangeRoundTripper

func NewJSONTokenExchangeRoundTripper(rtp http.RoundTripper) *JSONTokenExchangeRoundTripper

func (*JSONTokenExchangeRoundTripper) RoundTrip

func (rt *JSONTokenExchangeRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

type Lightspeed

type Lightspeed struct {
	// contains filtered or unexported fields
}

func NewLightspeed

func NewLightspeed() *Lightspeed

func (Lightspeed) Exchange

func (l Lightspeed) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Lightspeed) Name

func (l Lightspeed) Name() string

func (Lightspeed) Route

func (l Lightspeed) Route() string

func (Lightspeed) TokenSource

func (l Lightspeed) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Lightspeed) WithBaseURL

func (l Lightspeed) WithBaseURL(url url.URL) Lightspeed

func (Lightspeed) WithName

func (l Lightspeed) WithName(name string) Lightspeed

type LightspeedRetail

type LightspeedRetail struct {
	// contains filtered or unexported fields
}

func NewLightspeedRetail

func NewLightspeedRetail() *LightspeedRetail

func (LightspeedRetail) Exchange

func (LightspeedRetail) Name

func (l LightspeedRetail) Name() string

func (LightspeedRetail) Route

func (l LightspeedRetail) Route() string

func (LightspeedRetail) TokenSource

func (LightspeedRetail) WithBaseURL

func (l LightspeedRetail) WithBaseURL(url url.URL) LightspeedRetail

func (LightspeedRetail) WithName

func (l LightspeedRetail) WithName(name string) LightspeedRetail

type Minox

type Minox struct {
	// contains filtered or unexported fields
}

func NewMinox

func NewMinox() *Minox

func (Minox) Exchange

func (m Minox) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Minox) Name

func (m Minox) Name() string

func (Minox) Route

func (m Minox) Route() string

func (Minox) TokenSource

func (m Minox) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Minox) WithName

func (m Minox) WithName(name string) Minox

type NetSuite

type NetSuite struct {
	// contains filtered or unexported fields
}

func NewNetSuite

func NewNetSuite() *NetSuite

func (NetSuite) Exchange

func (ns NetSuite) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (NetSuite) Name

func (ns NetSuite) Name() string

func (NetSuite) Route

func (ns NetSuite) Route() string

func (NetSuite) TokenSource

func (ns NetSuite) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (NetSuite) WithName

func (ns NetSuite) WithName(name string) NetSuite

type Procountor

type Procountor struct {
	// contains filtered or unexported fields
}

func NewProcountor

func NewProcountor() *Procountor

func (Procountor) Exchange

func (m Procountor) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Procountor) Name

func (m Procountor) Name() string

func (Procountor) Route

func (m Procountor) Route() string

func (Procountor) TokenSource

func (m Procountor) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Procountor) WithName

func (m Procountor) WithName(name string) Procountor

type Provider

type Provider interface {
	Name() string
	Route() string
	// OauthConfig() oauth2.Config
	Exchange(context.Context, TokenRequestParams, ...oauth2.AuthCodeOption) (*oauth2.Token, error)
	TokenSource(context.Context, TokenRequestParams) oauth2.TokenSource
}

type Providers

type Providers []Provider

func Load

func Load() Providers

type QuickBooks

type QuickBooks struct {
	// contains filtered or unexported fields
}

func NewQuickBooks

func NewQuickBooks() *QuickBooks

func (QuickBooks) Exchange

func (qb QuickBooks) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (QuickBooks) Name

func (qb QuickBooks) Name() string

func (QuickBooks) Route

func (qb QuickBooks) Route() string

func (QuickBooks) TokenSource

func (qb QuickBooks) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (QuickBooks) WithName

func (qb QuickBooks) WithName(name string) QuickBooks

type RevokeProvider

type RevokeProvider interface {
	Name() string
	RevokeRoute() string
	RevokeURL() string
}

type TokenRequestParams

type TokenRequestParams struct {
	ClientID     string
	ClientSecret string
	RefreshToken string
	Code         string
	RedirectURL  string
	CodeVerifier string

	Raw             map[string]json.RawMessage
	OriginalRequest *http.Request
}

type VismaNet

type VismaNet struct {
	// contains filtered or unexported fields
}

func NewVismaNet

func NewVismaNet() *VismaNet

func (VismaNet) Exchange

func (v VismaNet) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (VismaNet) Name

func (v VismaNet) Name() string

func (VismaNet) Route

func (v VismaNet) Route() string

func (VismaNet) TokenSource

func (v VismaNet) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (VismaNet) WithAuthURL

func (v VismaNet) WithAuthURL(u string) VismaNet

func (VismaNet) WithName

func (v VismaNet) WithName(name string) VismaNet

func (VismaNet) WithTokenURL

func (v VismaNet) WithTokenURL(u string) VismaNet

type VismaOnline

type VismaOnline struct {
	// contains filtered or unexported fields
}

func NewVismaOnline

func NewVismaOnline() *VismaOnline

func (VismaOnline) Exchange

func (v VismaOnline) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (VismaOnline) Name

func (v VismaOnline) Name() string

func (VismaOnline) Route

func (v VismaOnline) Route() string

func (VismaOnline) TokenSource

func (v VismaOnline) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (VismaOnline) WithAuthURL

func (v VismaOnline) WithAuthURL(u string) VismaOnline

func (VismaOnline) WithName

func (v VismaOnline) WithName(name string) VismaOnline

func (VismaOnline) WithTokenURL

func (v VismaOnline) WithTokenURL(u string) VismaOnline

type Xero

type Xero struct {
	// contains filtered or unexported fields
}

func NewXero

func NewXero() *Xero

func (Xero) Exchange

func (x Xero) Exchange(ctx context.Context, params TokenRequestParams, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

func (Xero) Name

func (x Xero) Name() string

func (Xero) Route

func (x Xero) Route() string

func (Xero) TokenSource

func (x Xero) TokenSource(ctx context.Context, params TokenRequestParams) oauth2.TokenSource

func (Xero) WithName

func (x Xero) WithName(name string) Xero

Jump to

Keyboard shortcuts

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