apis

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	*controller.Simple
}

func (*API) Create

func (e *API) Create(*gin.Context)

Create 创建API @Summary 创建API @Description 创建API @Tags api @Accept application/json @Accept application/json @Param data body models.API true "data" @Success 201 {object} models.API @Router /admin/api/apis [post] @Security Bearer

func (*API) Delete

func (e *API) Delete(*gin.Context)

Delete 删除API @Summary 删除API @Description 删除API @Tags api @Accept application/json @Param id path string true "id" @Success 204 @Router /admin/api/apis/{id} [delete] @Security Bearer

func (*API) Get

func (e *API) Get(*gin.Context)

Get 获取API @Summary 获取API @Description 获取API @Tags api @Accept application/json @Param id path string true "id" @Success 200 {object} models.API @Router /admin/api/apis/{id} [get] @Security Bearer

func (*API) List

func (e *API) List(*gin.Context)

List API列表数据 @Summary API列表数据 @Description API列表数据 @Tags api @Accept application/json @Accept application/json @Param current query int false "current" @Param pageSize query int false "pageSize" @Success 200 {object} response.Page{data=[]models.API} @Router /admin/api/apis [get] @Security Bearer

func (*API) Update

func (e *API) Update(*gin.Context)

Update 更新API @Summary 更新API @Description 更新API @Tags api @Accept application/json @Accept application/json @Param id path string true "id" @Param data body models.API true "data" @Success 200 {object} models.API @Router /admin/api/apis/{id} [put] @Security Bearer

type AppConfig

type AppConfig struct {
	*controller.Simple
	// contains filtered or unexported fields
}

func (*AppConfig) Control

func (e *AppConfig) Control(ctx *gin.Context)

Control 应用配置控制 @Summary 应用配置控制 @Description 应用配置控制 @Tags app-config @Accept application/json @Product application/json @Param group path string true "group" @Param data body dto.AppConfigControlRequest true "data" @Success 200 @Router /admin/api/app-configs/{group} [put] @Security Bearer

func (*AppConfig) GetAction

func (e *AppConfig) GetAction(string) response.Action

func (*AppConfig) Group

func (e *AppConfig) Group(ctx *gin.Context)

Group 应用配置分组 @Summary 应用配置分组 @Description 应用配置分组 @Tags app-config @Accept application/json @Product application/json @Param group path string true "group" @Success 200 {object} map[string]models.AppConfig @Router /admin/api/app-configs/{group} [get] @Security Bearer

func (*AppConfig) Other

func (e *AppConfig) Other(r *gin.RouterGroup)

func (*AppConfig) Profile

func (e *AppConfig) Profile(ctx *gin.Context)

Profile 获取应用配置 @Summary 获取应用配置 @Description 获取应用配置 @Tags app-config @Accept application/json @Product application/json @Success 200 {object} map[string]map[string]string @Router /admin/api/app-configs/profile [get] @Security Bearer

type Department

type Department struct {
	*controller.Simple
}

func (*Department) Create

func (e *Department) Create(c *gin.Context)

Create 创建部门 @Summary 创建部门 @Description 创建部门 @Tags department @Accept application/json @Produce application/json @Param data body models.Department true "data" @Success 201 {object} models.Department @Router /admin/api/departments [post] @Security Bearer

func (*Department) Delete

func (e *Department) Delete(c *gin.Context)

Delete 删除部门 @Summary 删除部门 @Description 删除部门 @Tags department @Accept application/json @Produce application/json @Param id path string true "id" @Success 204 @Router /admin/api/departments/{id} [delete] @Security Bearer

func (*Department) Get

func (e *Department) Get(c *gin.Context)

Get 获取部门 @Summary 获取部门 @Description 获取部门 @Tags department @Accept application/json @Produce application/json @Param id path string true "id" @Success 200 {object} models.Department @Router /admin/api/departments/{id} [get] @Security Bearer

func (*Department) GetAction

func (e *Department) GetAction(key string) response.Action

func (*Department) List

func (e *Department) List(c *gin.Context)

List 部门列表 @Summary 部门列表 @Description 部门列表 @Tags department @Accept application/json @Produce application/json @Param name query string false "部门名称" @Param parentID query string false "父级部门ID" @Param status query string false "状态" @Param page query int false "页码" @Param pageSize query int false "每页条数" @Success 200 {object} response.Page{data=[]models.Department} @Router /admin/api/departments [get] @Security Bearer

func (*Department) Other

func (e *Department) Other(r *gin.RouterGroup)

func (*Department) Update

func (e *Department) Update(c *gin.Context)

Update 更新部门 @Summary 更新部门 @Description 更新部门 @Tags department @Accept application/json @Produce application/json @Param id path string true "id" @Param data body models.Department true "data" @Success 200 {object} models.Department @Router /admin/api/departments/{id} [put] @Security Bearer

type Field

type Field struct {
	*controller.Simple
}

func (*Field) Create

func (e *Field) Create(*gin.Context)

Create 创建字段 @Summary 创建字段 @Description 创建字段 @Tags field @Accept application/json @Product application/json @Param data body models.Field true "data" @Success 201 {object} models.Field @Router /admin/api/fields [post] @Security Bearer

func (*Field) Delete

func (e *Field) Delete(*gin.Context)

Delete 删除字段 @Summary 删除字段 @Description 删除字段 @Tags field @Param id path string true "id" @Success 204 @Router /admin/api/fields/{id} [delete] @Security Bearer

