controllers

package
v0.0.0-...-d14cd61 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HomeController

type HomeController struct {
	Ctx     iris.Context
	Service services.CommonService
}

func (*HomeController) Get

func (c *HomeController) Get() mvc.Result

* 直接返回html

func (*HomeController) GetHello

func (c *HomeController) GetHello() interface{}

*

  • 返回json对象

func (*HomeController) GetPing

func (c *HomeController) GetPing() string

*

  • 直接返回文字

func (*HomeController) GetRedis

func (c *HomeController) GetRedis() string

*

  • 测试redis

func (*HomeController) GetUserBy

func (c *HomeController) GetUserBy(username string) mvc.Result

*

  • 渲染视图后返回
  • 指定不同的layout

type PageInfo

type PageInfo struct {
	Title    string
	Keywords string
}

Jump to

Keyboard shortcuts

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