Documentation ¶
Index ¶
- func Authentication(h http.HandlerFunc) http.HandlerFunc
- func Authorization(roles ...int) func(http.HandlerFunc) http.HandlerFunc
- func EnableCORS(h http.Handler) http.Handler
- func Logging(logger glog.Logger) func(inner http.Handler) http.Handler
- func RequestID(h http.Handler) http.Handler
- func RoleCheck(r *http.Request, roles ...int) bool
- func StaticCache(h http.Handler, maxAge int) http.Handler
- func StatusResponseWriter(h http.Handler) http.Handler
- type JWTConf
- type MyResponseWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authentication ¶
func Authentication(h http.HandlerFunc) http.HandlerFunc
func Authorization ¶
func Authorization(roles ...int) func(http.HandlerFunc) http.HandlerFunc
Types ¶
type MyResponseWriter ¶
type MyResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
func (*MyResponseWriter) Status ¶
func (w *MyResponseWriter) Status() int
func (*MyResponseWriter) WriteHeader ¶
func (w *MyResponseWriter) WriteHeader(code int)
Click to show internal directories.
Click to hide internal directories.