controller

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	Base
}

*

  • 管理员 *
  • @create 2021-9-2
  • @author deatil

func (*Admin) Access

func (this *Admin) Access(ctx *router.Context)

账号授权 @Summary 账号授权 @Description 管理员账号授权 @Tags 管理员 @Accept application/json @Produce application/json @Param id path string true "刷新 token" @Param access formData string true "权限列表,半角逗号分隔" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/{id}/access [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.access"}

func (*Admin) Create

func (this *Admin) Create(ctx *router.Context)

添加账号 @Summary 添加账号 @Description 添加账号 @Tags 管理员 @Accept application/json @Produce application/json @Param name formData string true "名称" @Param email formData string true "邮箱" @Param nickname formData string true "昵称" @Param introduce formData string true "描述" @Param status formData string true "状态" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin [post] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.create"}

func (*Admin) Delete

func (this *Admin) Delete(ctx *router.Context)

删除账号 @Summary 删除账号 @Description 管理员账号删除 @Tags 管理员 @Accept application/json @Produce application/json @Param id path string true "管理员ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/{id} [delete] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.delete"}

func (*Admin) Detail

func (this *Admin) Detail(ctx *router.Context)

账号详情 @Summary 账号详情 @Description 管理员账号详情 @Tags 管理员 @Accept application/json @Produce application/json @Param id path string true "管理员ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/{id} [get] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.detail"}

func (*Admin) Disable

func (this *Admin) Disable(ctx *router.Context)

账号禁用 @Summary 账号禁用 @Description 管理员账号禁用 @Tags 管理员 @Accept application/json @Produce application/json @Param id path string true "管理员ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/{id}/disable [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.disable"}

func (*Admin) Enable

func (this *Admin) Enable(ctx *router.Context)

账号启用 @Summary 账号启用 @Description 管理员账号启用 @Tags 管理员 @Accept application/json @Produce application/json @Param id path string true "管理员ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/{id}/enable [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.enable"}

func (*Admin) Groups

func (this *Admin) Groups(ctx *router.Context)

添加账号所需分组 @Summary 添加账号所需分组 @Description 添加账号所需分组 @Tags 管理员 @Accept application/json @Produce application/json @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/groups [get] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.groups"}

func (*Admin) Index

func (this *Admin) Index(ctx *router.Context)

账号列表 @Summary 账号列表 @Description 管理员账号列表 @Tags 管理员 @Accept application/json @Produce application/json @Param order query string false "排序,示例:id__DESC" @Param searchword query string false "搜索关键字" @Param start_time query string false "开始时间" @Param end_time query string false "结束时间" @Param status query string false "状态" @Param start query string false "开始数据量" @Param limit query string false "每页数量" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin [get] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.index"}

func (*Admin) Logout

func (this *Admin) Logout(ctx *router.Context)

账号退出 @Summary 账号退出 @Description 管理员账号退出 @Tags 管理员 @Accept application/json @Produce application/json @Param refreshToken path string true "刷新 token" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/logout/{refreshToken} [delete] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.logout"}

func (*Admin) ResetPermission

func (this *Admin) ResetPermission(ctx *router.Context)

账号权限同步 @Summary 账号权限同步 @Description 管理员账号权限同步 @Tags 管理员 @Accept application/json @Produce application/json @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/reset-permission [put] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.reset-permission", "sort": "200"}

func (*Admin) Rules

func (this *Admin) Rules(ctx *router.Context)

账号权限 @Summary 账号权限 @Description 账号权限 @Tags 管理员 @Accept application/json @Produce application/json @Param id path string true "管理员ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/{id}/rules [get] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.rules"}

func (*Admin) Update

func (this *Admin) Update(ctx *router.Context)

更新账号 @Summary 更新账号 @Description 管理员更新信息 @Tags 管理员 @Accept application/json @Produce application/json @Param id path string true "管理员ID" @Param name formData string true "名称" @Param email formData string true "邮箱" @Param nickname formData string true "昵称" @Param introduce formData string true "描述" @Param status formData string true "状态" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/{id} [put] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.update"}

func (*Admin) UpdateAvatar

func (this *Admin) UpdateAvatar(ctx *router.Context)

修改账号头像 @Summary 修改账号头像 @Description 修改管理员账号头像 @Tags 管理员 @Accept application/json @Produce application/json @Param id path string true "管理员ID" @Param avatar formData string true "头像数据ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/{id}/avatar [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.avatar"}

func (*Admin) UpdatePasssword

