Documentation ¶
Overview ¶
Package request provides functions for handling HTTP requests
Index ¶
- Variables
- type Error
- type FormFile
- func (ff *FormFile) ContentType() string
- func (ff *FormFile) CopyTo(dst io.Writer) (written int64, err error)
- func (ff *FormFile) FieldName() string
- func (ff *FormFile) FileHeader() *multipart.FileHeader
- func (ff *FormFile) FileName() string
- func (ff *FormFile) Multiple() bool
- func (ff *FormFile) SaveFile(name string, perm os.FileMode) error
- type Options
- type Request
- type Success
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Logger holds the global logger that can be override by another logger Logger *log.Logger // ContextKeys holds request context keys ContextKeys = struct { PathPrefix contextKey }{ PathPrefix: "PathPrefix", } )
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { ID string `json:"id,omitempty"` StatusCode int `json:"statusCode,omitempty"` Message string `json:"message,omitempty"` Error interface{} `json:"error,omitempty"` Internal interface{} `json:"-"` }
Error represents an HTTP error
type FormFile ¶
type FormFile struct {
// contains filtered or unexported fields
}
FormFile represents a form file
func (*FormFile) ContentType ¶
ContentType returns the content type of the form file
func (*FormFile) FileHeader ¶
func (ff *FormFile) FileHeader() *multipart.FileHeader
FileHeader returns the file header for the form file
type Options ¶
type Options struct { // Request holds the request Request *http.Request // Writer holds the response writer Writer http.ResponseWriter // MaxMemory holds the maximum memory for multi part form parsing MaxMemory int64 }
Options represents the options than can be set when creating a new request
Click to show internal directories.
Click to hide internal directories.