validator

package
v0.3.5-0...-95db35b Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MgoChecker

type MgoChecker struct {
	// contains filtered or unexported fields
}

MgoChecker is the default chcker for resource in MySQL DB

func NewMgoChecker

func NewMgoChecker(db *mgo.Database, collName string) MgoChecker

NewMgoChecker .

func (MgoChecker) Check

func (c MgoChecker) Check(id string) error

Check of MgoChecker .

func (MgoChecker) CheckInt64

func (c MgoChecker) CheckInt64(id int64) error

CheckInt64 of MgoChecker .

func (MgoChecker) Tag

func (c MgoChecker) Tag() string

Tag of MgoChecker .

type MySQLChecker

type MySQLChecker struct {
	// contains filtered or unexported fields
}

MySQLChecker is the default chcker for resource in MySQL DB

func NewMySQLChecker

func NewMySQLChecker(db *gorm.DB, tblName string) MySQLChecker

NewMySQLChecker .

func (MySQLChecker) Check

func (c MySQLChecker) Check(s string) error

Check of MySQLChecker .

func (MySQLChecker) CheckInt64

func (c MySQLChecker) CheckInt64(id int64) error

CheckInt64 of MySQLChecker .

func (MySQLChecker) Tag

func (c MySQLChecker) Tag() string

Tag of MySQLChecker .

type ResourceChecker

type ResourceChecker interface {
	Check(id string) error
	CheckInt64(id int64) error
	Tag() string
}

ResourceChecker .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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