func (this *Admin) UpdatePasssword(ctx *router.Context)

修改账号密码 @Summary 修改账号密码 @Description 修改管理员账号密码 @Tags 管理员 @Accept application/json @Produce application/json @Param id path string true "管理员ID" @Param password formData string true "新密码" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /admin/{id}/password [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.admin.password"}

type Attachment

type Attachment struct {
	Base
}

*

  • 附件 *
  • @create 2021-8-31
  • @author deatil

func (*Attachment) Delete

func (this *Attachment) Delete(ctx *router.Context)

附件删除 @Summary 附件删除 @Description 附件删除 @Tags 附件 @Accept application/json @Produce application/json @Param id path string true "附件ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /attachment/{id} [delete] @Security Bearer @x-lakego {"slug": "lakego-admin.attachment.delete","sort":"153"}

func (*Attachment) Detail

func (this *Attachment) Detail(ctx *router.Context)

附件详情 @Summary 附件详情 @Description 附件详情 @Tags 附件 @Accept application/json @Produce application/json @Param id path string true "附件ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /attachment/{id} [get] @Security Bearer @x-lakego {"slug": "lakego-admin.attachment.detail","sort":"152"}

func (*Attachment) Disable

func (this *Attachment) Disable(ctx *router.Context)

附件禁用 @Summary 附件禁用 @Description 附件禁用 @Tags 附件 @Accept application/json @Produce application/json @Param id path string true "附件ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /attachment/{id}/disable [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.attachment.disable","sort":"155"}

func (*Attachment) Download

func (this *Attachment) Download(ctx *router.Context)

附件下载 @Summary 附件下载 @Description 附件下载 @Tags 附件 @Accept application/json @Produce application/force-download @Param code path string true "附件下载码" @Success 200 {string} string "" @Router /attachment/download/{code} [get] @Security Bearer @x-lakego {"slug": "lakego-admin.attachment.download","sort":"157"}

func (*Attachment) DownloadCode

func (this *Attachment) DownloadCode(ctx *router.Context)

附件下载码 @Summary 附件下载码 @Description 附件下载码 @Tags 附件 @Accept application/json @Produce application/json @Param id path string true "附件ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /attachment/downcode/{id} [get] @Security Bearer @x-lakego {"slug": "lakego-admin.attachment.downcode","sort":"156"}

func (*Attachment) Enable

func (this *Attachment) Enable(ctx *router.Context)

附件启用 @Summary 附件启用 @Description 附件启用 @Tags 附件 @Accept application/json @Produce application/json @Param id path string true "附件ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /attachment/{id}/enable [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.attachment.enable","sort":"154"}

func (*Attachment) Index

func (this *Attachment) Index(ctx *router.Context)

附件列表 @Summary 附件列表 @Description 附件列表 @Tags 附件 @Accept application/json @Produce application/json @Param order query string false "排序,示例:id__DESC" @Param searchword query string false "搜索关键字" @Param start_time query string false "开始时间" @Param end_time query string false "结束时间" @Param status query string false "状态" @Param start query string false "开始数据量" @Param limit query string false "每页数量" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /attachment [get] @Security Bearer @x-lakego {"slug": "lakego-admin.attachment.index","sort":"151"}

type AuthGroup

type AuthGroup struct {
	Base
}

*

  • 权限分组 *
  • @create 2021-9-12
  • @author deatil

func (*AuthGroup) Access

func (this *AuthGroup) Access(ctx *router.Context)

权限分组授权 @Summary 权限分组授权 @Description 权限分组授权 @Tags 权限分组 @Accept application/json @Produce application/json @Param id path string true "权限分组ID" @Param access formData string true "权限列表,半角逗号分隔" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group/{id}/access [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.access"}

func (*AuthGroup) Create

func (this *AuthGroup) Create(ctx *router.Context)

权限分组添加 @Summary 权限分组添加 @Description 权限分组添加 @Tags 权限分组 @Accept application/json @Produce application/json @Param parentid formData string true "父级ID" @Param title formData string true "名称" @Param description formData string false "描述" @Param listorder formData string true "排序" @Param status formData string true "状态" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group [post] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.create"}

func (*AuthGroup) Delete

func (this *AuthGroup) Delete(ctx *router.Context)

权限分组删除 @Summary 权限分组删除 @Description 权限分组删除 @Tags 权限分组 @Accept application/json @Produce application/json @Param id path string true "权限分组ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group/{id} [delete] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.delete"}

func (*AuthGroup) Detail

