Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FuncValidator ¶
type FuncValidator func(value interface{}) error
FuncValidator is an adapter to allow the use of ordinary functions as validators. If f is a function with the appropriate signature, Func(f) is a Validator that calls f.
func (FuncValidator) Validate ¶
func (fv FuncValidator) Validate(value interface{}) error
Validate calls fv(value).
type NamedValidator ¶
NamedValidator holds a validator and its corresponding operation name, to which the request belongs.
func Op ¶
func Op(name string, validator Validator) NamedValidator
Op is a shortcut for creating an instance of NamedValidator.
type Option ¶
type Option func(*Options)
Option sets an optional parameter for Options.
func RequestValidators ¶
func RequestValidators(validators ...NamedValidator) Option
RequestValidators sets the request validators for Options.
func ResponseSchema ¶
ResponseSchema sets the response schema for Options.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func NewOptions ¶
func (*Options) RequestValidator ¶
func (*Options) ResponseSchema ¶
Click to show internal directories.
Click to hide internal directories.