binder

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestDecoder

type RequestDecoder struct {
	Request *http.Request
}

func (*RequestDecoder) Bind

func (d *RequestDecoder) Bind(v interface{}) error

func (*RequestDecoder) BindBody

func (d *RequestDecoder) BindBody(v interface{}) error

func (*RequestDecoder) BindHeader

func (d *RequestDecoder) BindHeader()

func (*RequestDecoder) BindParams

func (d *RequestDecoder) BindParams(v interface{}) error

func (*RequestDecoder) BindQuery

func (d *RequestDecoder) BindQuery(v interface{}) error

type RequestEncoder

type RequestEncoder struct {
	Opts    *option.BinderOptions
	Request *http.Request
}

func NewRequestEncoder

func NewRequestEncoder(r *http.Request, opts ...option.BinderOption) *RequestEncoder

func (*RequestEncoder) Bind

func (e *RequestEncoder) Bind(v interface{}) error

func (*RequestEncoder) BindBody

func (e *RequestEncoder) BindBody(v interface{}) error

func (*RequestEncoder) BindHeader

func (e *RequestEncoder) BindHeader()

func (*RequestEncoder) BindParams

func (d *RequestEncoder) BindParams(v interface{}) error

func (*RequestEncoder) BindQuery

func (d *RequestEncoder) BindQuery(v interface{}) error

type ResponseDecoder

type ResponseDecoder struct {
	Response *http.Response
}

func (*ResponseDecoder) BindBody

func (d *ResponseDecoder) BindBody(v interface{}) error

type ResponseEncoder

type ResponseEncoder struct {
	ResponseWriter http.ResponseWriter
}

func (*ResponseEncoder) BindBody

func (e *ResponseEncoder) BindBody(v interface{}) error

Jump to

Keyboard shortcuts

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