types

package
v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PasswordEquals = func(confirm_password string) validation.RuleFunc {
	return func(value interface{}) error {
		password, _ := value.(string)
		if password != confirm_password {
			return errors.New("passwords don't match")
		}
		return nil
	}
}
function PasswordEquals: of password equals confirm password

-----

var PasswordEqual = func(...) ... {
	...
}

equals,

func PasswordEquals(...) ... {
	...
}

Functions

This section is empty.

Types

type LoginForm

type LoginForm struct {
	Username string `form:"username"`
	Password string `form:"password"`
}

* type LoginForm: of a username and password * * @method: POST * @controller: Login * (session_controller.go) * @route: /login

func (LoginForm) Validate

func (lf LoginForm) Validate() error

(type PasswordForm) Validate: of a validate username and password

type NewPasswordForm

type NewPasswordForm struct {
	OldPassword        string `form:"old_password"`
	NewPassword        string `form:"new_password"`
	ConfirmNewPassword string `form:"confirm_new_password"`
}

* type NewPasswordForm: of a password user * * @method: POST * @controller: UpdateUserByPassword * (user_controller.go) * @route: /login

type UserForm

type UserForm struct {
	Username        string `form:"username"`
	Email           string `form:"email"`
	Password        string `form:"password"`
	ConfirmPassword string `form:"confirm_password"`
	Name            string `form:"name"`
	City            uint   `form:"city"`
	Photo           string `form:"photo"`
}

* type userForm: of a user * * @method: POST * @controller: CreateUser * (user_controller.go) * @route: /users/add

Jump to

Keyboard shortcuts

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