account

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Registry = map[string]*Def{}

Registry of all account provider

Functions

func Register

func Register(name string, def *Def)

Register add account provider definition to the registry

Types

type Creator

type Creator func(conf *config.Config) (Provider, error)

Creator function for create an account provider

type Def

type Def struct {
	Name   string
	Desc   string
	Create Creator
}

Def is a webhook provider definition

type Provider

type Provider interface {
	RequestHandler(w http.ResponseWriter, r *http.Request) error
	AuthorizeHandler(w http.ResponseWriter, r *http.Request) error
}

Provider used for account linking

func NewAccountProvider

func NewAccountProvider(name string, conf *config.Config) (Provider, error)

NewAccountProvider create new account provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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