Documentation ¶
Index ¶
- Constants
- func NewCors(handler http.Handler) http.Handler
- func NewLogger(handler http.Handler) http.Handler
- func ParseLimit(str string) (limit int, err error)
- func ParseOffset(str string) (limit int, err error)
- func ParseSort(str string, fields []string) (field string, asc bool, err error)
- type CorsMiddleware
- type LoggerMiddleWare
Constants ¶
View Source
const DEFAULT_LIMIT = 100
View Source
const DEFAULT_OFFSET = 0
Variables ¶
This section is empty.
Functions ¶
func ParseLimit ¶
func ParseOffset ¶
Types ¶
type CorsMiddleware ¶
type CorsMiddleware struct {
// contains filtered or unexported fields
}
func (*CorsMiddleware) ServeHTTP ¶
func (this *CorsMiddleware) ServeHTTP(res http.ResponseWriter, req *http.Request)
type LoggerMiddleWare ¶
type LoggerMiddleWare struct {
// contains filtered or unexported fields
}
func (*LoggerMiddleWare) ServeHTTP ¶
func (this *LoggerMiddleWare) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.