Documentation ¶
Index ¶
- type Response
- func (res Response) BadRequest(reasons ...string)
- func (res Response) Error(status int, reasons ...string)
- func (res Response) Forbidden(reasons ...string)
- func (res Response) HTML(html string)
- func (res Response) InternalServerError(reasons ...string)
- func (res Response) JSON(obj any)
- func (res Response) MethodNotAllowed(reasons ...string)
- func (res Response) NotFound()
- func (res Response) NotModified()
- func (res Response) OK()
- func (res Response) OKText()
- func (res Response) SetHeader(key, value string)
- func (res Response) SetStatus(status int)
- func (res Response) Text(text string)
- func (res Response) TooManyRequests(reasons ...string)
- func (res Response) Unauthorized(reasons ...string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func New ¶
func New(w http.ResponseWriter) Response
func (Response) BadRequest ¶
func (Response) InternalServerError ¶
func (Response) MethodNotAllowed ¶ added in v0.0.48
func (Response) NotModified ¶ added in v0.0.23
func (res Response) NotModified()
func (Response) TooManyRequests ¶
func (Response) Unauthorized ¶
Click to show internal directories.
Click to hide internal directories.