auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

templ: version: v0.2.747

templ: version: v0.2.747

templ: version: v0.2.747

Index

Constants

View Source
const (
	IdentifierField = "email"
	PasswordField   = "password"
)
View Source
const (
	EmailField          = "email"
	UsernameField       = "username"
	PasswordRepeatField = "password_repeat"
)

Variables

This section is empty.

Functions

func LoginForm

func LoginForm(lfv LoginFormValue, lfe LoginFormErrors, err error) templ.Component

func LoginPage

func LoginPage(c shared.Context, lpf LoginPageForms) templ.Component

func RegisterForm

func RegisterForm(rfv RegisterFormValue, rfe RegisterFormErrors, err error) templ.Component

Types

type LoginFormErrors

type LoginFormErrors struct {
	Identifier error
	Password   error
}

type LoginFormValue

type LoginFormValue struct {
	Identifier string
	Password   string
}

func GetLoginFormValue

func GetLoginFormValue(c echo.Context) LoginFormValue

func (LoginFormValue) Validate

func (lfv LoginFormValue) Validate() (LoginFormErrors, error)

type LoginPageForms

type LoginPageForms struct {
	LoginFormValue     LoginFormValue
	LoginFormErrors    LoginFormErrors
	RegisterFormValue  RegisterFormValue
	RegisterFormErrors RegisterFormErrors
}

type RegisterFormErrors

type RegisterFormErrors struct {
	Email          error
	Username       error
	Password       error
	PasswordRepeat error
}

type RegisterFormValue

type RegisterFormValue struct {
	Email          string
	Username       string
	Password       string
	PasswordRepeat string
}

func GetRegisterFormValue

func GetRegisterFormValue(c echo.Context) RegisterFormValue

func (RegisterFormValue) Validate

func (rfv RegisterFormValue) Validate() (RegisterFormErrors, error)

Jump to

Keyboard shortcuts

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