controllers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PATH_IMAGE = "assert/images"
	PATH_VIDEO = "assert/videos"
	PATH_FILE  = "assert/files"
)
View Source
const SESSION_USER_KEY = "SESSION_USER_KEY"

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseController

type BaseController struct {
	beego.Controller
	IsLogin bool
	User    models.User
	Dao     *models.DB
}

func (*BaseController) Abort500

func (ctx *BaseController) Abort500(err error)

func (*BaseController) GetMustString

func (c *BaseController) GetMustString(key string, msg string) string

func (*BaseController) JSONOk

func (ctx *BaseController) JSONOk(msg string, actions ...string)

func (*BaseController) JSONOkData

func (ctx *BaseController) JSONOkData(count int, data interface{})

func (*BaseController) JSONOkH

func (ctx *BaseController) JSONOkH(msg string, maps H)

func (*BaseController) MustLogin

func (ctx *BaseController) MustLogin()

func (*BaseController) Prepare

func (ctx *BaseController) Prepare()

func (*BaseController) UUID

func (this *BaseController) UUID() string

type ErrorController

type ErrorController struct {
	BaseController
}

func (*ErrorController) Error404

func (c *ErrorController) Error404()

func (*ErrorController) Error500

func (c *ErrorController) Error500()

type H

type H map[string]interface{}

type IndexController

type IndexController struct {
	BaseController
}

func (*IndexController) Get

func (c *IndexController) Get()

@router / [get]

func (*IndexController) GetAbout

func (c *IndexController) GetAbout()

@router /about [get]

func (*IndexController) GetComment

func (c *IndexController) GetComment()

@router /comment/:key [get]

func (*IndexController) GetDetail

func (c *IndexController) GetDetail()

@router /details/:key [get]

func (*IndexController) GetMessage

func (c *IndexController) GetMessage()

@router /message [get]

func (*IndexController) GetReg

func (c *IndexController) GetReg()

@router /reg [get]

func (*IndexController) GetUser

func (c *IndexController) GetUser()

@router /user [get]

type MessageController

type MessageController struct {
	BaseController
}

func (*MessageController) Count

func (ctx *MessageController) Count()

@router /count [get]

func (*MessageController) NestPrepare

func (ctx *MessageController) NestPrepare()

func (*MessageController) NewMessage

func (ctx *MessageController) NewMessage()

@router /new/?:key [post]

func (*MessageController) Query

func (ctx *MessageController) Query()

@router /query [get]

type NestPreparer

type NestPreparer interface {
	NestPrepare()
}

type NoteController

type NoteController struct {
	BaseController
}

func (*NoteController) Del

func (ctx *NoteController) Del()

@router /del/:key [post]

func (*NoteController) EditPage

func (ctx *NoteController) EditPage()

@router /edit/:key [get]

func (*NoteController) NestPrepare

func (ctx *NoteController) NestPrepare()

func (*NoteController) NewPage

func (ctx *NoteController) NewPage()

@router /new [get]

func (*NoteController) Save

func (ctx *NoteController) Save()

@router /save/:key [post]

type PraiseController

type PraiseController struct {
	BaseController
}

func (*PraiseController) NestPrepare

func (ctx *PraiseController) NestPrepare()

func (*PraiseController) Parse

func (ctx *PraiseController) Parse()

@router /:type/:key [post]

type ResultJsonValue

type ResultJsonValue struct {
	Code   int         `json:"code"`
	Msg    string      `json:"msg"`
	Action string      `json:"action,omitempty"`
	Count  int         `json:"count,omitempty"`
	Data   interface{} `json:"data,omitempty"`
}

type UploadController

type UploadController struct {
	BaseController
	ImagesFilePath string
	VideosFilePath string
	FilesFilePath  string
}

func (*UploadController) NestPrepare

func (ctx *UploadController) NestPrepare()

func (*UploadController) UploadFile

func (c *UploadController) UploadFile()

@router /uploadfile [post]

func (*UploadController) UploadImg

func (c *UploadController) UploadImg()

图片上传 @router /uploadimg [post]

type UploadimgFroala

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

type UserController

type UserController struct {
	BaseController
}

func (*UserController) Login

func (c *UserController) Login()

@router /login [post]

func (*UserController) Logout

func (c *UserController) Logout()

@router /logout [get]

func (*UserController) Reg

func (c *UserController) Reg()

@router /reg [post]

Jump to

Keyboard shortcuts

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