valid

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOptimisticLock = errors.New("optimistic lock")

Functions

func Bind added in v1.0.9

func Bind[T kvalid.RuleHolder[T]](ctx *gin.Context, method string, old T) error

Bind 数据绑定并校验.

func LockBind added in v1.0.12

func LockBind[T kvalid.RuleHolder[T]](ctx *gin.Context, method string, old T) error

func NewBadRequestError added in v1.0.7

func NewBadRequestError(err error) error

func NewPoint

func NewPoint[T any](src T) (T, bool)

Types

type BadRequestError added in v1.0.7

type BadRequestError string

func (BadRequestError) Error added in v1.0.7

func (p BadRequestError) Error() string

func (BadRequestError) String added in v1.0.8

func (p BadRequestError) String() string

type BytesMarshaler added in v1.0.11

type BytesMarshaler []byte

func NewBytesMarshaler added in v1.0.11

func NewBytesMarshaler(marshaler json.Marshaler) BytesMarshaler

func (BytesMarshaler) MarshalJSON added in v1.0.11

func (p BytesMarshaler) MarshalJSON() ([]byte, error)

type Service added in v1.0.10

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

func NewService added in v1.0.10

func NewService() *Service

func (*Service) Add added in v1.0.10

func (p *Service) Add(jsoners ...kvalid.ValidJSONer)

func (*Service) Etag added in v1.0.15

func (p *Service) Etag(ctx *gin.Context) string

func (*Service) Router added in v1.0.10

func (p *Service) Router(group *gin.RouterGroup)

Jump to

Keyboard shortcuts

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