Documentation ¶
Index ¶
- type Respond
- func (r *Respond) ErrorBadRequest(w http.ResponseWriter, err error)
- func (r *Respond) ErrorForbidden(w http.ResponseWriter, err error)
- func (r *Respond) ErrorInternal(w http.ResponseWriter, err error)
- func (r *Respond) ErrorUnauthorized(w http.ResponseWriter, err error)
- func (r *Respond) SendJSON(w http.ResponseWriter, responseData interface{})
- type Responder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Respond ¶
type Respond struct {
// contains filtered or unexported fields
}
func (*Respond) ErrorBadRequest ¶
func (r *Respond) ErrorBadRequest(w http.ResponseWriter, err error)
func (*Respond) ErrorForbidden ¶
func (r *Respond) ErrorForbidden(w http.ResponseWriter, err error)
func (*Respond) ErrorInternal ¶
func (r *Respond) ErrorInternal(w http.ResponseWriter, err error)
func (*Respond) ErrorUnauthorized ¶
func (r *Respond) ErrorUnauthorized(w http.ResponseWriter, err error)
func (*Respond) SendJSON ¶
func (r *Respond) SendJSON(w http.ResponseWriter, responseData interface{})
type Responder ¶
type Responder interface { SendJSON(w http.ResponseWriter, responseData interface{}) ErrorBadRequest(w http.ResponseWriter, err error) ErrorForbidden(w http.ResponseWriter, err error) ErrorInternal(w http.ResponseWriter, err error) }
Click to show internal directories.
Click to hide internal directories.