Documentation
¶
Index ¶
- type Binder
- func (m *Binder) Bind(request *protocol.Request, i interface{}, params param.Params) error
- func (m *Binder) BindAndValidate(request *protocol.Request, i interface{}, params param.Params) error
- func (m *Binder) BindForm(request *protocol.Request, i interface{}) error
- func (m *Binder) BindHeader(request *protocol.Request, i interface{}) error
- func (m *Binder) BindJSON(request *protocol.Request, i interface{}) error
- func (m *Binder) BindPath(request *protocol.Request, i interface{}, params param.Params) error
- func (m *Binder) BindProtobuf(request *protocol.Request, i interface{}) error
- func (m *Binder) BindQuery(request *protocol.Request, i interface{}) error
- func (m *Binder) Name() string
- func (m *Binder) Validate(request *protocol.Request, i interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binder ¶
type Binder struct {
ValidateError error // Error to return from Validate method
}
Binder provides a mock implementation of the Binder interface for testing.
func NewBinderWithValidateError ¶
NewBinderWithValidateError creates a new mock binder that returns the specified error from Validate.
func (*Binder) BindAndValidate ¶
func (*Binder) BindHeader ¶
func (*Binder) BindProtobuf ¶
Click to show internal directories.
Click to hide internal directories.