request

package
v1.0.1-0...-9759bbf Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrSchemaFileFormatNotSupported

func NewErrSchemaFileFormatNotSupported(ext string) error

NewErrSchemaFileFormatNotSupported error

func NewErrSchemaNotFound

func NewErrSchemaNotFound(name string) error

NewErrSchemaNotFound error

Types

type ErrSchemaFileFormatNotSupported

type ErrSchemaFileFormatNotSupported struct {
	Ext string
}

ErrSchemaFileFormatNotSupported type

func (*ErrSchemaFileFormatNotSupported) Error

type ErrSchemaNotFound

type ErrSchemaNotFound struct {
	Name string
}

ErrSchemaNotFound type

func (*ErrSchemaNotFound) Error

func (e *ErrSchemaNotFound) Error() string

type MockSchemaValidator

type MockSchemaValidator struct {
	mock.Mock
}

MockSchemaValidator is an autogenerated mock type for the SchemaValidator type

func (*MockSchemaValidator) SchemaValidator

func (_m *MockSchemaValidator) SchemaValidator() *spec.Schema

SchemaValidator provides a mock function with given fields:

type SchemaValidator

type SchemaValidator interface {
	SchemaValidator() *spec.Schema
}

SchemaValidator interface experimental

type Validator

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

Validator struct

func NewValidator

func NewValidator() *Validator

NewValidator constructor

func (*Validator) AddSchemFromObject

func (v *Validator) AddSchemFromObject(object SchemaValidator) error

AddSchemFromObject experimental

func (*Validator) AddSchemFromObjectName

func (v *Validator) AddSchemFromObjectName(name string, object SchemaValidator) error

AddSchemFromObjectName experimental

func (*Validator) AddSchema

func (v *Validator) AddSchema(name string, schema *spec.Schema) error

AddSchema by name

func (*Validator) AddSchemaFromFile

func (v *Validator) AddSchemaFromFile(name string, filename string) error

AddSchemaFromFile name

func (*Validator) AddSchemaFromJSON

func (v *Validator) AddSchemaFromJSON(name string, content json.RawMessage) error

AddSchemaFromJSON string

func (*Validator) AddSchemaFromReader

func (v *Validator) AddSchemaFromReader(name string, format string, reader io.Reader) error

AddSchemaFromReader func

func (*Validator) AddSchemaFromYAML

func (v *Validator) AddSchemaFromYAML(name string, content []byte) error

AddSchemaFromYAML string

func (Validator) Validate

func (v Validator) Validate(name string, data interface{}) *validate.Result

Validate data

Jump to

Keyboard shortcuts

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