func (*Field) Get

func (e *Field) Get(*gin.Context)

Get 获取字段 @Summary 获取字段 @Description 获取字段 @Tags field @Param id path string true "id" @Success 200 {object} models.Field @Router /admin/api/fields/{id} [get] @Security Bearer

func (*Field) List

func (e *Field) List(*gin.Context)

List 字段列表 @Summary 字段列表 @Description 字段列表 @Tags field @Accept application/json @Product application/json @Param current query int false "current" @Param pageSize query int false "pageSize" @Param modelID query string false "modelID" @Success 200 {object} response.Page{data=[]models.Field} @Router /admin/api/fields [get] @Security Bearer

func (*Field) Update

func (e *Field) Update(*gin.Context)

Update 更新字段 @Summary 更新字段 @Description 更新字段 @Tags field @Accept application/json @Product application/json @Param id path string true "id" @Param data body models.Field true "data" @Success 200 {object} models.Field @Router /admin/api/fields/{id} [put] @Security Bearer

type Github

type Github struct {
	*controller.Simple
}

Github github

func (*Github) GetAction

func (*Github) GetAction(string) response.Action

func (*Github) GetKey

func (*Github) GetKey() string

func (*Github) GetLoginURL

func (e *Github) GetLoginURL(c *gin.Context)

GetLoginURL 获取github登录地址 @Summary 获取github登录地址 @Description 获取github登录地址 @Tags generator @Accept application/json @Product application/json @Param state query string true "state" @Success 200 {object} string @Router /admin/api/github/get-login-url [get]

func (*Github) Other

func (e *Github) Other(r *gin.RouterGroup)

type Language

type Language struct {
	*controller.Simple
}

func (*Language) Create

func (*Language) Create(*gin.Context)

Create 创建Language @Summary 创建Language @Description 创建Language @Tags language @Accept application/json @Product application/json @Param data body models.Language true "data" @Success 201 {object} models.Language @Router /admin/api/languages [post] @Security Bearer

func (*Language) Delete

func (*Language) Delete(*gin.Context)

Delete 删除Language @Summary 删除Language @Description 删除Language @Tags language @Param id path string true "id" @Success 204 @Router /admin/api/languages/{id} [delete] @Security Bearer

func (*Language) Get

func (*Language) Get(*gin.Context)

Get 获取Language @Summary 获取Language @Description 获取Language @Tags language @Param id path string true "id" @Success 200 {object} models.Language @Router /admin/api/languages/{id} [get] @Security Bearer

func (*Language) List

func (*Language) List(*gin.Context)

List Language列表数据 @Summary Language列表数据 @Description Language列表数据 @Tags language @Accept application/json @Product application/json @Param name query string false "name" @Param status query string false "status" @Param current query int false "current" @Param pageSize query int false "pageSize" @Success 200 {object} response.Page{data=[]models.Language} @Router /admin/api/languages [get] @Security Bearer

func (*Language) Update

func (*Language) Update(*gin.Context)

Update 更新Language @Summary 更新Language @Description 更新Language @Tags language @Accept application/json @Product application/json @Param id path string true "id" @Param data body models.Language true "data" @Success 200 {object} models.Language @Router /admin/api/languages/{id} [put] @Security Bearer

type Menu struct {
	*controller.Simple
}
func (e *Menu) BindAPI(ctx *gin.Context)

BindAPI 绑定菜单下的接口 @Summary 绑定菜单下的接口 @Description 绑定菜单下的接口 @Tags menu @Accept application/json @Product application/json @Param data body dto.MenuBindAPIRequest true "data" @Success 200 @Router /admin/api/menu/bind-api [post] @Security Bearer

func (*Menu) Create(*gin.Context)

Create 创建菜单 @Summary 创建菜单 @Description 创建菜单 @Tags menu @Accept application/json @Product application/json @Param data body models.Menu true "data" @Success 201 {object} models.Menu @Router /admin/api/menus [post] @Security Bearer

func (*Menu) Delete(*gin.Context)

Delete 删除菜单 @Summary 删除菜单 @Description 删除菜单 @Tags menu @Param id path string true "id" @Success 204 @Router /admin/api/menus/{id} [delete] @Security Bearer

func (*Menu) Get(*gin.Context)

Get 获取菜单 @Summary 获取菜单 @Description 获取菜单 @Tags menu @Param id path string true "id" @Param preloads query []string false "preloads" @Success 200 {object} models.Menu @Router /admin/api/menus/{id} [get] @Security Bearer

func (e *Menu) GetAPI(ctx *gin.Context)

GetAPI 获取菜单下的接口 @Summary 获取菜单下的接口 @Description 获取菜单下的接口 @Tags menu @Param id path string true "id" @Success 200 {object} []models.Menu @Router /admin/api/menu/api/{id} [get] @Security Bearer

func (e *Menu) GetAction(key string) response.Action

GetAction get action

func (e *Menu) GetAuthorize(ctx *gin.Context)

GetAuthorize 获取菜单权限 @Summary 获取菜单权限 @Description 获取菜单权限 @Tags menu @Accept application/json @Product application/json @Success 200 {object} []models.Menu{children=[]models.Menu} @Router /admin/api/menu/authorize [get] @Security Bearer

func (*Menu) List(ctx *gin.Context)

