handler

package
v0.0.0-...-21a8bdb Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: AGPL-3.0-or-later Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoLogin

func DoLogin(cfg ConfigService, db DatabaseService) echo.HandlerFunc

func DoRegister

func DoRegister(_ ConfigService, db DatabaseService) echo.HandlerFunc

func Home

func Home() echo.HandlerFunc

func Login

func Login(cfg ConfigService, _ DatabaseService) echo.HandlerFunc

func Register

func Register(_ ConfigService, _ DatabaseService) echo.HandlerFunc

Types

type ConfigService

type ConfigService interface {
	JWTSecret() string
	SessionSecret() string
	DisableRegistration() bool
	ProxyAuthUsernameHeader() string
	ProxyAuthNameHeader() string
}

type DatabaseService

type DatabaseService interface {
	FetchUserByUsername(ctx context.Context, email string) (dbx.User, error)
	CreateUser(ctx context.Context, arg dbx.CreateUserParams) (dbx.User, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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