controllers

package
v0.0.0-...-3501fbf Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRealPathWithDir

func GenRealPathWithDir(dir string) string

在目录后加上年月

func Md5

func Md5(value string) string

func MergeFile

func MergeFile(mergeDir, outputDir string) string

传入视频分片目录路径和输出文件目录 输出合并后的文件路径 同时删除源文件

func TranscodeToMp4

func TranscodeToMp4(src, dst string)

func VerifyCaptcha

func VerifyCaptcha(key, word string) (bool, string)

Types

type AdminRoleController

type AdminRoleController struct {
	LoginController
}

func (*AdminRoleController) Add

func (c *AdminRoleController) Add()

AddAdminRole 添加角色 @params cateId modelId title description permission @return success/error

func (*AdminRoleController) Delete

func (c *AdminRoleController) Delete()

DelAdminRole 删除角色 @params id @return error

func (*AdminRoleController) List

func (c *AdminRoleController) List()

List 获取角色列表 @params keyword(搜索title的关键词) @return []AdminRole

func (*AdminRoleController) Profile

func (c *AdminRoleController) Profile()

Profile 查看角色详情 @params id @return AdminRole

func (*AdminRoleController) Sort

func (c *AdminRoleController) Sort()

SortAdminRole 对角色进行排序 @params id sort @return success/error

func (*AdminRoleController) Update

func (c *AdminRoleController) Update()

UpdateAdminRole 更新角色 @params id cateId modelId title description permission @return success/error

type AdminUserController

type AdminUserController struct {
	LoginController
}

func (*AdminUserController) Add

func (c *AdminUserController) Add()

Add 添加用户页面 / 添加用户动作 params account pwd roleId return success/error

func (*AdminUserController) Delete

func (c *AdminUserController) Delete()

Del 删除管理员操作 @params userId @return success/error

func (*AdminUserController) List

func (c *AdminUserController) List()

List 获取用户列表 @params roleId pagesize page @return []adminuser

func (*AdminUserController) Profile

func (c *AdminUserController) Profile()

Profile 获取单个用户信息 @params userId @return adminuser

func (*AdminUserController) ResetPwd

func (c *AdminUserController) ResetPwd()

ResetPwd 重置用户密码 @params userId @return success/error

func (*AdminUserController) Sort

func (c *AdminUserController) Sort()

SortAdminRole 对角色进行排序 @params id sort @return success/error

func (*AdminUserController) Update

func (c *AdminUserController) Update()

Update 更新用户信息操作 params userId name code pwd newpwd(if pwd != "" ,update pwd) roleId releaseRoleId return success/error

type AuthCodeController

type AuthCodeController struct {
	LoginController
}

func (*AuthCodeController) GetCaptcha

func (this *AuthCodeController) GetCaptcha()

获取验证码

func (*AuthCodeController) VerifyCaptcha

func (this *AuthCodeController) VerifyCaptcha()

验证验证码

type BaseController

type BaseController struct {
	beego.Controller
}

func (*BaseController) AjaxMsg

func (c *BaseController) AjaxMsg(msg interface{}, errCode int, errMsg, sucMsg string)

AjaxMsg 返回数据

func (*BaseController) Bool

func (c *BaseController) Bool(param string) bool

Bool 获取bool类型参数,参数可以为空 如果为空则为true It accepts 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False.

func (*BaseController) Display

func (c *BaseController) Display(tpl string)

Display 渲染模版

func (*BaseController) Float

func (c *BaseController) Float(param string) float64

Float 获取float64类型参数.,参数可以为空

func (*BaseController) GetClientIp

func (c *BaseController) GetClientIp() string

获取用户IP地址

func (*BaseController) Int

func (c *BaseController) Int(param string) int

Int 获取int类型参数,参数可以为空

func (*BaseController) MustBool

func (c *BaseController) MustBool(param string) bool

MustBool 获取bool类型参数,参数不可以为空 It accepts 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False.

func (*BaseController) MustFloat

func (c *BaseController) MustFloat(param string) float64

MustFloat 获取float64类型参数.,参数不能为空

func (*BaseController) MustGet

func (c *BaseController) MustGet()

func (*BaseController) MustInt

func (c *BaseController) MustInt(param string) int

MustInt 获取int类型参数 ,参数不能为空

func (*BaseController) MustPost

func (c *BaseController) MustPost()

func (*BaseController) MustStr

func (c *BaseController) MustStr(param string) string

MustStr 获取string类型参数 ,参数不能为空

func (*BaseController) ShowErrorPage

func (c *BaseController) ShowErrorPage(args ...string)

ShowMsg 显示错误信息

func (*BaseController) Str

func (c *BaseController) Str(param string) string

Str 获取string类型参数,参数可以为空

type CarouselController

type CarouselController struct {
	LoginController
}

func (*CarouselController) Add

func (c *CarouselController) Add()

AddCarousel 添加轮换图 @params cateId modelId title description @return success/error

func (*CarouselController) Delete

func (c *CarouselController) Delete()

DelCarousel 删除轮换图 @params id @return error

func (*CarouselController) List

func (c *CarouselController) List()

List 获取轮换图列表 @params keyword(搜索title的关键词) @return []Carousel

func (*CarouselController) Profile

func (c *CarouselController) Profile()

Profile 查看轮换图详情 @params id @return Carousel

func (*CarouselController) Sort

func (c *CarouselController) Sort()

SortCarousel 对轮换图进行排序 @params id sort @return success/error

func (*CarouselController) Update

func (c *CarouselController) Update()

UpdateCarousel 更新轮换图 @params id cateId modelId title description @return success/error

type CategoryController

type CategoryController struct {
	LoginController
}

func (*CategoryController) Add

func (c *CategoryController) Add()

Add 添加栏目动作 @params pid name catetype modelid @return success/error

func (*CategoryController) Delete

func (c *CategoryController) Delete()

Delete 删除栏目 @params id @return success/error

func (*CategoryController) List

func (c *CategoryController) List()

获取全部栏目信息

func (*CategoryController) Profile

func (c *CategoryController) Profile()

Profile 查看栏目详情 @params id @return AdminRole

func (*CategoryController) Sort

func (c *CategoryController) Sort()

Sort 栏目排序 params int : int 栏目Id : 新sort值 @return success/error

func (*CategoryController) Update

func (c *CategoryController) Update()

Update 编辑栏目动作 @params id name @return success/error

type GalleryController

type GalleryController struct {
	LoginController
}

func (*GalleryController) Add

func (c *GalleryController) Add()

AddGallery 添加相册 @params cateId modelId title description @return success/error

func (*GalleryController) Delete

func (c *GalleryController) Delete()

DelGallery 删除相册 @params id @return error

func (*GalleryController) List

func (c *GalleryController) List()

List 获取相册列表 @params keyword(搜索title的关键词) @return []Gallery

func (*GalleryController) Profile

func (c *GalleryController) Profile()

Profile 查看相册详情 @params id @return Gallery

func (*GalleryController) Sort

func (c *GalleryController) Sort()

SortGallery 对相册进行排序 @params id sort @return success/error

func (*GalleryController) Update

func (c *GalleryController) Update()

UpdateGallery 更新相册 @params id cateId modelId title description @return success/error

type ImageController

type ImageController struct {
	BaseController
}

func (*ImageController) Upload

func (c *ImageController) Upload()

type LoginController

type LoginController struct {
	BaseController

	User m.AdminUser

	Msg map[string]interface{}
}

func (*LoginController) Get

func (c *LoginController) Get()

登陆页面

func (*LoginController) List

func (c *LoginController) List()

func (*LoginController) Post

func (c *LoginController) Post()

Login 执行登录 @params username password key word @return error

func (*LoginController) Prepare

func (c *LoginController) Prepare()

type ModelController

type ModelController struct {
	LoginController
}

func (*ModelController) Add

func (c *ModelController) Add()

Add 添加模型动作 @params title tableName description @return success/error

func (*ModelController) Delete

func (c *ModelController) Delete()

Delete 删除模型 @params id @return success/error

func (*ModelController) List

func (c *ModelController) List()

获取全部模型信息

func (*ModelController) Profile

func (c *ModelController) Profile()

Profile 查看模型详情 @params id @return model

func (*ModelController) Sort

func (c *ModelController) Sort()

Sort 模型排序 params int : int 模型Id : 新sort值 @return success/error

func (*ModelController) Update

func (c *ModelController) Update()

Update 编辑模型动作 @params id name @return success/error

type PictureController

type PictureController struct {
	LoginController
}

func (*PictureController) Add

func (c *PictureController) Add()

AddPicture 添加图片 @params cateId modelId title description permission @return success/error

func (*PictureController) Delete

func (c *PictureController) Delete()

DelPicture 删除图片 @params id @return error

func (*PictureController) List

func (c *PictureController) List()

List 获取图片列表 @params keyword(搜索title的关键词) @return []Picture

func (*PictureController) Profile

func (c *PictureController) Profile()

Profile 查看图片详情 @params id @return Picture

func (*PictureController) Sort

func (c *PictureController) Sort()

SortPicture 对图片进行排序 @params id sort @return success/error

func (*PictureController) Update

func (c *PictureController) Update()

UpdatePicture 更新图片 @params id cateId modelId title description permission @return success/error

type Server

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

func (Server) Upload

func (cc Server) Upload(request *http.Request, allowExt []string, uploadDir string, isNeedTransCode bool) UploadFileInfo

文件上传接口 allowExt 若不判断文件后缀,则传nil - ".mp4", ".mov", ...

type TagController

type TagController struct {
	LoginController
}

func (*TagController) Add

func (c *TagController) Add()

AddTag 添加标签 @params cateId modelId title description @return success/error

func (*TagController) Delete

func (c *TagController) Delete()

DelTag 删除标签 @params id @return error

func (*TagController) List

func (c *TagController) List()

List 获取标签列表 @params keyword(搜索title的关键词) @return []Tag

func (*TagController) Profile

func (c *TagController) Profile()

Profile 查看标签详情 @params id @return Tag

func (*TagController) Sort

func (c *TagController) Sort()

SortTag 对标签进行排序 @params id sort @return success/error

func (*TagController) Update

func (c *TagController) Update()

UpdateTag 更新标签 @params id cateId modelId title description @return success/error

type UploadFileInfo

type UploadFileInfo struct {
	FileName   string //文件名		eg - "3lk4jlk34jk2jk5434524235"
	Ext        string //文件后缀 		eg: "mp4"
	Path       string //文件保存路径  eg: "/x/xx/xxx.mp4"
	OriginName string //原文件名 		eg: "hehe"
}

Jump to

Keyboard shortcuts

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