validate

package
Version: v0.0.0-...-451fb61 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

*

* Created by GoLand.
* User: xzghua@gmail.com
* Date: 2019-05-10
* Time: 23:23

*

* Created by GoLand.
* User: xzghua@gmail.com
* Date: 2019-05-11
* Time: 00:43

*

* Created by GoLand.
* User: xzghua@gmail.com
* Date: 2019-04-18
* Time: 00:05

*

* Created by GoLand.
* User: xzghua@gmail.com
* Date: 2019-05-08
* Time: 23:00

*

* Created by GoLand.
* User: xzghua@gmail.com
* Date: 2019-01-12
* Time: 19:20

*

* Created by GoLand.
* User: xzghua@gmail.com
* Date: 2019-05-07
* Time: 23:30

*

* Created by GoLand.
* User: zhu
* Email: ylsc633@gmail.com
* Date: 2019-04-23
* Time: 17:46

*

* Created by GoLand.
* User: xzghua@gmail.com
* Date: 2019-01-12
* Time: 19:48

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthLogin

type AuthLogin struct {
	Email      string `valid:"Required;Email"`
	Password   string `valid:"Required;MaxSize(30)"`
	Captcha    string `valid:"Required;MaxSize(5)"`
	CaptchaKey string `valid:"Required;MaxSize(30)"`
}

func (*AuthLogin) Message

func (av *AuthLogin) Message() map[string]int

type AuthLoginV

type AuthLoginV struct {
}

func (*AuthLoginV) MyValidate

func (av *AuthLoginV) MyValidate() gin.HandlerFunc

type AuthRegister

type AuthRegister struct {
	UserName string `valid:"Required;MaxSize(30)"`
	Email    string `valid:"Required;Email"`
	Password string `valid:"Required;MaxSize(30)"`
}

func (*AuthRegister) Message

func (av *AuthRegister) Message() map[string]int

type AuthRegisterV

type AuthRegisterV struct {
}

func (*AuthRegisterV) MyValidate

func (av *AuthRegisterV) MyValidate() gin.HandlerFunc

type CateStore

type CateStore struct {
	Name        string `valid:"Required;MaxSize(100)"`
	DisplayName string `valid:"Required;MaxSize(100)"`
	ParentId    int    `valid:"Min(0)"`
	SeoDesc     string `valid:"Required;MaxSize(250)"`
}

func (*CateStore) Message

func (c *CateStore) Message() map[string]int

type CateStoreV

type CateStoreV struct {
}

func (*CateStoreV) MyValidate

func (cv *CateStoreV) MyValidate() gin.HandlerFunc

type LinkStore

type LinkStore struct {
	Name  string `valid:"Required;MaxSize(100)"`
	Link  string `valid:"Required;MaxSize(100)"`
	Order int    `valid:"Min(0)"`
}

func (*LinkStore) Message

func (c *LinkStore) Message() map[string]int

type LinkStoreV

type LinkStoreV struct {
}

func (*LinkStoreV) MyValidate

func (lv *LinkStoreV) MyValidate() gin.HandlerFunc

type PostStore

type PostStore struct {
	Title string `valid:"Required"`
	Tags  []int
	//Category int `valid:Required`
	Summary string `valid:"Required;"`
}

func (*PostStore) Message

func (c *PostStore) Message() map[string]int

type PostStoreV

type PostStoreV struct {
}

func (*PostStoreV) MyValidate

func (pv *PostStoreV) MyValidate() gin.HandlerFunc

type SomeValidate

type SomeValidate struct {
	NewPostV        V
	NewCateV        V
	NewTagV         V
	NewSystemV      V
	NewLinkV        V
	NewAuthLoginV   V
	NewAuthRegister V
}

func NewValidate

func NewValidate() *SomeValidate

type SystemUpdate

type SystemUpdate struct {
	Title        string `valid:"Required;MaxSize(100)"`
	Keywords     string `valid:"Required;MaxSize(100)"`
	Description  string `valid:"Required;MaxSize(250)"`
	RecordNumber string `valid:"Required;MaxSize(50)"`
	Theme        int    `valid:"Required;"`
}

func (*SystemUpdate) Message

func (c *SystemUpdate) Message() map[string]int

type SystemUpdateV

type SystemUpdateV struct {
}

func (*SystemUpdateV) MyValidate

func (sv *SystemUpdateV) MyValidate() gin.HandlerFunc

type TagStore

type TagStore struct {
	Name        string `valid:"Required;MaxSize(100)"`
	DisplayName string `valid:"Required;MaxSize(100)"`
	SeoDesc     string `valid:"Required;MaxSize(250)"`
}

func (*TagStore) Message

func (c *TagStore) Message() map[string]int

type TagStoreV

type TagStoreV struct {
}

func (*TagStoreV) MyValidate

func (tv *TagStoreV) MyValidate() gin.HandlerFunc

type V

type V interface {
	MyValidate() gin.HandlerFunc
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL