Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPException ¶
Types ¶
type FileResponse ¶
func (*FileResponse) GetBody ¶
func (h *FileResponse) GetBody() any
func (*FileResponse) GetContentType ¶
func (h *FileResponse) GetContentType() string
func (*FileResponse) SetContentType ¶
func (h *FileResponse) SetContentType(contentType string)
func (*FileResponse) Write ¶
func (h *FileResponse) Write(w http.ResponseWriter)
type HTMLResponse ¶
func (*HTMLResponse) GetBody ¶
func (h *HTMLResponse) GetBody() any
func (*HTMLResponse) GetContentType ¶
func (h *HTMLResponse) GetContentType() string
func (*HTMLResponse) SetContentType ¶
func (h *HTMLResponse) SetContentType(contentType string)
func (*HTMLResponse) Write ¶
func (h *HTMLResponse) Write(w http.ResponseWriter)
type HTTPResponse ¶
type HTTPResponse[T any] struct { HttpCode int Header map[string]string Cookie map[string]string Body T }
func (*HTTPResponse[T]) GetBody ¶
func (h *HTTPResponse[T]) GetBody() any
func (*HTTPResponse[T]) GetContentType ¶
func (h *HTTPResponse[T]) GetContentType() string
func (*HTTPResponse[T]) SetContentType ¶
func (h *HTTPResponse[T]) SetContentType(contentType string)
func (*HTTPResponse[T]) Write ¶
func (h *HTTPResponse[T]) Write(w http.ResponseWriter)
type SSEResponse ¶
type SSEResponse struct {
SSEWriter func(s *SSEvent)
}
func (*SSEResponse) GetBody ¶
func (s *SSEResponse) GetBody() any
func (*SSEResponse) GetContentType ¶
func (s *SSEResponse) GetContentType() string
func (*SSEResponse) SetContentType ¶
func (s *SSEResponse) SetContentType(contentType string)
func (*SSEResponse) Write ¶
func (s *SSEResponse) Write(w http.ResponseWriter)
type SSEvent ¶
type SSEvent struct {
// contains filtered or unexported fields
}
func (*SSEvent) Write ¶
func (s *SSEvent) Write(data SSEventData)
type TextResponse ¶ added in v0.1.0
func (*TextResponse) GetBody ¶ added in v0.1.0
func (h *TextResponse) GetBody() any
func (*TextResponse) GetContentType ¶ added in v0.1.0
func (h *TextResponse) GetContentType() string
func (*TextResponse) SetContentType ¶ added in v0.1.0
func (h *TextResponse) SetContentType(contentType string)
func (*TextResponse) Write ¶ added in v0.1.0
func (h *TextResponse) Write(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.