List 菜单列表数据 @Summary 菜单列表数据 @Description 菜单列表数据 @Tags menu @Accept application/json @Product application/json @Param name query string false "name" @Param status query string false "status" @Param show query bool false "show" @Param parentID query string false "parentID" @Param type query []string false "type" @Param current query int false "current" @Param pageSize query int false "pageSize" @Success 200 {object} response.Page{data=[]models.Menu} @Router /admin/api/menus [get] @Security Bearer

func (e *Menu) Other(r *gin.RouterGroup)
func (e *Menu) Tree(ctx *gin.Context)

Tree 获取菜单树 @Summary 获取菜单树 @Description 获取菜单树 @Tags menu @Success 200 {object} []models.Menu{children=[]models.Menu} @Router /admin/api/menu/tree [get] @Security Bearer

func (*Menu) Update(*gin.Context)

Update 更新菜单 @Summary 更新菜单 @Description 更新菜单 @Tags menu @Accept application/json @Product application/json @Param id path string true "id" @Param data body models.Menu true "data" @Success 200 {object} models.Menu @Router /admin/api/menus/{id} [put] @Security Bearer

func (e *Menu) UpdateAuthorize(ctx *gin.Context)

UpdateAuthorize 更新菜单权限 @Summary 更新菜单权限 @Description 更新菜单权限 @Tags menu @Accept application/json @Product application/json @Param id path string true "id" @Param data body dto.UpdateAuthorizeRequest true "data" @Success 200 @Router /admin/api/menu/authorize/{id} [put] @Security Bearer

type Model

type Model struct {
	*controller.Simple
}

func (*Model) Create

func (e *Model) Create(*gin.Context)

Create 创建模型 @Summary 创建模型 @Description 创建模型 @Tags model @Accept application/json @Produce application/json @Param data body models.Model true "data" @Success 201 {object} models.Model @Router /admin/api/models [post] @Security Bearer

func (*Model) Delete

func (e *Model) Delete(*gin.Context)

Delete 删除模型 @Summary 删除模型 @Description 删除模型 @Tags model @Param id path string true "id" @Success 204 @Router /admin/api/models/{id} [delete] @Security Bearer

func (*Model) GenerateData

func (e *Model) GenerateData(ctx *gin.Context)

GenerateData 生成数据 @Summary 生成数据 @Description 生成数据 @Tags model @Param data body dto.ModelGenerateDataRequest true "data" @Success 200 @Router /admin/api/model/generate-data [put] @Security Bearer

func (*Model) Get

func (e *Model) Get(*gin.Context)

Get 获取模型 @Summary 获取模型 @Description 获取模型 @Tags model @Param id path string true "id" @Success 200 {object} models.Model @Router /admin/api/models/{id} [get] @Security Bearer

func (*Model) List

func (e *Model) List(*gin.Context)

List 模型列表 @Summary 模型列表 @Description 模型列表 @Tags model @Accept application/json @Produce application/json @Param current query int false "current" @Param pageSize query int false "pageSize" @Param preloads query []string false "preloads" @Success 200 {object} response.Page{data=[]models.Model} @Router /admin/api/models [get] @Security Bearer

func (*Model) Other

func (e *Model) Other(r *gin.RouterGroup)

func (*Model) Update

func (e *Model) Update(*gin.Context)

Update 更新模型 @Summary 更新模型 Description 更新模型 @Tags model @Accept application/json @Produce application/json @Param id path string true "id" @Param model body models.Model true "model" @Success 200 {object} models.Model @Router /admin/api/models/{id} [put] @Security Bearer

type Monitor

type Monitor struct {
	*controller.Simple
	// contains filtered or unexported fields
}

func (*Monitor) GetAction

func (e *Monitor) GetAction(string) response.Action

func (*Monitor) Monitor

func (e *Monitor) Monitor(ctx *gin.Context)

Monitor 获取监控信息 @Summary 获取监控信息 @Description 获取监控信息 @Tags monitor @Accept application/json @Product application/json @Success 200 {object} dto.MonitorResponse @Router /admin/api/monitor [get] @Security Bearer

func (*Monitor) Other

func (e *Monitor) Other(r *gin.RouterGroup)

type Notice

type Notice struct {
	*controller.Simple
}

func (*Notice) Create

func (e *Notice) Create(*gin.Context)

Create 创建通知 @Summary 创建通知 @Description 创建通知 @Tags notice @Accept application/json @Product application/json @Param data body models.Notice true "data" @Success 201 @Router /admin/api/notices [post] @Security Bearer

func (*Notice) Delete

func (e *Notice) Delete(*gin.Context)

Delete 删除通知 @Summary 删除通知 @Description 删除通知 @Tags notice @Param id path string true "id" @Success 204 @Router /admin/api/notices/{id} [delete] @Security Bearer

func (*Notice) Get

func (e *Notice) Get(*gin.Context)

Get 获取通知 @Summary 获取通知 @Description 获取通知 @Tags notice @Accept application/json @Product application/json @Param id path string true "id" @Success 200 {object} models.Notice @Router /admin/api/notices/{id} [get] @Security Bearer

func (*Notice) List

func (e *Notice) List(*gin.Context)

List 通知列表数据 @Summary 通知列表数据 @Description 通知列表数据 @Tags notice @Accept application/json @Product application/json @Param title query string false "title" @Param status query string false "status" @Param userID query string false "userID" @Param current query int false "current" @Param pageSize query int false "pageSize" @Success 200 {object} response.Page{data=[]models.Notice} @Router /admin/api/notices [get] @Security Bearer

