discord

package
v0.0.0-...-0f7ec88 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorPage

func ErrorPage(c echo.Context, code int) error

func ImproveState

func ImproveState(s string) string

func ReverseState

func ReverseState(s string) string

func SuccessPageRedirect

func SuccessPageRedirect(c echo.Context, text, redirectURI string) error

Types

type DiscordAuthHandler

type DiscordAuthHandler struct {
	*echo.Group
	// contains filtered or unexported fields
}

func NewDiscordAuthHandler

func NewDiscordAuthHandler(app interfaces.App, g *echo.Group) *DiscordAuthHandler

func (*DiscordAuthHandler) BeginAuth

func (h *DiscordAuthHandler) BeginAuth() echo.HandlerFunc

func (*DiscordAuthHandler) Callback

func (h *DiscordAuthHandler) Callback() echo.HandlerFunc

func (*DiscordAuthHandler) CallbackLogin

func (h *DiscordAuthHandler) CallbackLogin(state *models.AuthDiscordState, token *oauth2.Token) echo.HandlerFunc

func (*DiscordAuthHandler) RequireAuth

func (h *DiscordAuthHandler) RequireAuth(opts ...OptionsFunc) func(next echo.HandlerFunc) echo.HandlerFunc

type Options

type Options struct {
	DoRedirect bool
	Redirect   string
}

type OptionsFunc

type OptionsFunc func(opts *Options)

func WithRedirect

func WithRedirect(to string) OptionsFunc

Jump to

Keyboard shortcuts

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