func (this *AuthGroup) Detail(ctx *router.Context)

权限分组详情 @Summary 权限分组详情 @Description 权限分组详情 @Tags 权限分组 @Accept application/json @Produce application/json @Param id path string true "权限分组ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group/{id} [get] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.detail"}

func (*AuthGroup) Disable

func (this *AuthGroup) Disable(ctx *router.Context)

权限分组禁用 @Summary 权限分组禁用 @Description 权限分组禁用 @Tags 权限分组 @Accept application/json @Produce application/json @Param id path string true "权限分组ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group/{id}/disable [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.disable"}

func (*AuthGroup) Enable

func (this *AuthGroup) Enable(ctx *router.Context)

权限分组启用 @Summary 权限分组启用 @Description 权限分组启用 @Tags 权限分组 @Accept application/json @Produce application/json @Param id path string true "权限分组ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group/{id}/enable [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.enable"}

func (*AuthGroup) Index

func (this *AuthGroup) Index(ctx *router.Context)

权限分组列表 @Summary 权限分组列表 @Description 权限分组列表 @Tags 权限分组 @Accept application/json @Produce application/json @Param order query string false "排序,示例:id__DESC" @Param searchword query string false "搜索关键字" @Param start_time query string false "开始时间" @Param end_time query string false "结束时间" @Param status query string false "状态" @Param start query string false "开始数据量" @Param limit query string false "每页数量" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group [get] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.index"}

func (*AuthGroup) IndexChildren

func (this *AuthGroup) IndexChildren(ctx *router.Context)

权限分组子列表 @Summary 权限分组子列表 @Description 权限分组子列表 @Tags 权限分组 @Accept application/json @Produce application/json @Param id query string true "权限分组ID" @Param type query string false "数据类型,可选值:list | ids" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group/children [get] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.children"}

func (*AuthGroup) IndexTree

func (this *AuthGroup) IndexTree(ctx *router.Context)

权限分组树结构 @Summary 权限分组树结构 @Description 权限分组树结构 @Tags 权限分组 @Accept application/json @Produce application/json @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group/tree [get] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.tree"}

func (*AuthGroup) Listorder

func (this *AuthGroup) Listorder(ctx *router.Context)

权限分组排序 @Summary 权限分组排序 @Description 权限分组排序 @Tags 权限分组 @Accept application/json @Produce application/json @Param id path string true "权限分组ID" @Param listorder formData string true "排序值" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group/{id}/sort [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.sort"}

func (*AuthGroup) Update

func (this *AuthGroup) Update(ctx *router.Context)

权限分组更新 @Summary 权限分组更新 @Description 权限分组更新 @Tags 权限分组 @Accept application/json @Produce application/json @Param id path string true "权限分组ID" @Param parentid formData string true "父级ID" @Param title formData string true "名称" @Param description formData string false "描述" @Param listorder formData string true "排序" @Param status formData string true "状态" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/group/{id} [put] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-group.update"}

type AuthRule

type AuthRule struct {
	Base
}

*

  • 权限菜单 *
  • @create 2021-9-12
  • @author deatil

func (*AuthRule) Clear

func (this *AuthRule) Clear(ctx *router.Context)

清空特定ID权限 @Summary 清空特定ID权限 @Description 清空特定ID权限 @Tags 权限菜单 @Accept application/json @Produce application/json @Param ids formData string true "权限ID列表" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule/clear [delete] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.clear"}

func (*AuthRule) Create

func (this *AuthRule) Create(ctx *router.Context)

权限菜单添加 @Summary 权限菜单添加 @Description 权限菜单添加 @Tags 权限菜单 @Accept application/json @Produce application/json @Param parentid formData string true "父级ID" @Param title formData string true "名称" @Param url formData string true "URL链接" @Param method formData string true "请求方式" @Param slug formData string true "别名 Slug" @Param description formData string false "描述" @Param listorder formData string true "排序" @Param status formData string true "状态" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule [post] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.create"}

func (*AuthRule) Delete

func (this *AuthRule) Delete(ctx *router.Context)

权限菜单删除 @Summary 权限菜单删除 @Description 权限菜单删除 @Tags 权限菜单 @Accept application/json @Produce application/json @Param id path string true "权限菜单ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule/{id} [delete] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.delete"}

func (*AuthRule) Detail

func (this *AuthRule) Detail(ctx *router.Context)

