Documentation ¶
Index ¶
- func BadRequest(rw http.ResponseWriter, message string, args ...interface{}) error
- func Created(rw http.ResponseWriter, response interface{}) error
- func Errorf(rw http.ResponseWriter, statusCode int, message string, args ...interface{}) error
- func Init(router *mux.Router, privKey, pubKey string, vars map[string]interface{}) error
- func InternalServerError(rw http.ResponseWriter, message string, args ...interface{}) error
- func LoadSecureKeys(privateKeyPath, publicKeyPath string) (err error)
- func NoContent(rw http.ResponseWriter) error
- func NotFound(rw http.ResponseWriter, message string, args ...interface{}) error
- func OK(rw http.ResponseWriter, response interface{}) error
- func Register(endpoint *Endpoint)
- func Resource(path string, res interface{}, public bool)
- func SignToken(token *jwt.Token) (string, error)
- func Success(rw http.ResponseWriter, statusCode int, response interface{}) error
- type Context
- type ContextHandler
- type Deleter
- type Endpoint
- type Getter
- type Poster
- type Putter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
func BadRequest(rw http.ResponseWriter, message string, args ...interface{}) error
func Created ¶
func Created(rw http.ResponseWriter, response interface{}) error
func Errorf ¶
func Errorf(rw http.ResponseWriter, statusCode int, message string, args ...interface{}) error
func InternalServerError ¶
func InternalServerError(rw http.ResponseWriter, message string, args ...interface{}) error
func LoadSecureKeys ¶
func NoContent ¶
func NoContent(rw http.ResponseWriter) error
func OK ¶
func OK(rw http.ResponseWriter, response interface{}) error
Types ¶
type Context ¶
type Context struct { Router *mux.Router Vars map[string]interface{} T i18n.TranslateFunc Token *jwt.Token // contains filtered or unexported fields }
type ContextHandler ¶
Click to show internal directories.
Click to hide internal directories.