controller

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDemoController

func NewDemoController() web.Controller

func NewWelcomeController

func NewWelcomeController(cc infra.Resolver) web.Controller

Types

type DemoController

type DemoController struct {
}

func (*DemoController) Create

func (d *DemoController) Create(ctx web.Context) web.Response

func (*DemoController) RawRes

func (d *DemoController) RawRes(ctx web.Context) web.Response

func (*DemoController) Register

func (d *DemoController) Register(router web.Router)

type User added in v1.1.5

type User struct {
	Name string `json:"name"`
	ID   int    `json:"id"`
}

type WelcomeController

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

func (*WelcomeController) Hello

func (w *WelcomeController) Hello(ctx web.Context) web.M

func (*WelcomeController) Hello2

func (w *WelcomeController) Hello2(req web.Request, user *User) string

func (*WelcomeController) Hello3

func (w *WelcomeController) Hello3(req web.Request)

func (*WelcomeController) Register

func (w *WelcomeController) Register(router web.Router)

Jump to

Keyboard shortcuts

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