controller

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 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 Error

type Error struct {
	// contains filtered or unexported fields
}

Error controller

func (*Error) Error

func (controller *Error) Error(ctx context.Context, request *web.Request) web.Result

Error responder

func (*Error) Inject

func (controller *Error) Inject(responder *web.Responder)

Inject *web.Responder

func (*Error) NotFound

func (controller *Error) NotFound(ctx context.Context, request *web.Request) web.Result

NotFound responder

type FlashMessage

type FlashMessage struct {
	Type    string
	Message interface{}
}

FlashMessage contains a type and a printable message

type Redirect

type Redirect struct {
	// contains filtered or unexported fields
}

Redirect Default controller

func (*Redirect) Inject

func (redirect *Redirect) Inject(responder *web.Responder)

Inject *web.Responder

func (*Redirect) Redirect

func (redirect *Redirect) Redirect(ctx context.Context, request *web.Request) web.Result

Redirect `to` a controller, all other params are passed on

func (*Redirect) RedirectPermanent

func (redirect *Redirect) RedirectPermanent(ctx context.Context, request *web.Request) web.Result

RedirectPermanent is the same as Redirect but with a HTTP permanent redirect

func (*Redirect) RedirectPermanentURL

func (redirect *Redirect) RedirectPermanentURL(ctx context.Context, request *web.Request) web.Result

RedirectPermanentURL is the same as RedirectURL but with a HTTP permanent redirect

func (*Redirect) RedirectURL

func (redirect *Redirect) RedirectURL(ctx context.Context, request *web.Request) web.Result

RedirectURL redirects to a url

type Render

type Render struct {
	// contains filtered or unexported fields
}

Render controller

func (*Render) Inject

func (controller *Render) Inject(responder *web.Responder)

Inject *web.Responder

func (*Render) Render

func (controller *Render) Render(ctx context.Context, request *web.Request) web.Result

Render responder

type SessionFlashController

type SessionFlashController struct{}

SessionFlashController takes care of supported flash messages

func (*SessionFlashController) Data

func (sfc *SessionFlashController) Data(c context.Context, r *web.Request, _ web.RequestParams) interface{}

Data Controller for sessionflashcontroller

type Static

type Static struct{}

Static is a controller to handle file requests

func (*Static) File

func (*Static) File(ctx context.Context, r *web.Request) web.Result

File returns a fileResponse which uses http.ServeFile to respond to the request

Jump to

Keyboard shortcuts

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