Documentation ¶
Index ¶
- func NewErrSchemaFileFormatNotSupported(ext string) error
- func NewErrSchemaNotFound(name string) error
- type ErrSchemaFileFormatNotSupported
- type ErrSchemaNotFound
- type MockSchemaValidator
- type SchemaValidator
- type Validator
- func (v *Validator) AddSchemFromObject(object SchemaValidator) error
- func (v *Validator) AddSchemFromObjectName(name string, object SchemaValidator) error
- func (v *Validator) AddSchema(name string, schema *spec.Schema) error
- func (v *Validator) AddSchemaFromFile(name string, filename string) error
- func (v *Validator) AddSchemaFromJSON(name string, content json.RawMessage) error
- func (v *Validator) AddSchemaFromReader(name string, format string, reader io.Reader) error
- func (v *Validator) AddSchemaFromYAML(name string, content []byte) error
- func (v Validator) Validate(name string, data interface{}) *validate.Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrSchemaFileFormatNotSupported ¶
NewErrSchemaFileFormatNotSupported error
Types ¶
type ErrSchemaFileFormatNotSupported ¶
type ErrSchemaFileFormatNotSupported struct {
Ext string
}
ErrSchemaFileFormatNotSupported type
func (*ErrSchemaFileFormatNotSupported) Error ¶
func (e *ErrSchemaFileFormatNotSupported) Error() string
type ErrSchemaNotFound ¶
type ErrSchemaNotFound struct {
Name string
}
ErrSchemaNotFound type
func (*ErrSchemaNotFound) Error ¶
func (e *ErrSchemaNotFound) Error() string
type MockSchemaValidator ¶
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 ¶
SchemaValidator interface experimental
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator struct
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) AddSchemaFromFile ¶
AddSchemaFromFile name
func (*Validator) AddSchemaFromJSON ¶
func (v *Validator) AddSchemaFromJSON(name string, content json.RawMessage) error
AddSchemaFromJSON string
func (*Validator) AddSchemaFromReader ¶
AddSchemaFromReader func
func (*Validator) AddSchemaFromYAML ¶
AddSchemaFromYAML string
Click to show internal directories.
Click to hide internal directories.