validator

package
v0.0.48 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrWrapper

func ErrWrapper(err Err) error

Types

type Err

type Err int
const (
	UnknownErrCode Err = iota
	IllegalParams      // wrong params
	IllegalKeyType     // wrong validatorType
)

func (Err) String

func (i Err) String() string

type OptionFunc added in v0.0.46

type OptionFunc func(*validator)

func WithValidatorType

func WithValidatorType(validatorType ValidatorType) OptionFunc

type Validator

type Validator interface {
	Validate([]byte, []byte) error
}

func NewValidator

func NewValidator(opts ...OptionFunc) (Validator, error)

type ValidatorType

type ValidatorType int
const (
	Json ValidatorType
)

func (ValidatorType) String

func (i ValidatorType) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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