vendors

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OAuthProviderApps = []string{
	github.ID,
	pocket.ID,
	dropbox.ID,
}
View Source
var ProviderCredentialOptions = map[string]interface{}{
	github.ID: map[string]string{
		github.ClientIdKey:     "Client ID",
		github.ClientSecretKey: "Client secrets",
	},
	pocket.ID: map[string]string{
		pocket.ClientIdKey: "Consumer Key",
	},
	pushover.ID: map[string]string{
		pushover.TokenKey: "API Token",
		pushover.UserKey:  "User Key",
	},
	dropbox.ID: map[string]string{
		dropbox.ClientIdKey:     "App key",
		dropbox.ClientSecretKey: "App secret",
	},
	email.ID: map[string]string{
		email.Host:     "SMTP Host",
		email.Port:     "SMTP Port",
		email.Username: "Username Mail",
		email.Password: "Password",
	},
	cloudflare.ID: map[string]string{
		cloudflare.Token:     "Api Token",
		cloudflare.ZoneID:    "Zone ID",
		cloudflare.AccountID: "Account ID",
	},
	cloudcone.ID: map[string]string{
		cloudcone.ApiKey:  "Api Key",
		cloudcone.ApiHash: "Api Hash",
	},
	doctorxiong.ID: map[string]string{
		doctorxiong.Token: "Api Token",
	},
}

Functions

func CreateRedisClient added in v0.0.24

func CreateRedisClient(id string) (*redis.Client, error)

Types

type OAuthProvider

type OAuthProvider interface {
	AuthorizeURL() string
	GetAccessToken(code string) (interface{}, error)
	Redirect(c *fiber.Ctx, gateway *sdk.GatewayClient) error
	StoreAccessToken(c *fiber.Ctx, gateway *sdk.GatewayClient) error
}

func NewOAuthProvider

func NewOAuthProvider(rdb *redis.Client, category, url string) OAuthProvider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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