request

package
v0.0.0-...-f12052e Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PasswordMinLength = 6
	PasswordMaxLength = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Login

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

Login represents a login request payload.

func (Login) Validate

func (r Login) Validate() error

Validate login request payload.

type NewHome

type NewHome struct {
	Title           string `form:"title" json:"title"`
	Location        string `form:"location" json:"location"`
	Description     string `form:"description" json:"description"`
	Peoples         int    `form:"peoples" json:"peoples"`
	Room            string `form:"room" json:"room"`
	Bed             string `form:"bed" json:"bed"`
	Rooms           int    `form:"rooms" json:"rooms"`
	Bathrooms       int    `form:"bathrooms" json:"bathrooms"`
	Smoking         bool   `form:"smoking" json:"smoking"`
	Guest           bool   `form:"guest" json:"guest"`
	Pet             bool   `form:"pet" json:"pet"`
	BillsIncluded   bool   `form:"bills_included" json:"bills_included"`
	Contract        string `form:"contract" json:"contract"`
	SecurityDeposit int    `form:"security_deposit" json:"security_deposit"`
	Price           int    `form:"price" json:"price"`
}

NewHome contains the home creation request payload.

func (NewHome) Validate

func (r NewHome) Validate() error

Validate home creation request payload.

type Register

type Register struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Password string `json:"password"`
}

Register represents a register request payload.

func (Register) Validate

func (r Register) Validate() error

Validate register request payload.

Jump to

Keyboard shortcuts

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