validator

package
v0.0.0-...-33e0837 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePostitValidator

func CreatePostitValidator(fields *CreatPostitFields) url.Values

CreatePostitValidator validates create postit route

func LoginValidator

func LoginValidator(fields *LoginFields) url.Values

LoginValidator validates signin route

func SignupValidator

func SignupValidator(fields *SignupFields) url.Values

SignupValidator validates signup route

Types

type CreatPostitFields

type CreatPostitFields struct {
	Content string `json:"content"`
	Color   string `json:"color"`
	UserID  int    `json:"userId"`
}

type LoginFields

type LoginFields struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

LoginFields login validation field

type SignupFields

type SignupFields struct {
	Email           string `json:"email"`
	FirstName       string `json:"firstName"`
	LastName        string `json:"lastName"`
	Password        string `json:"password"`
	ConfirmPassword string `json:"confirmPassword"`
}

SignupFields signup validation field

Jump to

Keyboard shortcuts

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