handler

package
v0.0.0-...-63cad89 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoLogin

func DoLogin(cfg ConfigService, userService UserService) echo.HandlerFunc

func DoRegister

func DoRegister(_ ConfigService, userService UserService) echo.HandlerFunc

func Home

func Home(_ ConfigService, _ UserService) echo.HandlerFunc

func Login

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

func Register

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

Types

type ConfigService

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

type UserService

type UserService interface {
	FetchUserByUsername(ctx context.Context, username string) (dbx.User, error)
	CreateUser(ctx context.Context, name string, username string, encryptedPassword string) (dbx.User, error)
}

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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