func (*Notice) MarkRead

func (e *Notice) MarkRead(ctx *gin.Context)

MarkRead 标记已读 @Summary 标记已读 @Description 标记已读 @Tags notice @Accept application/json @Product application/json @Param id path string true "id" @Success 200 @Router /admin/api/notice/read/{id} [put] @Security Bearer

func (*Notice) Other

func (e *Notice) Other(r *gin.RouterGroup)

func (*Notice) Read

func (e *Notice) Read(ctx *gin.Context)

Read 获取通知 @Summary 获取通知 @Description 获取通知 @Tags notice @Accept application/json @Product application/json @Param id path string true "id" @Success 200 {object} models.Notice @Router /admin/api/notice/read/{id} [get] @Security Bearer

func (*Notice) Unread

func (e *Notice) Unread(ctx *gin.Context)

Unread 获取未读通知列表 @Summary 获取未读通知列表 @Description 获取未读通知列表 @Tags notice @Accept application/json @Product application/json @Success 200 {object} []models.Notice @Router /admin/api/notice/unread [get] @Security Bearer

func (*Notice) Update

func (e *Notice) Update(*gin.Context)

Update 更新通知 @Summary 更新通知 @Description 更新通知 @Tags notice @Accept application/json @Product application/json @Param id path string true "id" @Param data body models.Notice true "data" @Success 200 @Router /admin/api/notices/{id} [put] @Security Bearer

type Option

type Option struct {
	*controller.Simple
}

func (*Option) Create

func (*Option) Create(*gin.Context)

Create 创建Option @Summary 创建Option @Description 创建Option @Tags option @Accept application/json @Product application/json @Param data body models.Option true "data" @Success 201 {object} models.Option @Router /admin/api/options [post] @Security Bearer

func (*Option) Delete

func (*Option) Delete(*gin.Context)

Delete 删除Option @Summary 删除Option @Description 删除Option @Tags option @Accept application/json @Product application/json @Param id path string true "id" @Success 204 @Router /admin/api/options/{id} [delete] @Security Bearer

func (*Option) Get

func (*Option) Get(*gin.Context)

Get 获取Option @Summary 获取Option @Description 获取Option @Tags option @Accept application/json @Product application/json @Param id path string true "id" @Success 200 {object} models.Option @Router /admin/api/options/{id} [get] @Security Bearer

func (*Option) List

func (*Option) List(*gin.Context)

List Option列表数据 @Summary Option列表数据 @Description Option列表数据 @Tags option @Accept application/json @Product application/json @Param name query string false "name" @Param status query string false "status" @Param current query int false "current" @Param pageSize query int false "pageSize" @Success 200 {object} response.Page{data=[]models.Option} @Router /admin/api/options [get] @Security Bearer

func (*Option) Other

func (e *Option) Other(r *gin.RouterGroup)

func (*Option) Update

func (*Option) Update(*gin.Context)

Update 更新Option @Summary 更新Option @Description 更新Option @Tags option @Accept application/json @Product application/json @Param id path string true "id" @Param data body models.Option true "data" @Success 200 {object} models.Option @Router /admin/api/options/{id} [put] @Security Bearer

type Post

type Post struct {
	*controller.Simple
}

func (*Post) Create

func (e *Post) Create(c *gin.Context)

Create 创建岗位 @Summary 创建岗位 @Description 创建岗位 @Tags post @Accept application/json @Produce application/json @Param data body models.Post true "data" @Success 201 {object} models.Post @Router /admin/api/posts [post] @Security Bearer

func (*Post) Delete

func (e *Post) Delete(c *gin.Context)

Delete 删除岗位 @Summary 删除岗位 @Description 删除岗位 @Tags post @Accept application/json @Produce application/json @Param id path string true "id" @Success 204 @Router /admin/api/posts/{id} [delete] @Security Bearer

func (*Post) Get

func (e *Post) Get(c *gin.Context)

Get 获取岗位 @Summary 获取岗位 @Description 获取岗位 @Tags post @Accept application/json @Produce application/json @Param id path string true "id" @Success 200 {object} models.Post @Router /admin/api/posts/{id} [get] @Security Bearer

func (*Post) GetAction

func (e *Post) GetAction(key string) response.Action

func (*Post) List

func (e *Post) List(c *gin.Context)

List 岗位列表 @Summary 岗位列表 @Description 岗位列表 @Tags post @Accept application/json @Produce application/json @Param name query string false "岗位名称" @Param parentID query string false "父级岗位ID" @Param status query string false "状态" @Param page query int false "页码" @Param pageSize query int false "每页条数" @Success 200 {object} response.Page{data=[]models.Post} @Router /admin/api/posts [get] @Security Bearer

func (*Post) Other

func (e *Post) Other(r *gin.RouterGroup)

func (*Post) Update

func (e *Post) Update(c *gin.Context)

Update 更新岗位 @Summary 更新岗位 @Description 更新岗位 @Tags post @Accept application/json @Produce application/json @Param id path string true "id" @Param data body models.Post true "data" @Success 200 {object} models.Post @Router /admin/api/posts/{id} [put] @Security Bearer

type Role

type Role struct {
	*controller.Simple
}

func (*Role) Create