权限菜单详情 @Summary 权限菜单详情 @Description 权限菜单详情 @Tags 权限菜单 @Accept application/json @Produce application/json @Param id path string true "权限菜单ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule/{id} [get] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.detail"}

func (*AuthRule) Disable

func (this *AuthRule) Disable(ctx *router.Context)

权限菜单禁用 @Summary 权限菜单禁用 @Description 权限菜单禁用 @Tags 权限菜单 @Accept application/json @Produce application/json @Param id path string true "权限菜单ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule/{id}/disable [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.disable"}

func (*AuthRule) Enable

func (this *AuthRule) Enable(ctx *router.Context)

权限菜单启用 @Summary 权限菜单启用 @Description 权限菜单启用 @Tags 权限菜单 @Accept application/json @Produce application/json @Param id path string true "权限菜单ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule/{id}/enable [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.enable"}

func (*AuthRule) Index

func (this *AuthRule) Index(ctx *router.Context)

权限菜单列表 @Summary 权限菜单列表 @Description 权限菜单列表 @Tags 权限菜单 @Accept application/json @Produce application/json @Param order query string false "排序,示例:id__DESC" @Param searchword query string false "搜索关键字" @Param method query string false "请求方式" @Param start_time query string false "开始时间" @Param end_time query string false "结束时间" @Param status query string false "状态" @Param start query string false "开始数据量" @Param limit query string false "每页数量" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule [get] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.index"}

func (*AuthRule) IndexChildren

func (this *AuthRule) IndexChildren(ctx *router.Context)

权限菜单子列表 @Summary 权限菜单子列表 @Description 权限菜单子列表 @Tags 权限菜单 @Accept application/json @Produce application/json @Param id query string true "权限菜单ID" @Param type query string false "数据类型,可选值:list | ids" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule/children [get] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.children"}

func (*AuthRule) IndexTree

func (this *AuthRule) IndexTree(ctx *router.Context)

权限菜单树结构 @Summary 权限菜单树结构 @Description 权限菜单树结构 @Tags 权限菜单 @Accept application/json @Produce application/json @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule/tree [get] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.tree"}

func (*AuthRule) Listorder

func (this *AuthRule) Listorder(ctx *router.Context)

