Documentation ¶
Index ¶
- type BytesResponse
- type BytesResponseWriter
- func (r BytesResponseWriter) GetHeaders() http.Header
- func (r BytesResponseWriter) GetHttpStatus() int
- func (r *BytesResponseWriter) Header() http.Header
- func (r BytesResponseWriter) HeaderSet(key, value string)
- func (r BytesResponseWriter) SetHttpStatus(status int)
- func (r *BytesResponseWriter) Write(content []byte) (int, error)
- func (r *BytesResponseWriter) WriteHeader(statusCode int)
- type JsonResponse
- type RedirectResponse
- type Response
- type ViewResponse
- func (r *ViewResponse) GetBodyBytes() *bytes.Buffer
- func (r *ViewResponse) GetHeaders() http.Header
- func (r *ViewResponse) GetHttpStatus() int
- func (r *ViewResponse) HeaderSet(key, value string)
- func (r *ViewResponse) SetData(data interface{})
- func (r *ViewResponse) SetHttpStatus(status int)
- func (r *ViewResponse) SetTemplate(tpl *template.Template)
- type WebSocketController
- type WebsocketUpgradeResponse
- func (r WebsocketUpgradeResponse) GetHeaders() http.Header
- func (r WebsocketUpgradeResponse) GetHttpStatus() int
- func (r WebsocketUpgradeResponse) HeaderSet(key, value string)
- func (r WebsocketUpgradeResponse) SetHttpStatus(status int)
- func (r *WebsocketUpgradeResponse) UpgradeToWebsocket(request *http.Request, responseWriter http.ResponseWriter)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BytesResponse ¶
func NewBytesResponse ¶
func NewBytesResponse() *BytesResponse
func (*BytesResponse) ClearBody ¶
func (r *BytesResponse) ClearBody()
func (*BytesResponse) GetBodyBytes ¶
func (r *BytesResponse) GetBodyBytes() *bytes.Buffer
func (*BytesResponse) GetHeaders ¶
func (*BytesResponse) GetHttpStatus ¶
func (r *BytesResponse) GetHttpStatus() int
func (*BytesResponse) SetHttpStatus ¶
func (r *BytesResponse) SetHttpStatus(status int)
type BytesResponseWriter ¶
type BytesResponseWriter struct {
*BytesResponse
}
func NewBytesResponseWriter ¶
func NewBytesResponseWriter() *BytesResponseWriter
func (BytesResponseWriter) GetHeaders ¶
func (BytesResponseWriter) GetHttpStatus ¶
func (r BytesResponseWriter) GetHttpStatus() int
func (*BytesResponseWriter) Header ¶
func (r *BytesResponseWriter) Header() http.Header
func (BytesResponseWriter) SetHttpStatus ¶
func (r BytesResponseWriter) SetHttpStatus(status int)
func (*BytesResponseWriter) Write ¶
func (r *BytesResponseWriter) Write(content []byte) (int, error)
func (*BytesResponseWriter) WriteHeader ¶
func (r *BytesResponseWriter) WriteHeader(statusCode int)
type JsonResponse ¶
type JsonResponse struct { Body interface{} // contains filtered or unexported fields }
func NewJsonApiResponse ¶
func NewJsonApiResponse() *JsonResponse
func NewJsonResponse ¶
func NewJsonResponse() *JsonResponse
func (*JsonResponse) GetBodyBytes ¶
func (r *JsonResponse) GetBodyBytes() *bytes.Buffer
func (*JsonResponse) GetHeaders ¶
func (*JsonResponse) GetHttpStatus ¶
func (r *JsonResponse) GetHttpStatus() int
func (*JsonResponse) SetHttpStatus ¶
func (r *JsonResponse) SetHttpStatus(status int)
type RedirectResponse ¶
type RedirectResponse struct {
*BytesResponseWriter
}
func NewRedirectResponse ¶
func NewRedirectResponse(request *http.Request, url string, httpStatus int) *RedirectResponse
func (RedirectResponse) GetHeaders ¶
func (RedirectResponse) GetHttpStatus ¶
func (r RedirectResponse) GetHttpStatus() int
func (RedirectResponse) SetHttpStatus ¶
func (r RedirectResponse) SetHttpStatus(status int)
type ViewResponse ¶
func NewViewResponse ¶
func NewViewResponse(templateName string) *ViewResponse
func (*ViewResponse) GetBodyBytes ¶
func (r *ViewResponse) GetBodyBytes() *bytes.Buffer
func (*ViewResponse) GetHeaders ¶
func (*ViewResponse) GetHttpStatus ¶
func (r *ViewResponse) GetHttpStatus() int
func (*ViewResponse) SetData ¶
func (r *ViewResponse) SetData(data interface{})
func (*ViewResponse) SetHttpStatus ¶
func (r *ViewResponse) SetHttpStatus(status int)
func (*ViewResponse) SetTemplate ¶
func (r *ViewResponse) SetTemplate(tpl *template.Template)
type WebSocketController ¶
type WebsocketUpgradeResponse ¶
type WebsocketUpgradeResponse struct { *BytesResponseWriter // contains filtered or unexported fields }
func NewWebsocketUpgradeResponse ¶
func NewWebsocketUpgradeResponse(upgrader *websocket.Upgrader, controller WebSocketController) *WebsocketUpgradeResponse
func (WebsocketUpgradeResponse) GetHeaders ¶
func (WebsocketUpgradeResponse) GetHttpStatus ¶
func (r WebsocketUpgradeResponse) GetHttpStatus() int
func (WebsocketUpgradeResponse) HeaderSet ¶
func (r WebsocketUpgradeResponse) HeaderSet(key, value string)
func (WebsocketUpgradeResponse) SetHttpStatus ¶
func (r WebsocketUpgradeResponse) SetHttpStatus(status int)
func (*WebsocketUpgradeResponse) UpgradeToWebsocket ¶
func (r *WebsocketUpgradeResponse) UpgradeToWebsocket(request *http.Request, responseWriter http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.