func (e *Role) Create(*gin.Context)

Create 创建角色 @Summary 创建角色 @Description 创建角色 @Tags role @Accept application/json @Product application/json @Param data body models.Role true "data" @Success 201 {object} models.Role @Router /admin/api/roles [post] @Security Bearer

func (*Role) Delete

func (e *Role) Delete(*gin.Context)

Delete 删除角色 @Summary 删除角色 @Description 删除角色 @Tags role @Param id path string true "id" @Success 204 @Router /admin/api/roles/{id} [delete] @Security Bearer

func (*Role) Get

func (e *Role) Get(*gin.Context)

Get 获取角色 @Summary 获取角色 @Description 获取角色 @Tags role @Param id path string true "id" @Success 200 {object} models.Role @Router /admin/api/roles/{id} [get] @Security Bearer

func (*Role) GetAuthorize

func (e *Role) GetAuthorize(ctx *gin.Context)

GetAuthorize 获取角色授权 @Summary 获取角色授权 @Description 获取角色授权 @Tags role @Accept application/json @Product application/json @param roleID path string true "roleID" @Success 200 {object} dto.GetAuthorizeResponse @Router /admin/api/role/authorize/{roleID} [get] @Security Bearer

func (*Role) List

func (e *Role) List(*gin.Context)

List 角色列表 @Summary 角色列表 @Description 角色列表 @Tags role @Accept application/json @Product application/json @Param current query int false "current" @Param pageSize query int false "pageSize" @Param id query string false "id" @Param name query string false "name" @Param status query string false "status" @Param remark query string false "remark" @Success 200 {object} response.Page{data=[]models.Role} @Router /admin/api/roles [get] @Security Bearer

func (*Role) Other

func (e *Role) Other(r *gin.RouterGroup)

func (*Role) SetAuthorize

func (e *Role) SetAuthorize(ctx *gin.Context)

SetAuthorize 角色授权 @Summary 角色授权 @Description 给角色授权 @Tags role @param roleID path string true "roleID" @Param data body dto.SetAuthorizeRequest true "data" @Success 200 @Router /admin/api/role/authorize/{roleID} [post] @Security Bearer

func (*Role) Update

func (e *Role) Update(*gin.Context)

Update 更新角色 @Summary 更新角色 @Description 更新角色 @Tags role @Accept application/json @Product application/json @Param id path string true "id" @Param data body models.Role true "data" @Success 200 {object} models.Role @Router /admin/api/roles/{id} [put] @Security Bearer

type Statistics

type Statistics struct {
	*controller.Simple
	// contains filtered or unexported fields
}

func (*Statistics) Get

func (e *Statistics) Get(ctx *gin.Context)

Get 获取统计 @Summary 获取统计 @Description 获取统计 @Tags statistics @Accept application/json @Product application/json @Param name path string true "name" @Success 200 {object} dto.StatisticsGetResponse @Router /admin/api/statistics/{name} [get] @Security Bearer

func (*Statistics) GetAction

func (*Statistics) GetAction(string) response.Action

func (*Statistics) Other

func (e *Statistics) Other(r *gin.RouterGroup)

type Storage

type Storage struct {
	*controller.Simple
	// contains filtered or unexported fields
}

func (*Storage) GetAction

func (*Storage) GetAction(string) response.Action

func (*Storage) GetKey

func (*Storage) GetKey() string

func (*Storage) Other

func (e *Storage) Other(r *gin.RouterGroup)

func (*Storage) Upload

func (e *Storage) Upload(ctx *gin.Context)

type SystemConfig

type SystemConfig struct {
	*controller.Simple
}

func (*SystemConfig) Create

func (*SystemConfig) Create(*gin.Context)

Create 创建系统配置 @Summary 创建系统配置 @Description 创建系统配置 @Tags system_config @Accept application/json @Produce application/json @Param data body models.SystemConfig true "data" @Success 201 {object} models.SystemConfig @Router /admin/api/system-configs [post] @Security Bearer

func (*SystemConfig) Delete

func (*SystemConfig) Delete(*gin.Context)

Delete 删除系统配置 @Summary 删除系统配置 @Description 删除系统配置 @Tags system_config @Param id path string true "id" @Success 204 @Router /admin/api/system-configs/{id} [delete] @Security Bearer

func (*SystemConfig) Get

func (*SystemConfig) Get(*gin.Context)

Get 获取系统配置 @Summary 获取系统配置 @Description 获取系统配置 @Tags system_config @Param id path string true "id" @Success 200 {object} models.SystemConfig @Router /admin/api/system-configs/{id} [get] @Security Bearer

func (*SystemConfig) List

func (*SystemConfig) List(*gin.Context)

List 系统配置列表数据 @Summary 系统配置列表数据 @Description 系统配置列表数据 @Tags system_config @Accept application/json @Produce application/json @Param current query int false "current" @Param pageSize query int false "pageSize" @Success 200 {object} response.Page{data=[]models.SystemConfig} @Router /admin/api/system-configs [get] @Security Bearer

func (*SystemConfig) Update

func (*SystemConfig) Update(*gin.Context)

Update 更新系统配置 @Summary 更新系统配置 @Description 更新系统配置 @Tags system_config @Accept application/json @Produce application/json @Param id path string true "id" @Param data body models.SystemConfig true "data" @Success 200 {object} models.SystemConfig @Router /admin/api/system-configs/{id} [put] @Security Bearer

