provider

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureProvider

func ConfigureProvider(name string, config pluginConfig.ProviderConfig)

func CreateProvider

func CreateProvider(id string) (goth.Provider, error)

func EnabledProviders

func EnabledProviders() []string

func ProviderExists

func ProviderExists(id string) bool

func ProviderName

func ProviderName(provider string) string

func RegisterProvider

func RegisterProvider(id string, name string, factory ProviderFactory)

func SetProviderOrder

func SetProviderOrder(order []string)

Types

type ProviderFactory

type ProviderFactory func(key, secret, callback string) (goth.Provider, error)

type ProviderSetup

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

func NewProviderSetup

func NewProviderSetup() *ProviderSetup

NewProviderSetup creates a new ProviderSetup

func Provider

func Provider() *ProviderSetup

func (*ProviderSetup) ConfigureProvider

func (ps *ProviderSetup) ConfigureProvider(id string, config pluginConfig.ProviderConfig)

ConfigureProvider sets the configuration for a provider

func (*ProviderSetup) CreateProvider

func (ps *ProviderSetup) CreateProvider(name string) (goth.Provider, error)

CreateProvider creates a goth.Provider instance for the given provider name

func (*ProviderSetup) EnabledProviders

func (ps *ProviderSetup) EnabledProviders() []string

EnabledProviders returns a list of enabled providers in the specified order

func (*ProviderSetup) ProviderExists

func (ps *ProviderSetup) ProviderExists(id string) bool

func (*ProviderSetup) ProviderName

func (ps *ProviderSetup) ProviderName(name string) string

func (*ProviderSetup) RegisterProvider

func (ps *ProviderSetup) RegisterProvider(id string, name string, factory ProviderFactory)

RegisterProvider registers a provider factory

func (*ProviderSetup) SetContext

func (ps *ProviderSetup) SetContext(ctx core.Context)

func (*ProviderSetup) SetProviderOrder

func (ps *ProviderSetup) SetProviderOrder(order []string)

SetProviderOrder sets the custom order for providers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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