Documentation
¶
Index ¶
- func Streamer[T any](generator func(yield func(T) error) error) <-chan []byte
- type CustomResponseWriter
- func (cwr *CustomResponseWriter) Flush()
- func (cwr *CustomResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
- func (cwr *CustomResponseWriter) Push(target string, opts *http.PushOptions) error
- func (cwr *CustomResponseWriter) Write(b []byte) (int, error)
- func (w *CustomResponseWriter) WriteHeader(statusCode int)
- func (cwr *CustomResponseWriter) Written() bool
- type IActionResult
- func Accepted(content interface{}) *IActionResult
- func BadRequest(content interface{}) *IActionResult
- func Conflict(content interface{}) *IActionResult
- func Created(content interface{}) *IActionResult
- func CreatedAt(url string, content interface{}) *IActionResult
- func File(content []byte, filename string) *IActionResult
- func Forbidden(content interface{}) *IActionResult
- func Found(url string) *IActionResult
- func Html(content interface{}) *IActionResult
- func InternalServerError(content interface{}) *IActionResult
- func MovedPermanently(url string) *IActionResult
- func NoContent() *IActionResult
- func NotFound(content interface{}) *IActionResult
- func NotImplemented(content interface{}) *IActionResult
- func NotModified() *IActionResult
- func Ok(content interface{}) *IActionResult
- func PartialContent(content []byte) *IActionResult
- func Problem(detail string) *IActionResult
- func Response(statusCode int, content interface{}) *IActionResult
- func ServiceUnavailable(content interface{}) *IActionResult
- func Streaming(mt types.MediaType, stream <-chan []byte) *IActionResult
- func Template(dir, file string, data interface{}) *IActionResult
- func Throw(statusCode int, content interface{}) *IActionResult
- func Unauthorized(content interface{}) *IActionResult
- func UnprocessableEntity(errors interface{}) *IActionResult
- func ValidationProblem(errors map[string]string) *IActionResult
- type ResponseWriter
- type StreamingResponse
- type TemplateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CustomResponseWriter ¶
type CustomResponseWriter struct { http.ResponseWriter StatusCode int Size int }
func NewCustomResponseWriter ¶
func NewCustomResponseWriter(w http.ResponseWriter) *CustomResponseWriter
func (*CustomResponseWriter) Flush ¶
func (cwr *CustomResponseWriter) Flush()
func (*CustomResponseWriter) Hijack ¶
func (cwr *CustomResponseWriter) Hijack() (net.Conn, *bufio.ReadWriter, error)
func (*CustomResponseWriter) Push ¶
func (cwr *CustomResponseWriter) Push(target string, opts *http.PushOptions) error
func (*CustomResponseWriter) WriteHeader ¶
func (w *CustomResponseWriter) WriteHeader(statusCode int)
func (*CustomResponseWriter) Written ¶
func (cwr *CustomResponseWriter) Written() bool
type IActionResult ¶
type IActionResult struct {
// contains filtered or unexported fields
}
func Accepted ¶
func Accepted(content interface{}) *IActionResult
func BadRequest ¶
func BadRequest(content interface{}) *IActionResult
func Conflict ¶
func Conflict(content interface{}) *IActionResult
func Created ¶
func Created(content interface{}) *IActionResult
func CreatedAt ¶
func CreatedAt(url string, content interface{}) *IActionResult
func File ¶
func File(content []byte, filename string) *IActionResult
func Forbidden ¶
func Forbidden(content interface{}) *IActionResult
func Found ¶
func Found(url string) *IActionResult
func Html ¶
func Html(content interface{}) *IActionResult
func InternalServerError ¶
func InternalServerError(content interface{}) *IActionResult
func MovedPermanently ¶
func MovedPermanently(url string) *IActionResult
func NoContent ¶
func NoContent() *IActionResult
func NotFound ¶
func NotFound(content interface{}) *IActionResult
func NotImplemented ¶
func NotImplemented(content interface{}) *IActionResult
func NotModified ¶
func NotModified() *IActionResult
func Ok ¶
func Ok(content interface{}) *IActionResult
func PartialContent ¶
func PartialContent(content []byte) *IActionResult
func Problem ¶
func Problem(detail string) *IActionResult
func Response ¶
func Response(statusCode int, content interface{}) *IActionResult
func ServiceUnavailable ¶
func ServiceUnavailable(content interface{}) *IActionResult
func Template ¶
func Template(dir, file string, data interface{}) *IActionResult
func Throw ¶
func Throw(statusCode int, content interface{}) *IActionResult
func Unauthorized ¶
func Unauthorized(content interface{}) *IActionResult
func UnprocessableEntity ¶
func UnprocessableEntity(errors interface{}) *IActionResult
func ValidationProblem ¶
func ValidationProblem(errors map[string]string) *IActionResult
func (*IActionResult) MtType ¶
func (a *IActionResult) MtType(mt types.MediaType) *IActionResult
func (*IActionResult) SetCrumb ¶
func (a *IActionResult) SetCrumb(cookie *http.Cookie) *IActionResult
func (*IActionResult) SetHeader ¶
func (a *IActionResult) SetHeader(key, value string) *IActionResult
type ResponseWriter ¶
type ResponseWriter struct { W http.ResponseWriter StatusCode int MediaType types.MediaType // contains filtered or unexported fields }
func NewResponseWriter ¶
func NewResponseWriter(w http.ResponseWriter) *ResponseWriter
func (*ResponseWriter) Send ¶
func (rw *ResponseWriter) Send(v interface{})
func (*ResponseWriter) SetStatusCode ¶
func (rw *ResponseWriter) SetStatusCode(statusCode int)
type StreamingResponse ¶
type StreamingResponse struct {
Stream <-chan []byte
}
type TemplateResponse ¶
Click to show internal directories.
Click to hide internal directories.