type Task

type Task struct {
	*controller.Simple
}

func (*Task) Create

func (e *Task) Create(*gin.Context)

Create 创建任务 @Summary 创建任务 @Description 创建任务 @Tags task @Accept application/json @Product application/json @Param data body models.Task true "data" @Success 201 {object} models.Task @Router /admin/api/tasks [post] @Security Bearer

func (*Task) Delete

func (e *Task) Delete(*gin.Context)

Delete 删除任务 @Summary 删除任务 @Description 删除任务 @Tags task @Param id path string true "id" @Success 204 @Router /admin/api/tasks/{id} [delete] @Security Bearer

func (*Task) Get

func (e *Task) Get(*gin.Context)

Get 获取任务 @Summary 获取任务 @Description 获取任务 @Tags task @Param id path string true "id" @Success 200 {object} models.Task @Router /admin/api/tasks/{id} [get] @Security Bearer

func (*Task) List

func (e *Task) List(*gin.Context)

List 任务列表 @Summary 任务列表 @Description 任务列表 @Tags task @Accept application/json @Product application/json @Param current query int false "current" @Param pageSize query int false "pageSize" @Param id query string false "id" @Param name query string false "name" @Param status query string false "status" @Param remark query string false "remark" @Success 200 {object} response.Page{data=[]models.Task} @Router /admin/api/tasks [get] @Security Bearer

func (*Task) Operate

func (e *Task) Operate(c *gin.Context)

Operate 操作任务 @Summary 操作任务 @Description 操作任务 @Tags task @Param id path string true "任务ID" @Param operate path string true "操作类型" @Success 200 @Router /admin/api/task/{operate}/{id} [get] @Security Bearer

func (*Task) Other

func (e *Task) Other(r *gin.RouterGroup)

func (*Task) Update

func (e *Task) Update(*gin.Context)

Update 更新任务 @Summary 更新任务 @Description 更新任务 @Tags task @Accept application/json @Product application/json @Param id path string true "id" @Param data body models.Task true "data" @Success 200 {object} models.Task @Router /admin/api/tasks/{id} [put] @Security Bearer

type Template

type Template struct {
	controller.Simple
}

func (Template) Generate

func (e Template) Generate(c *gin.Context)

Generate 从模版生成代码 @Summary 从模版生成代码 @Description 从模版生成代码 @Tags generator @Accept application/json @Product application/json @Param data body dto.TemplateGenerateReq true "data" @Success 200 {object} dto.TemplateGenerateResp @Router /admin/api/template/generate [post] @Security Bearer

func (Template) GetBranches

func (e Template) GetBranches(c *gin.Context)

GetBranches 获取template分支 @Summary 获取template分支 @Description 获取template分支 @Tags generator @Accept application/json @Product application/json @Param source query string true "template source" @Param accessToken query string false "access token" @Success 200 {object} dto.TemplateGetBranchesResp @Router /admin/api/template/get-branches [get] @Security Bearer

func (Template) GetParams

func (e Template) GetParams(c *gin.Context)

GetParams 获取template参数配置 @Summary 获取template参数配置 @Description 获取template参数配置 @Tags generator @Accept application/json @Product application/json @Param source query string true "template source" @Param branch query string false "branch default:HEAD" @Param path query string false "path default:." @Param accessToken query string false "access token" @Success 200 {object} dto.TemplateGetParamsResp @Router /admin/api/template/get-params [get] @Security Bearer

func (Template) GetPath

func (e Template) GetPath(c *gin.Context)

GetPath 获取template文件路径list @Summary 获取template文件路径list @Description 获取template文件路径list @Tags generator @Accept application/json @Product application/json @Param source query string true "template source" @Param branch query string false "branch default:HEAD" @Param accessToken query string false "access token" @Success 200 {object} dto.TemplateGetPathResp @Router /admin/api/template/get-path [get] @Security Bearer

func (Template) Other

func (e Template) Other(r *gin.RouterGroup)

func (Template) Path

func (Template) Path() string

type Tenant

type Tenant struct {
	*controller.Simple
}

func (*Tenant) Create

func (e *Tenant) Create(*gin.Context)

Create 创建租户 @Summary 创建租户 @Description 创建租户 @Tags tenant @Accept application/json @Product application/json @param data body models.Tenant true "data" @Success 201 {object} models.Tenant @Router /admin/api/tenants [post] @Security Bearer

func (*Tenant) Delete

func (e *Tenant) Delete(*gin.Context)

Delete 删除租户 @Summary 删除租户 @Description 删除租户 @Tags tenant @param id path string true "id" @Success 204 @Router /admin/api/tenants/{id} [delete] @Security Bearer

func (*Tenant) Get

func (e *Tenant) Get(*gin.Context)

Get 获取租户 @Summary 获取租户 @Description 获取租户 @Tags tenant @param id path string true "id" @Param preloads query []string false "preloads" @Success 200 {object} models.Tenant @Router /admin/api/tenants/{id} [get] @Security Bearer

func (*Tenant) List

func (e *Tenant) List(*gin.Context)

List 租户列表 @Summary 租户列表 @Description 租户列表 @Tags tenant @Accept application/json @Product application/json @Param current query int false "current" @Param pageSize query int false "pageSize" @Param id query string false "id" @Param name query string false "name" @Param status query string false "status" @Success 200 {object} response.Page{data=[]models.Tenant} @Router /admin/api/tenants [get] @Security Bearer

