outcome

package
v0.0.0-...-e4caca2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: 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        interface{}
	StatusCode  int
	Headers     map[string]string
	RedirectURL string
	Cookies     []*Cookie
	Errors      []string
}

func Html

func Html(input string) *Response

func Json

func Json(input interface{}) *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 interface{}) *Response

func (*Response) Cookie

func (response *Response) Cookie(key string, val interface{}, params ...interface{}) *Response

func (*Response) Error

func (response *Response) Error(value interface{}, 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) 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