Documentation ¶
Index ¶
- Variables
- type AdminOrganizationOpenController
- func (m *AdminOrganizationOpenController) AfterInitialize()
- func (a *AdminOrganizationOpenController) CreateOrganization(c *gin.Context)
- func (a *AdminOrganizationOpenController) DeleteOrganization(c *gin.Context)
- func (a *AdminOrganizationOpenController) GetList(context *gin.Context)
- func (a *AdminOrganizationOpenController) GetOrganization(context *gin.Context)
- func (a *AdminOrganizationOpenController) GetSubList(context *gin.Context)
- func (a *AdminOrganizationOpenController) UpdateOrganization(c *gin.Context)
- type AdminTenantOpenController
- type AdminTenantOptionOpenController
- func (c *AdminTenantOptionOpenController) AddTenantOptions(ctx *gin.Context)
- func (c *AdminTenantOptionOpenController) AfterInitialize()
- func (c *AdminTenantOptionOpenController) GetTenantOptions(ctx *gin.Context)
- func (c *AdminTenantOptionOpenController) RemoveTenantOption(ctx *gin.Context)
- func (c *AdminTenantOptionOpenController) RemoveTenantOptions(ctx *gin.Context)
- func (c *AdminTenantOptionOpenController) SetTenantOptions(ctx *gin.Context)
- type AdminUserOpenController
- func (m *AdminUserOpenController) AfterInitialize()
- func (u *AdminUserOpenController) CreateUser(c *gin.Context)
- func (u *AdminUserOpenController) DeleteUser(c *gin.Context)
- func (u *AdminUserOpenController) GetCurrentUser(c *gin.Context)
- func (u *AdminUserOpenController) GetUser(c *gin.Context)
- func (u *AdminUserOpenController) GetUsers(c *gin.Context)
- func (u *AdminUserOpenController) UpdateUser(c *gin.Context)
- type OrganizationOpenController
- type OrganizationUserOpenController
- type PublicSystemOptionOpenController
- type RoleOpenController
- func (r *RoleOpenController) AddRole(c *gin.Context)
- func (m *RoleOpenController) AfterInitialize()
- func (r *RoleOpenController) DeleteRole(c *gin.Context)
- func (r *RoleOpenController) EditRole(c *gin.Context)
- func (r *RoleOpenController) GetRole(c *gin.Context)
- func (r *RoleOpenController) GetRoles(c *gin.Context)
- type SocialUserOpenController
- type TenantOpenController
- type TenantOptionOpenController
- type UserOpenController
- func (m *UserOpenController) AfterInitialize()
- func (u *UserOpenController) DeleteUser(c *gin.Context)
- func (u *UserOpenController) GetCurrentUser(c *gin.Context)
- func (u *UserOpenController) GetUser(c *gin.Context)
- func (u *UserOpenController) GetUserInviteCode(c *gin.Context)
- func (u *UserOpenController) UpdateUser(c *gin.Context)
- type UserOptionOpenController
- func (c *UserOptionOpenController) AddUserOptions(ctx *gin.Context)
- func (c *UserOptionOpenController) AfterInitialize()
- func (c *UserOptionOpenController) GetUserOptions(ctx *gin.Context)
- func (c *UserOptionOpenController) RemoveUserOption(ctx *gin.Context)
- func (c *UserOptionOpenController) RemoveUserOptions(ctx *gin.Context)
- func (c *UserOptionOpenController) SetUserOptions(ctx *gin.Context)
Constants ¶
This section is empty.
Variables ¶
var AdminResources *controller.Controllers = &controller.Controllers{ Base: "/openapi/admin", Handlers: []gin.HandlerFunc{ security.HandleTokenVerify(), permission.NeedAdmin(), permission.CheckUserPermissions(), }, Controllers: []controller.Controller{ adminUserOpenController, adminOrganizationOpenController, adminTenantOpenController, adminTenantOptionOpenController, }, }
var PublicResources *controller.Controllers = &controller.Controllers{ Base: "/openapi/public", Handlers: []gin.HandlerFunc{ security.CheckTokenVerify(), }, Controllers: []controller.Controller{ publicSystemOptionOpenController, }, }
var Resources *controller.Controllers = &controller.Controllers{ Controllers: []controller.Controller{ UserResources, AdminResources, PublicResources, }, }
var UserResources *controller.Controllers = &controller.Controllers{ Base: "/openapi/user", Handlers: []gin.HandlerFunc{ security.HandleTokenVerify(), permission.CheckUserPermissions(), }, Controllers: []controller.Controller{ userOpenController, roleOpenController, organizationOpenController, organizationUserOpenController, userOptionOpenController, socialUserOpenController, tenantOptionOpenController, auth.Resources, }, }
Functions ¶
This section is empty.
Types ¶
type AdminOrganizationOpenController ¶
type AdminOrganizationOpenController struct { controller.ResourceController OrganizationService *service.OrganizationService `inject:"organizationService"` }
func (*AdminOrganizationOpenController) AfterInitialize ¶
func (m *AdminOrganizationOpenController) AfterInitialize()
组织
func (*AdminOrganizationOpenController) CreateOrganization ¶
func (a *AdminOrganizationOpenController) CreateOrganization(c *gin.Context)
新增
func (*AdminOrganizationOpenController) DeleteOrganization ¶
func (a *AdminOrganizationOpenController) DeleteOrganization(c *gin.Context)
删除
func (*AdminOrganizationOpenController) GetList ¶
func (a *AdminOrganizationOpenController) GetList(context *gin.Context)
1.省份城市列表
func (*AdminOrganizationOpenController) GetOrganization ¶
func (a *AdminOrganizationOpenController) GetOrganization(context *gin.Context)
1.根据id查询节点
func (*AdminOrganizationOpenController) GetSubList ¶
func (a *AdminOrganizationOpenController) GetSubList(context *gin.Context)
1.根据fid查询子节点列表
func (*AdminOrganizationOpenController) UpdateOrganization ¶
func (a *AdminOrganizationOpenController) UpdateOrganization(c *gin.Context)
修改
type AdminTenantOpenController ¶
type AdminTenantOpenController struct { controller.ResourceController TenantService *service.TenantService `inject:"tenantService"` }
func (*AdminTenantOpenController) AfterInitialize ¶
func (m *AdminTenantOpenController) AfterInitialize()
组织
func (*AdminTenantOpenController) GetTenant ¶
func (a *AdminTenantOpenController) GetTenant(context *gin.Context)
1.根据id查询节点
func (*AdminTenantOpenController) PatchTenant ¶
func (a *AdminTenantOpenController) PatchTenant(c *gin.Context)
修改
func (*AdminTenantOpenController) UpdateTenant ¶
func (a *AdminTenantOpenController) UpdateTenant(c *gin.Context)
修改
type AdminTenantOptionOpenController ¶
type AdminTenantOptionOpenController struct { controller.ResourceController TenantOptionService *service.SysOptionService `inject:"sysOptionService"` }
func (*AdminTenantOptionOpenController) AddTenantOptions ¶
func (c *AdminTenantOptionOpenController) AddTenantOptions(ctx *gin.Context)
func (*AdminTenantOptionOpenController) AfterInitialize ¶
func (c *AdminTenantOptionOpenController) AfterInitialize()
func (*AdminTenantOptionOpenController) GetTenantOptions ¶
func (c *AdminTenantOptionOpenController) GetTenantOptions(ctx *gin.Context)
func (*AdminTenantOptionOpenController) RemoveTenantOption ¶
func (c *AdminTenantOptionOpenController) RemoveTenantOption(ctx *gin.Context)
func (*AdminTenantOptionOpenController) RemoveTenantOptions ¶
func (c *AdminTenantOptionOpenController) RemoveTenantOptions(ctx *gin.Context)
func (*AdminTenantOptionOpenController) SetTenantOptions ¶
func (c *AdminTenantOptionOpenController) SetTenantOptions(ctx *gin.Context)
type AdminUserOpenController ¶
type AdminUserOpenController struct { controller.ResourceController UserService *service.UserService `inject:"userService"` TenantService *service.TenantService `inject:"tenantService"` SocialUserService *service.SocialUserService `inject:"socialUserService"` AuthorityService *auth.AuthorityService `inject:"authorityService"` InviteCodeService *service.InviteCodeService `inject:"inviteCodeService"` UserMapper *mapper.UserMapper `inject:"userMapper"` SocialUserMapper *mapper.SocialUserMapper `inject:"socialUserMapper"` }
func (*AdminUserOpenController) AfterInitialize ¶
func (m *AdminUserOpenController) AfterInitialize()
用户
func (*AdminUserOpenController) CreateUser ¶
func (u *AdminUserOpenController) CreateUser(c *gin.Context)
@Summary 增加用户 @Tags users @Accept json @Produce json @Param body body models.User true "body" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/users [POST]
func (*AdminUserOpenController) DeleteUser ¶
func (u *AdminUserOpenController) DeleteUser(c *gin.Context)
@Summary 删除用户 @Tags users @Accept json @Produce json @Param id path int true "id" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Router /api/v1/users/:id [DELETE]
func (*AdminUserOpenController) GetCurrentUser ¶
func (u *AdminUserOpenController) GetCurrentUser(c *gin.Context)
@Summary 获取登录用户信息 @Tags users @Accept json @Produce json @Success 200 {string} json "{ "code": 200, "data": {"lists":""}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/userInfo [GET]
func (*AdminUserOpenController) GetUser ¶
func (u *AdminUserOpenController) GetUser(c *gin.Context)
@Summary 获取所有用户 @Tags users @Accept json @Produce json @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/users [GET]
func (*AdminUserOpenController) GetUsers ¶
func (u *AdminUserOpenController) GetUsers(c *gin.Context)
@Summary 获取所有用户 @Tags users @Accept json @Produce json @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/users [GET]
func (*AdminUserOpenController) UpdateUser ¶
func (u *AdminUserOpenController) UpdateUser(c *gin.Context)
@Summary 更新用户 @Tags users @Accept json @Produce json @Param body body models.User true "body" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/users/:id [PUT]
type OrganizationOpenController ¶
type OrganizationOpenController struct { controller.ResourceController OrganizationService *service.OrganizationService `inject:"organizationService"` }
func (*OrganizationOpenController) AfterInitialize ¶
func (m *OrganizationOpenController) AfterInitialize()
组织
func (*OrganizationOpenController) GetList ¶
func (a *OrganizationOpenController) GetList(context *gin.Context)
1.省份城市列表
func (*OrganizationOpenController) GetOrganization ¶
func (a *OrganizationOpenController) GetOrganization(context *gin.Context)
1.根据id查询节点
func (*OrganizationOpenController) GetSubList ¶
func (a *OrganizationOpenController) GetSubList(context *gin.Context)
1.根据fid查询子节点列表
type OrganizationUserOpenController ¶
type OrganizationUserOpenController struct { controller.ResourceController OrganizationUserService *service.OrganizationUserService `inject:"organizationUserService"` }
func (*OrganizationUserOpenController) AfterInitialize ¶
func (m *OrganizationUserOpenController) AfterInitialize()
成员
func (*OrganizationUserOpenController) GetOrganizationMemebers ¶
func (o *OrganizationUserOpenController) GetOrganizationMemebers(c *gin.Context)
type PublicSystemOptionOpenController ¶
type PublicSystemOptionOpenController struct { controller.ResourceController SystemOptionService *service.SysOptionService `inject:"sysOptionService"` }
func (*PublicSystemOptionOpenController) AfterInitialize ¶
func (c *PublicSystemOptionOpenController) AfterInitialize()
func (*PublicSystemOptionOpenController) GetSystemOptions ¶
func (c *PublicSystemOptionOpenController) GetSystemOptions(ctx *gin.Context)
GET /system/options
type RoleOpenController ¶
type RoleOpenController struct { controller.ResourceController RoleService *service.RoleService `inject:"roleOpenController"` }
func (*RoleOpenController) AddRole ¶
func (r *RoleOpenController) AddRole(c *gin.Context)
@Summary 增加角色 @Tags role @Accept json @Produce json @Param body body models.Role true "body" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Router /api/v1/role [POST]
func (*RoleOpenController) AfterInitialize ¶
func (m *RoleOpenController) AfterInitialize()
func (*RoleOpenController) DeleteRole ¶
func (r *RoleOpenController) DeleteRole(c *gin.Context)
@Summary 删除角色 @Tags role @Accept json @Produce json @Param id path string true "id" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Router /api/v1/roles/:id [DELETE]
func (*RoleOpenController) EditRole ¶
func (r *RoleOpenController) EditRole(c *gin.Context)
@Summary 更新角色 @Tags role @Accept json @Produce json @Param id path string true "id" @Param body body models.Role true "body" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Router /api/v1/role/:id [PUT]
func (*RoleOpenController) GetRole ¶
func (r *RoleOpenController) GetRole(c *gin.Context)
@Summary 获取角色 @Tags role @Accept @Produce json @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Router /api/v1/role/:id [GET]
func (*RoleOpenController) GetRoles ¶
func (r *RoleOpenController) GetRoles(c *gin.Context)
@Summary 获取所有角色 @Tags role @Accept json @Produce json @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Router /api/v1/roles [GET]
type SocialUserOpenController ¶
type SocialUserOpenController struct { controller.ResourceController SocialUserService *service.SocialUserService `inject:"socialUserService"` }
type TenantOpenController ¶
type TenantOpenController struct { controller.ResourceController TenantService *service.TenantService `inject:"tenantService"` }
func (*TenantOpenController) GetTenant ¶
func (a *TenantOpenController) GetTenant(context *gin.Context)
1.根据id查询节点
type TenantOptionOpenController ¶
type TenantOptionOpenController struct { controller.ResourceController TenantOptionService *service.SysOptionService `inject:"sysOptionService"` }
func (*TenantOptionOpenController) AfterInitialize ¶
func (c *TenantOptionOpenController) AfterInitialize()
func (*TenantOptionOpenController) GetTenantOptions ¶
func (c *TenantOptionOpenController) GetTenantOptions(ctx *gin.Context)
type UserOpenController ¶
type UserOpenController struct { controller.ResourceController UserService *service.UserService `inject:"userService"` SocialUserService *service.SocialUserService `inject:"socialUserService"` AuthorityService *auth.AuthorityService `inject:"authorityService"` InviteCodeService *service.InviteCodeService `inject:"inviteCodeService"` UserMapper *mapper.UserMapper `inject:"userMapper"` SocialUserMapper *mapper.SocialUserMapper `inject:"socialUserMapper"` }
func (*UserOpenController) DeleteUser ¶
func (u *UserOpenController) DeleteUser(c *gin.Context)
@Summary 删除用户 @Tags users @Accept json @Produce json @Param id path int true "id" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Router /openapi/user [DELETE]
func (*UserOpenController) GetCurrentUser ¶
func (u *UserOpenController) GetCurrentUser(c *gin.Context)
@Summary 获取登录用户信息 @Tags users @Accept json @Produce json @Success 200 {string} json "{ "code": 200, "data": {"lists":""}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/userInfo [GET]
func (*UserOpenController) GetUser ¶
func (u *UserOpenController) GetUser(c *gin.Context)
@Summary 获取所有用户 @Tags users @Accept json @Produce json @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/users [GET]
func (*UserOpenController) GetUserInviteCode ¶
func (u *UserOpenController) GetUserInviteCode(c *gin.Context)
*
- GET /openapi/user/invite-code
func (*UserOpenController) UpdateUser ¶
func (u *UserOpenController) UpdateUser(c *gin.Context)
@Summary 更新用户 @Tags users @Accept json @Produce json @Param body body models.User true "body" @Success 200 {string} json "{ "code": 200, "data": {}, "msg": "ok" }" @Failure 400 {string} json @Router /api/v1/users/:id [PUT]
type UserOptionOpenController ¶
type UserOptionOpenController struct { controller.ResourceController UserOptionService *service.UserOptionService `inject:"userOptionService"` }
func (*UserOptionOpenController) AddUserOptions ¶
func (c *UserOptionOpenController) AddUserOptions(ctx *gin.Context)
func (*UserOptionOpenController) AfterInitialize ¶
func (c *UserOptionOpenController) AfterInitialize()
func (*UserOptionOpenController) GetUserOptions ¶
func (c *UserOptionOpenController) GetUserOptions(ctx *gin.Context)
func (*UserOptionOpenController) RemoveUserOption ¶
func (c *UserOptionOpenController) RemoveUserOption(ctx *gin.Context)
func (*UserOptionOpenController) RemoveUserOptions ¶
func (c *UserOptionOpenController) RemoveUserOptions(ctx *gin.Context)
func (*UserOptionOpenController) SetUserOptions ¶
func (c *UserOptionOpenController) SetUserOptions(ctx *gin.Context)