Documentation ¶
Index ¶
- Constants
- func Write(w http.ResponseWriter, response interface{}, statusCode int)
- func WriteError(w http.ResponseWriter, err error, statusCode int, description string)
- func WriteSuccessWithLocation(w http.ResponseWriter, response interface{}, statusCode int, location string)
- type Header
- type ResponseBase
Constants ¶
View Source
const ( UserTokenHeaderName = "X-Go_P_Zo_UserToken" AuthTokenHeaderName = "Authorization" )
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(w http.ResponseWriter, response interface{}, statusCode int)
func WriteError ¶
func WriteError(w http.ResponseWriter, err error, statusCode int, description string)
func WriteSuccessWithLocation ¶
func WriteSuccessWithLocation(w http.ResponseWriter, response interface{}, statusCode int, location string)
Types ¶
type ResponseBase ¶
func NewResponse ¶
func NewResponse(err error, statusCode int, description string) *ResponseBase
Click to show internal directories.
Click to hide internal directories.