forms

package
v0.0.0-...-5b323e4 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeywordForm

type KeywordForm struct {
	File       multipart.File
	FileHeader *multipart.FileHeader
	User       *models.User `valid:"Required"`

	Keywords []string
}

func (*KeywordForm) Save

func (keywordForm *KeywordForm) Save() error

func (*KeywordForm) Valid

func (keywordForm *KeywordForm) Valid(v *validation.Validation)

type RegistrationForm

type RegistrationForm struct {
	Email                string `form:"email" valid:"Required; Email; MaxSize(100)"`
	Password             string `form:"password" valid:"Required; MinSize(6)"`
	PasswordConfirmation string `form:"password_confirmation" valid:"Required; MinSize(6)"`
}

func (*RegistrationForm) CreateUser

func (registrationForm *RegistrationForm) CreateUser() (*models.User, error)

func (*RegistrationForm) Valid

func (registrationForm *RegistrationForm) Valid(v *validation.Validation)

type SessionForm

type SessionForm struct {
	Email    string `form:"email" valid:"Required; Email; MaxSize(100)"`
	Password string `form:"password" valid:"Required; MinSize(6)"`
}

func (*SessionForm) Authenticate

func (form *SessionForm) Authenticate() (*models.User, error)

Jump to

Keyboard shortcuts

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