validator

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 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 Option

type Option interface {
	// contains filtered or unexported methods
}

func WithValidatorType

func WithValidatorType(validatorType ValidatorType) Option

type Validator

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

func NewValidator

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

type ValidatorType

type ValidatorType int
const (
	Json ValidatorType
)

func (ValidatorType) String

func (i ValidatorType) String() string

Directories

Path Synopsis
provider

Jump to

Keyboard shortcuts

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