validator

package
v0.0.0-...-6c91261 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Form

type Form map[string]Validator

func (Form) Validate

func (f Form) Validate(ctx context.Context, message protoreflect.Message) error

type Validator

type Validator interface {
	Validate(ctx context.Context, value protoreflect.Value) error
}

func NewAlphanumeric

func NewAlphanumeric() Validator

func NewDatetime

func NewDatetime(duration time.Duration) Validator

func NewDeliveredAt

func NewDeliveredAt() Validator

func NewEnum

func NewEnum(values map[int32]string) Validator

func NewFloat64

func NewFloat64(condition string) Validator

func NewFloat64Gt

func NewFloat64Gt(min float64) Validator

func NewFloat64Lt

func NewFloat64Lt(max float64) Validator

func NewMessage

func NewMessage(form Form) Validator

func NewMinDatetime

func NewMinDatetime() Validator

func NewOptList

func NewOptList(v Validator) Validator

func NewPhoneNumber

func NewPhoneNumber() Validator

func NewReqList

func NewReqList(v Validator) Validator

func NewReqString

func NewReqString() Validator

func NewString

func NewString(condition string) Validator

func NewStringWithMaxLen

func NewStringWithMaxLen(l int) Validator

func NewUUID

func NewUUID() Validator

func NewUint32

func NewUint32(condition string) Validator

func NewUint32Min

func NewUint32Min(min uint32) Validator

Jump to

Keyboard shortcuts

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