outcome

package
v2.0.0-...-10e4721 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: MIT, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cookie struct {
	Name     string    `json:"name"`
	Value    string    `json:"value"`
	Path     string    `json:"path"`
	Domain   string    `json:"domain"`
	Expires  time.Time `json:"expires"`
	Secure   bool      `json:"secure"`
	HTTPOnly bool      `json:"http_only"`
	SameSite string    `json:"same_site"`
}

Cookie data for ctx.Cookie

type Response

type Response struct {
	ContentType string
	Data        any
	StatusCode  int
	Headers     map[string]string
	RedirectURL string
	Cookies     []*Cookie
	Errors      []string
}

func Html

func Html(input string) *Response

func Json

func Json(input any) *Response

func Redirect

func Redirect(to string, code ...int) *Response

func RedirectPermanent

func RedirectPermanent(to string) *Response

func RedirectTemporary

func RedirectTemporary(to string) *Response

func Text

func Text(input string) *Response

func (*Response) Content

func (response *Response) Content(input any) *Response

func (*Response) Cookie

func (response *Response) Cookie(key string, val any, params ...any) *Response

func (*Response) Error

func (response *Response) Error(value any, code ...int) *Response

func (*Response) Filename

func (response *Response) Filename(filename string) *Response

func (*Response) Header

func (response *Response) Header(key, value string) *Response

func (*Response) RawCookie

func (response *Response) RawCookie(cookie Cookie) *Response

func (*Response) Redirect

func (response *Response) Redirect(to string, code ...int) *Response

func (*Response) RedirectPermanent

func (response *Response) RedirectPermanent(to string) *Response

func (*Response) RedirectTemporary

func (response *Response) RedirectTemporary(to string) *Response

func (*Response) ResponseSerializer

func (response *Response) ResponseSerializer() *Response

func (*Response) SetCacheControl

func (response *Response) SetCacheControl(t time.Duration, headers ...string) *Response

func (*Response) ShowInBrowser

func (response *Response) ShowInBrowser() *Response

func (*Response) Status

func (response *Response) Status(code int) *Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL