request

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

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetErrorMsg

func GetErrorMsg(request interface{}, err error) string

GetErrorMsg 获取错误信息

Types

type AttachmentDownloadForm

type AttachmentDownloadForm struct {
	Number   string `json:"number" binding:"required"`
	FileName string `json:"fileName" binding:"required"`
}

func (AttachmentDownloadForm) GetMessages

func (attachmentDownloadForm AttachmentDownloadForm) GetMessages() ValidatorMessages

type ImageUpload

type ImageUpload struct {
	Business string                `form:"business" json:"business" binding:"required"`
	Image    *multipart.FileHeader `form:"image" json:"image" binding:"required"`
}

func (ImageUpload) GetMessages

func (imageUpload ImageUpload) GetMessages() ValidatorMessages

type Login

type Login struct {
	Email    string `form:"email" json:"email" binding:"required,email"`
	Password string `form:"password" json:"password" binding:"required"`
}

func (Login) GetMessages

func (login Login) GetMessages() ValidatorMessages

type PushQuotation

type PushQuotation struct {
	UUID           string  `form:"uuid" json:"uuid" binding:"required"`
	Title          string  `form:"title" json:"title" binding:"required"`
	Desc           string  `form:"desc" json:"desc" binding:"required"`
	PartnerName    string  `form:"partnerName" json:"partnerName" binding:"required"`
	RequirementNo  string  `form:"requirementNo" json:"requirementNo" binding:"required"`
	FileName       string  `form:"fileName" json:"fileName" binding:"required"`
	FilePath       string  `form:"filePath" json:"filePath" binding:"required"`
	Amount         float64 `form:"amount" json:"amount" binding:"required"`
	TotalPersonDay float32 `form:"totalPersonDay" json:"totalPersonDay" binding:"required"`
	IsSync         bool    `form:"is_sync" json:"is_sync" binding:"required"`
}

func (PushQuotation) GetMessages

func (PushQuotation PushQuotation) GetMessages() ValidatorMessages

type PushQuotations

type PushQuotations struct {
	Quotations []PushQuotation `form:"quotations" json:"quotations" binding:"required"`
}

type PushStory

type PushStory struct {
	UUID   string `form:"uuid" json:"uuid" binding:"required"`
	Title  string `form:"title" json:"title" binding:"required"`
	Desc   string `form:"desc" json:"desc" binding:"required"`
	Number string `form:"number" json:"number" binding:"required"`
}

func (PushStory) GetMessages

func (PushStory PushStory) GetMessages() ValidatorMessages

type QueryQuotations

type QueryQuotations struct {
	UUID string `form:"uuid" json:"uuid" binding:"required"`
}

type Register

type Register struct {
	Email    string `form:"email" json:"email" binding:"required"`
	Password string `form:"password" json:"password" binding:"required"`
}

func (Register) GetMessages

func (register Register) GetMessages() ValidatorMessages

type Tasks

type Tasks struct {
	Stories []PushStory `form:"stories" json:"stories" binding:"required"`
}

type Validator

type Validator interface {
	GetMessages() ValidatorMessages
}

type ValidatorMessages

type ValidatorMessages map[string]string

Jump to

Keyboard shortcuts

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