func (*Tenant) Update

func (e *Tenant) Update(*gin.Context)

Update 更新租户 @Summary 更新租户 @Description 更新租户 @Tags tenant @Accept application/json @Product application/json @param id path string true "id" @param data body models.Tenant true "data" @Success 200 {object} models.Tenant @Router /admin/api/tenants/{id} [put] @Security Bearer

type User

type User struct {
	*controller.Simple
}

func (*User) Binding added in v0.4.7

func (e *User) Binding(ctx *gin.Context)

Binding 绑定第三方登录 @Summary 绑定第三方登录 @Description 绑定第三方登录 @Tags user @Accept application/json @Product application/json @Param data body models.UserLogin true "data" @Success 200 @Router /admin/api/user/binding [post] @Security Bearer

func (*User) Callback added in v0.4.7

func (e *User) Callback(c *gin.Context)

Callback oauth2回调 @Summary oauth2回调 @Description oauth2回调 @Tags user @Accept application/json @Product application/json @Param provider path string true "provider" @Param code query string true "code" @Param state query string true "state" @Success 200 {object} dto.OauthToken @Failure 422 {object} response.Response @Failure 500 {object} response.Response @Router /admin/api/user/{provider}/callback [get]

func (*User) Create

func (e *User) Create(*gin.Context)

Create 创建用户 @Summary 创建用户 @Description 创建用户 @Tags user @Accept application/json @Product application/json @Param data body models.User true "data" @Success 201 {object} models.User @Router /admin/api/users [post] @Security Bearer

func (*User) Delete

func (e *User) Delete(*gin.Context)

Delete 删除用户 @Summary 删除用户 @Description 删除用户 @Tags user @Param id path string true "id" @Success 204 @Router /admin/api/users/{id} [delete] @Security Bearer

func (*User) FakeCaptcha

func (e *User) FakeCaptcha(ctx *gin.Context)

FakeCaptcha 获取验证码 @Summary 获取验证码 @Description 获取验证码 @Tags user @Accept application/json @Product application/json @Param data body dto.FakeCaptchaRequest true "data" @Success 200 {object} dto.FakeCaptchaResponse @Router /admin/api/user/fakeCaptcha [post]

func (*User) Get

func (e *User) Get(*gin.Context)

Get 获取用户 @Summary 获取用户 @Description 获取用户 @Tags user @Param id path string true "id" @Success 200 {object} models.User @Router /admin/api/users/{id} [get] @Security Bearer

func (*User) GetOauth2 added in v0.4.7

func (e *User) GetOauth2(ctx *gin.Context)

GetOauth2 获取用户第三方登录信息 @Summary 获取用户第三方登录信息 @Description 获取用户第三方登录信息 @Tags user @Accept application/json @Product application/json @Success 200 {object} []models.UserOAuth2 @Router /admin/api/user/oauth2 [get] @Security Bearer

func (*User) List

func (e *User) List(*gin.Context)

List 用户列表 @Summary 用户列表 @Description 用户列表 @Tags user @Accept application/json @Product application/json @Param current query int false "current" @Param pageSize query int false "pageSize" @Param id query string false "id" @Param name query string false "name" @Success 200 {object} response.Page{data=[]models.User} @Router /admin/api/users [get] @Security Bearer

func (*User) Login

func (e *User) Login(_ *gin.Context)

Login 登录 @Summary 登录 @Description 登录 @Tags user @Accept application/json @Product application/json @Param data body models.UserLogin true "data" @Success 200 {object} dto.LoginResponse "{"code": 200, "expire": "2023-12-10T12:31:30+08:00", "token": "xxx"}" @Router /admin/api/user/login [post]

func (*User) Other

func (e *User) Other(r *gin.RouterGroup)

Other handler

func (*User) PasswordReset

func (e *User) PasswordReset(ctx *gin.Context)

PasswordReset 重置密码 @Summary 重置密码 @Description 重置密码 @Tags user @Accept application/json @Product application/json @Param userID path string true "userID" @Param data body dto.PasswordResetRequest true "data" @Success 200 @Router /admin/api/user/{userID}/password-reset [put] @Security Bearer

func (*User) RefreshToken added in v0.3.4

func (e *User) RefreshToken(_ *gin.Context)

RefreshToken 刷新token @Summary 刷新token @Description 刷新token @Tags user @Accept application/json @Product application/json @Success 200 {object} dto.LoginResponse "{"code": 200, "expire": "2023-12-10T12:31:30+08:00", "token": @Router /admin/api/user/refresh-token [get] @Security Bearer

func (*User) ResetPassword added in v0.4.6

func (e *User) ResetPassword(ctx *gin.Context)

ResetPassword 重置密码 @Summary 重置密码 @Description 重置密码 @Tags user @Accept application/json @Product application/json @Param data body dto.ResetPasswordRequest true "data" @Success 200 @Router /admin/api/user/reset-password [post]

func (*User) Unbinding added in v0.4.7

func (e *User) Unbinding(ctx *gin.Context)

Unbinding 解绑第三方登录 @Summary 解绑第三方登录 @Description 解绑第三方登录 @Tags user @Accept application/json @Product application/json @Param data body models.UserLogin true "data" @Success 204 @Router /admin/api/user/unbinding [delete] @Security Bearer

