controllers

package
v0.0.0-...-3ad0aa0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoginRedirectUrl

func GetLoginRedirectUrl(ctx *context.Context) (returnUrl string)

func InitLocales

func InitLocales()

Types

type AuthController

type AuthController struct {
	BaseController
}

func (*AuthController) DoLogin

func (this *AuthController) DoLogin()

func (*AuthController) Login

func (this *AuthController) Login()

func (*AuthController) Logout

func (this *AuthController) Logout()

type BaseController

type BaseController struct {
	beego.Controller
	User    *models.User
	IsLogin bool
	i18n.Locale
}

func (*BaseController) CheckAdmin

func (this *BaseController) CheckAdmin()

func (*BaseController) CheckLogin

func (this *BaseController) CheckLogin()

func (*BaseController) CheckOnceToken

func (this *BaseController) CheckOnceToken()

验证防重复提交token

func (*BaseController) DeleteRememberCookie

func (this *BaseController) DeleteRememberCookie()

删除记忆登录cookie

func (*BaseController) FlashRead

func (this *BaseController) FlashRead(key string) (string, bool)

read beego flash message

func (*BaseController) FlashWrite

func (this *BaseController) FlashWrite(key string, value string)

write beego flash message

func (*BaseController) LogUserIn

func (this *BaseController) LogUserIn(user *models.User, remember bool)

登录用户

func (*BaseController) LogUserOut

func (this *BaseController) LogUserOut()

登出用户

func (*BaseController) Prepare

func (this *BaseController) Prepare()

func (*BaseController) SetPagetitle

func (this *BaseController) SetPagetitle(title string)

func (*BaseController) SetPaginator

func (this *BaseController) SetPaginator(per int, nums int64) *utils.Paginator

type ErrorController

type ErrorController struct {
	beego.Controller
}

func (*ErrorController) Error403

func (c *ErrorController) Error403()

func (*ErrorController) Error404

func (c *ErrorController) Error404()

func (*ErrorController) Error500

func (c *ErrorController) Error500()

func (*ErrorController) Error501

func (c *ErrorController) Error501()

func (*ErrorController) ErrorOnce

func (c *ErrorController) ErrorOnce()

type Image

type Image struct {
	URL  string
	File string
}

type ImagesController

type ImagesController struct {
	BaseController
}

func (*ImagesController) Delete

func (this *ImagesController) Delete()

func (*ImagesController) Get

func (this *ImagesController) Get()

type LoginForm

type LoginForm struct {
	Username string `form:"Username,text"valid:"Required;"`
	Password string `form:"Password,password"valid:"Required;"`
	Remember string `form:"Remember,text"`
}

登录表单

type MainController

type MainController struct {
	BaseController
}

func (*MainController) Get

func (this *MainController) Get()

type ProfileForm

type ProfileForm struct {
	Password        string
	PasswordConfirm string
	Email           string `valid:"Email"`
}

type UploadController

type UploadController struct {
	BaseController
}

func (*UploadController) Post

func (this *UploadController) Post()

type UploadResponse

type UploadResponse struct {
	Success bool
	URL     string
	Error   string
	Thumb   string
}

type UserController

type UserController struct {
	BaseController
}

func (*UserController) Create

func (this *UserController) Create()

func (*UserController) Del

func (this *UserController) Del()

func (*UserController) Edit

func (this *UserController) Edit()

func (*UserController) Get

func (this *UserController) Get()

func (*UserController) List

func (this *UserController) List()

func (*UserController) New

func (this *UserController) New()

func (*UserController) Post

func (this *UserController) Post()

func (*UserController) Update

func (this *UserController) Update()

type UserForm

type UserForm struct {
	Username string
	Email    string `valid:"Email"`
	Password string
}

Jump to

Keyboard shortcuts

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