controllers

package
v0.0.0-...-8296c84 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2019 License: MIT, GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AreaController

type AreaController struct {
	BaseController
}

func (*AreaController) Add

func (this *AreaController) Add()

func (*AreaController) Delete

func (this *AreaController) Delete()

func (*AreaController) Edit

func (this *AreaController) Edit()

func (*AreaController) List

func (this *AreaController) List()

type BaseController

type BaseController struct {
	system.BaseAdminController
}

type ClientController

type ClientController struct {
	BaseController
}

func (*ClientController) Add

func (this *ClientController) Add()

func (*ClientController) Delete

func (this *ClientController) Delete()

func (*ClientController) Edit

func (this *ClientController) Edit()

func (*ClientController) List

func (this *ClientController) List()

func (*ClientController) Reset

func (this *ClientController) Reset()

type ClusterController

type ClusterController struct {
	BaseController
}

func (*ClusterController) Add

func (this *ClusterController) Add()

func (*ClusterController) Delete

func (this *ClusterController) Delete()

func (*ClusterController) Edit

func (this *ClusterController) Edit()

func (*ClusterController) Forbidden

func (this *ClusterController) Forbidden()

func (*ClusterController) List

func (this *ClusterController) List()

func (*ClusterController) Review

func (this *ClusterController) Review()

func (*ClusterController) Statistic

func (this *ClusterController) Statistic()

type ConnController

type ConnController struct {
	BaseController
}

func (*ConnController) List

func (this *ConnController) List()

type IpListController

type IpListController struct {
	BaseController
}

func (*IpListController) Add

func (this *IpListController) Add()

func (*IpListController) Delete

func (this *IpListController) Delete()

func (*IpListController) Edit

func (this *IpListController) Edit()

func (*IpListController) List

func (this *IpListController) List()

type OnlineController

type OnlineController struct {
	BaseController
}

func (*OnlineController) List

func (this *OnlineController) List()

type PackageController

type PackageController struct {
	BaseController
}

func (*PackageController) Add

func (this *PackageController) Add()

func (*PackageController) Edit

func (this *PackageController) Edit()

func (*PackageController) List

func (this *PackageController) List()

type RegionController

type RegionController struct {
	BaseController
}

func (*RegionController) Add

func (this *RegionController) Add()

func (*RegionController) Delete

func (this *RegionController) Delete()

func (*RegionController) Edit

func (this *RegionController) Edit()

func (*RegionController) List

func (this *RegionController) List()

type RoleController

type RoleController struct {
	BaseController
}

func (*RoleController) Add

func (this *RoleController) Add()

func (*RoleController) Delete

func (this *RoleController) Delete()

func (*RoleController) Edit

func (this *RoleController) Edit()

func (*RoleController) List

func (this *RoleController) List()

func (*RoleController) Regions

func (this *RoleController) Regions()

type ServerController

type ServerController struct {
	BaseController
}

func (*ServerController) Add

func (this *ServerController) Add()

func (*ServerController) Delete

func (this *ServerController) Delete()

func (*ServerController) Edit

func (this *ServerController) Edit()

func (*ServerController) List

func (this *ServerController) List()

func (*ServerController) Reset

func (this *ServerController) Reset()

type TunnelController

type TunnelController struct {
	BaseController
}

func (*TunnelController) List

func (this *TunnelController) List()

type UserController

type UserController struct {
	BaseController
}

func (*UserController) Add

func (this *UserController) Add()
func (this *UserController) ChangePassword() {
	userModel := models.User{}
	if this.Ctx.Input.IsPost() {
		newpassword := this.GetString("password")
		oldpassword := this.GetString("password_old")
		errs := validation.Errors{
			"旧密码": validation.Validate(oldpassword,
				validation.Required.Error("不能为空")),
			"新密码": validation.Validate(newpassword,
				validation.Required.Error("不能为空"),
				validation.Match(regexp.MustCompile("^([0-9]+[a-zA-Z]+[_]*){1,16}$")).Error("必须同时包含数字和字母,且1-15字符")),
		}
		err := errs.Filter()
		if err != nil {
			this.JsonError(err)
		}
		err = userModel.ChangePassword(this.loginUser["user_id"], newpassword, oldpassword)
		if err != nil {
			this.JsonError("修改密码失败:" + err.Error())
		}
		this.JsonSuccess("")
	} else {
		this.viewLayout("user/changepassword", "form")
	}
}

func (*UserController) Edit

func (this *UserController) Edit()

func (*UserController) Forbidden

func (this *UserController) Forbidden()

func (*UserController) List

func (this *UserController) List()

func (*UserController) Review

func (this *UserController) Review()

Jump to

Keyboard shortcuts

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