Documentation ¶
Index ¶
- Constants
- func ExtractBody(request *Request, unmarshaler types.Unmarshaler, pointer interface{}, ...) error
- func ExtractParam(key string, paramPlacing placing.Placing, request *Request, configs []Option, ...) error
- func GetUnmarshaler(request *Request) (types.Unmarshaler, error)
- type HandlerParams
- type Option
- type Parameter
- type Request
- func (r *Request) AddInPathParameter(key string, value string)
- func (r *Request) All() map[placing.Placing]map[string]string
- func (r *Request) Body() interface{}
- func (r *Request) Bool(key string, paramPlacing placing.Placing) bool
- func (r *Request) Float(key string, paramPlacing placing.Placing) float64
- func (r *Request) GetParameter(key string, paramPlacing placing.Placing) string
- func (r *Request) GetRequest() *http.Request
- func (r *Request) Headers() map[string][]string
- func (r *Request) Integer(key string, paramPlacing placing.Placing) int64
- func (r *Request) String(key string, paramPlacing placing.Placing) string
- func (r *Request) Time(key, layout string, paramPlacing placing.Placing) time.Time
Constants ¶
View Source
const ( IntBase int = 10 BitSize int = 64 )
Variables ¶
This section is empty.
Functions ¶
func ExtractBody ¶
func ExtractBody(request *Request, unmarshaler types.Unmarshaler, pointer interface{}, configs []Option) error
func ExtractParam ¶
func ExtractParam( key string, paramPlacing placing.Placing, request *Request, configs []Option, convert func(string) (interface{}, error), ) error
ExtractParam - extracting parameter from context, calls middleware and saves to 'context.parameters[from][key]'. After this parameter can be retrieved from context using 'context.Query' methods.
func GetUnmarshaler ¶
func GetUnmarshaler(request *Request) (types.Unmarshaler, error)
Types ¶
type HandlerParams ¶
type HandlerParams func(*Request, http.ResponseWriter) error
type Request ¶
type Request struct { Description string // contains filtered or unexported fields }
Request - provide methods for extracting r parameters from context.
func (*Request) AddInPathParameter ¶
func (*Request) GetParameter ¶
func (*Request) GetRequest ¶
Click to show internal directories.
Click to hide internal directories.