func (*User) Update

func (e *User) Update(*gin.Context)

Update 更新用户 @Summary 更新用户 @Description 更新用户 @Tags user @Accept application/json @Product application/json @Param id path string true "id" @Param data body models.User true "data" @Success 200 {object} models.User @Router /admin/api/users/{id} [put] @Security Bearer

func (*User) UpdateAvatar

func (e *User) UpdateAvatar(ctx *gin.Context)

func (*User) UpdateUserInfo

func (e *User) UpdateUserInfo(ctx *gin.Context)

UpdateUserInfo 更新用户信息 @Summary 更新用户信息 @Description 更新用户信息 @Tags user @Accept application/json @Product application/json @Param data body dto.UpdateUserInfoRequest true "data" @Success 200 @Router /admin/api/user/userInfo [put] @Security Bearer

func (*User) UserInfo

func (e *User) UserInfo(ctx *gin.Context)

UserInfo 获取登录用户信息 @Summary 获取登录用户信息 @Description 获取登录用户信息 @Tags user @Accept application/json @Product application/json @Success 200 {object} models.User @Router /admin/api/user/userInfo [get] @Security Bearer

type UserAuthToken added in v0.4.5

type UserAuthToken struct {
	*controller.Simple
}

func (*UserAuthToken) Generate added in v0.4.5

func (e *UserAuthToken) Generate(ctx *gin.Context)

Generate 生成用户令牌 @Summary 生成用户令牌 @Tags UserAuthToken @Accept application/json @Produce application/json @Param validityPeriod query string true "有效期" @Success 200 {object} models.UserAuthToken @Router /admin/api/user-auth-token/generate [get] @Security Bearer

func (*UserAuthToken) GetAction added in v0.4.5

func (e *UserAuthToken) GetAction(_ string) response.Action

func (*UserAuthToken) List added in v0.4.5

func (e *UserAuthToken) List(ctx *gin.Context)

List 列表 @Summary 列表 @Tags UserAuthToken @Accept application/json @Produce application/json @Success 200 {object} response.Page{data=[]models.UserAuthToken} @Router /admin/api/user-auth-tokens [get] @Security Bearer

func (*UserAuthToken) Other added in v0.4.5

func (e *UserAuthToken) Other(r *gin.RouterGroup)

func (*UserAuthToken) Refresh added in v0.4.5

func (e *UserAuthToken) Refresh(ctx *gin.Context)

Refresh 刷新用户令牌 @Summary 刷新用户令牌 @Tags UserAuthToken @Accept application/json @Produce application/json @Param id path string true "id" @Success 200 {object} models.UserAuthToken @Router /admin/api/user-auth-token/{id}/refresh [put] @Security Bearer

func (*UserAuthToken) Revoked added in v0.4.5

func (e *UserAuthToken) Revoked(ctx *gin.Context)

Revoked 撤销用户令牌 @Summary 撤销用户令牌 @Tags UserAuthToken @Accept application/json @Produce application/json @Param id path string true "id" @Success 200 @Router /admin/api/user-auth-token/{id}/revoke [put] @Security Bearer

type UserConfig

type UserConfig struct {
	*controller.Simple
	// contains filtered or unexported fields
}

func (*UserConfig) Control

func (e *UserConfig) Control(ctx *gin.Context)

Control 用户配置控制 @Summary 用户配置控制 @Description 用户配置控制 @Tags user-config @Accept application/json @Product application/json @Param group path string true "group" @Param data body dto.UserConfigControlRequest true "data" @Success 200 @Router /admin/api/user-configs/{group} [put] @Security Bearer

func (*UserConfig) GetAction

func (e *UserConfig) GetAction(string) response.Action

func (*UserConfig) Group

func (e *UserConfig) Group(ctx *gin.Context)

Group 用户配置分组 @Summary 用户配置分组 @Description 用户配置分组 @Tags user-config @Accept application/json @Product application/json @Param group path string true "group" @Success 200 {object} map[string]string @Router /admin/api/user-configs/{group} [get] @Security Bearer

func (*UserConfig) Other

func (e *UserConfig) Other(r *gin.RouterGroup)

func (*UserConfig) Profile

func (e *UserConfig) Profile(ctx *gin.Context)

Profile 用户配置 @Summary 用户配置 @Description 用户配置 @Tags user-config @Accept application/json @Product application/json @Success 200 {object} map[string]map[string]string @Router /admin/api/user-configs/profile [get] @Security Bearer

type Virtual

type Virtual struct {
	*vapi.Virtual
}

func (*Virtual) Documentation

func (e *Virtual) Documentation(ctx *gin.Context)

Documentation 文档 @Summary 文档 @Description 文档 @Tags virtual @Accept application/json @Produce application/json @Param key path string true "key" @Success 200 {object} dto.VirtualModelObject @Router /admin/api/documentation/{key} [get]

func (*Virtual) Other

func (e *Virtual) Other(r *gin.RouterGroup)

type WS added in v0.3.6

type WS struct {
	*controller.Simple
}

func (*WS) Event added in v0.3.6

func (e *WS) Event(ctx *gin.Context)

Event 长连接事件

func (*WS) GetAction added in v0.3.6

func (e *WS) GetAction(_ string) response.Action

func (*WS) Other added in v0.3.6

func (e *WS) Other(r *gin.RouterGroup)

Jump to

Keyboard shortcuts

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