Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handle ¶
func Handle(h HandlerFunc) http.HandlerFunc
Types ¶
type BytesResponse ¶
type BytesResponse struct {
// contains filtered or unexported fields
}
func (*BytesResponse) Header ¶
func (r *BytesResponse) Header(key, value string) *BytesResponse
func (*BytesResponse) Render ¶
func (r *BytesResponse) Render(w http.ResponseWriter) error
type FileResponse ¶
type FileResponse struct {
// contains filtered or unexported fields
}
func (*FileResponse) Header ¶
func (f *FileResponse) Header(key, value string) *FileResponse
func (*FileResponse) Inline ¶
func (f *FileResponse) Inline() *FileResponse
func (*FileResponse) Render ¶
func (f *FileResponse) Render(w http.ResponseWriter) error
type JSONResponse ¶
type JSONResponse[T any] struct { // contains filtered or unexported fields }
func JSON ¶
func JSON[T any](status int, data T) *JSONResponse[T]
func (*JSONResponse[T]) Header ¶
func (r *JSONResponse[T]) Header(key, value string) *JSONResponse[T]
func (*JSONResponse[T]) Indent ¶
func (r *JSONResponse[T]) Indent() *JSONResponse[T]
func (*JSONResponse[T]) Render ¶
func (r *JSONResponse[T]) Render(w http.ResponseWriter) error
type NoContentResponse ¶
type NoContentResponse struct {
// contains filtered or unexported fields
}
func NoContent ¶
func NoContent() *NoContentResponse
func (*NoContentResponse) Render ¶
func (r *NoContentResponse) Render(w http.ResponseWriter) error
type Response ¶
type Response interface {
Render(w http.ResponseWriter) error
}
type TextResponse ¶
type TextResponse struct {
// contains filtered or unexported fields
}
func Text ¶
func Text(status int, s string) *TextResponse
func (*TextResponse) Header ¶
func (r *TextResponse) Header(key, value string) *TextResponse
func (*TextResponse) Render ¶
func (r *TextResponse) Render(w http.ResponseWriter) error
type XMLResponse ¶
type XMLResponse[T any] struct { // contains filtered or unexported fields }
func XML ¶
func XML[T any](status int, data T) *XMLResponse[T]
func (*XMLResponse[T]) Header ¶
func (r *XMLResponse[T]) Header(key, value string) *XMLResponse[T]
func (*XMLResponse[T]) Indent ¶
func (r *XMLResponse[T]) Indent() *XMLResponse[T]
func (*XMLResponse[T]) Render ¶
func (r *XMLResponse[T]) Render(w http.ResponseWriter) error
Click to show internal directories.
Click to hide internal directories.