权限菜单排序 @Summary 权限菜单排序 @Description 权限菜单排序 @Tags 权限菜单 @Accept application/json @Produce application/json @Param id path string true "权限菜单ID" @Param listorder formData string true "排序值" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule/{id}/sort [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.sort"}

func (*AuthRule) Update

func (this *AuthRule) Update(ctx *router.Context)

权限菜单更新 @Summary 权限菜单更新 @Description 权限菜单更新 @Tags 权限菜单 @Accept application/json @Produce application/json @Param id path string true "权限菜单ID" @Param parentid formData string true "父级ID" @Param title formData string true "名称" @Param url formData string true "URL链接" @Param method formData string true "请求方式" @Param slug formData string true "别名 Slug" @Param description formData string false "描述" @Param listorder formData string true "排序" @Param status formData string true "状态" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /auth/rule/{id} [put] @Security Bearer @x-lakego {"slug": "lakego-admin.auth-rule.update"}

type Base

type Base struct {
	controller.Base
}

*

  • 基类 *
  • @create 2021-8-31
  • @author deatil

func (*Base) FormatDate

func (this *Base) FormatDate(date string) int64

时间格式化到时间戳

func (*Base) FormatOrderBy

func (this *Base) FormatOrderBy(order string, def ...string) []string

格式化排序

func (*Base) ShouldBindJSON added in v1.0.1

func (this *Base) ShouldBindJSON(ctx *router.Context, obj any) error

绑定数据

func (*Base) SwitchStatus

func (this *Base) SwitchStatus(name string) int

状态通用转换

type Passport

type Passport struct {
	Base
}

*

  • 登陆相关 *
  • @create 2021-9-2
  • @author deatil

func (*Passport) Captcha

func (this *Passport) Captcha(ctx *router.Context)

验证码 @Summary 登陆验证码 @Description 登陆验证码 @Tags 登陆相关 @Accept application/json @Produce application/json @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Header 200 {string} string "Lakego-Admin-Captcha-Id" @Router /passport/captcha [get] @x-lakego {"slug": "lakego-admin.passport.captcha"}

func (*Passport) Login

func (this *Passport) Login(ctx *router.Context)

账号登陆 @Summary 账号登陆 @Description 账号登陆 @Tags 登陆相关 @Accept application/json @Produce application/json @Param Lakego-Admin-Captcha-Id header string true "验证码字段" @Param name formData string true "账号" @Param password formData string true "密码" @Param captcha formData string true "验证码" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /passport/login [post] @x-lakego {"slug": "lakego-admin.passport.login"}

func (*Passport) Logout

func (this *Passport) Logout(ctx *router.Context)

账号退出 @Summary 当前账号退出 @Description 当前账号退出 @Tags 登陆相关 @Accept application/json @Produce application/json @Param Authorization header string false "Bearer 用户令牌" @Param refresh_token formData string true "刷新 Token" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /passport/logout [delete] @Security Bearer @x-lakego {"slug": "lakego-admin.passport.logout"}

func (*Passport) RefreshToken

func (this *Passport) RefreshToken(ctx *router.Context)

刷新 token @Summary 刷新 token @Description 刷新 token @Tags 登陆相关 @Accept application/json @Produce application/json @Param refresh_token formData string true "刷新 Token" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /passport/refresh-token [post] @x-lakego {"slug": "lakego-admin.passport.refresh-token"}

type Profile

type Profile struct {
	Base
}

*

  • 个人信息 *
  • @create 2021-7-5
  • @author deatil

func (*Profile) Index

func (this *Profile) Index(ctx *router.Context)

个人信息 @Summary 个人信息详情 @Description 个人信息详情 @Tags 个人信息 @Accept application/json @Produce application/json @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /profile [get] @Security Bearer @x-lakego {"slug": "lakego-admin.profile.index"}

func (*Profile) Rules

func (this *Profile) Rules(ctx *router.Context)

个人权限列表 @Summary 个人权限列表 @Description 个人权限列表 @Tags 个人信息 @Accept application/json @Produce application/json @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /profile/rules [get] @Security Bearer @x-lakego {"slug": "lakego-admin.profile.rules"}

func (*Profile) Update

func (this *Profile) Update(ctx *router.Context)

修改信息 @Summary 修改个人信息详情 @Description 修改个人信息详情 @Tags 个人信息 @Accept application/json @Produce application/json @Param nickname formData string true "昵称" @Param email formData string true "邮箱" @Param introduce formData string true "简介" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /profile [put] @Security Bearer @x-lakego {"slug": "lakego-admin.profile.update"}

func (*Profile) UpdateAvatar

func (this *Profile) UpdateAvatar(ctx *router.Context)

修改头像 @Summary 修改个人头像 @Description 修改个人头像 @Tags 个人信息 @Accept application/json @Produce application/json @Param avatar formData string true "头像数据ID" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /profile/avatar [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.profile.avatar"}

func (*Profile) UpdatePasssword

func (this *Profile) UpdatePasssword(ctx *router.Context)

修改密码 @Summary 修改密码 @Description 修改密码 @Tags 个人信息 @Accept application/json @Produce application/json @Param oldpassword formData string true "旧密码" @Param newpassword formData string true "新密码" @Param newpassword_confirm formData string true "确认新密码" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /profile/password [patch] @Security Bearer @x-lakego {"slug": "lakego-admin.profile.password"}

type System

type System struct {
	Base
}

*

  • 系统 *
  • @create 2021-9-13
  • @author deatil

func (*System) Info

func (this *System) Info(ctx *router.Context)

系统信息 @Summary 系统信息 @Description 系统信息 @Tags 系统 @Accept application/json @Produce application/json @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /system/info [get] @Security Bearer @x-lakego {"slug": "lakego-admin.system.info"}

func (*System) Rules

func (this *System) Rules(ctx *router.Context)

权限 slug 列表 @Summary 权限 slug 列表 @Description 权限 slug 列表 @Tags 系统 @Accept application/json @Produce application/json @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /system/rules [get] @Security Bearer @x-lakego {"slug": "lakego-admin.system.rules"}

type Upload

type Upload struct {
	Base
}

*

  • 上传 *
  • @create 2021-8-15
  • @author deatil

func (*Upload) File

func (this *Upload) File(ctx *router.Context)

上传文件 @Summary 上传文件 @Description 上传文件 @Tags 上传 @Accept application/json @Produce application/json @Param type query string false "文件类型,可选数据:image | media | file。默认:file" @Param file formData string true "文件数据" @Success 200 {string} json "{"success": true, "code": 0, "message": "string", "data": ""}" @Router /upload/file [post] @Security Bearer @x-lakego {"slug": "lakego-admin.upload.file"}

Jump to

Keyboard shortcuts

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