Documentation ¶
Overview ¶
filename: 2xx.go author: Thomas Lombard copyright: Thomas Lombard license: MIT status: published
filename: error.go author: Thomas Lombard copyright: Thomas Lombard license: MIT status: published
filename: respond.go author: Thomas Lombard copyright: Thomas Lombard license: MIT status: published
Index ¶
- func Send(c echo.Context, httpCode int, reader io.Reader, message ...interface{}) error
- func SendAccepted(c echo.Context, reader io.Reader, message ...interface{}) error
- func SendCreated(c echo.Context, reader io.Reader, message ...interface{}) error
- func SendError(c echo.Context, err error) error
- func SendNoContent(c echo.Context, message ...interface{}) error
- func SendOk(c echo.Context, reader io.Reader, message ...interface{}) error
- func SendPartialContent(c echo.Context, reader io.Reader, message ...interface{}) error
- func SendResetContent(c echo.Context, reader io.Reader, message ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendAccepted ¶
Description :
This function is a short hand for sending a http 202 response
Parameters :
c echo.Context : The current request context from echo. Must never be set to nil. body interface{} : The body to send as response if there must be one. message ...interface{} : Informations about the response. Used to fill the message field of the response template.
Returns :
error : The encountered error if there has one. Nil otherwise
func SendCreated ¶
Description :
This function is a short hand for sending a http 201 response
Parameters :
c echo.Context : The current request context from echo. Must never be set to nil. body interface{} : Must be the created ressource. message ...interface{} : Informations about the response. Used to fill the message field of the response template.
Returns :
error : The encountered error if there has one. Nil otherwise
func SendNoContent ¶
func SendNoContent(c echo.Context, message ...interface{}) error
Description :
This function is a short hand for sending a http 204 response
Parameters :
c echo.Context : The current request context from echo. Must never be set to nil. message ...interface{} : Informations about the response. Used to fill the message field of the response template.
Returns :
error : The encountered error if there has one. Nil otherwise
func SendOk ¶
Description :
This function is a short hand for sending a http 200 response
Parameters :
c echo.Context : The current request context from echo. Must never be set to nil. body interface{} : The body to send as response message ...interface{} : Informations about the response. Used to fill the message field of the response template.
Returns :
error : The encountered error if there has one. Nil otherwise
func SendPartialContent ¶
Description :
This function is a short hand for sending a http 206 response
Parameters :
c echo.Context : The current request context from echo. Must never be set to nil. body interface{} : The part of the response message ...interface{} : Informations about the response. Used to fill the message field of the response template.
Returns :
error : The encountered error if there has one. Nil otherwise
func SendResetContent ¶
Description :
This function is a short hand for sending a http 205 response
Parameters :
c echo.Context : The current request context from echo. Must never be set to nil. body interface{} : The new ressource value message ...interface{} : Informations about the response. Used to fill the message field of the response template.
Returns :
error : The encountered error if there has one. Nil otherwise
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.