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 AdminRoleOpenController
- func (r *AdminRoleOpenController) AddRoleUsers(c *gin.Context)
- func (m *AdminRoleOpenController) AfterInitialize()
- func (r *AdminRoleOpenController) CopyRole(c *gin.Context)
- func (r *AdminRoleOpenController) CreateRole(c *gin.Context)
- func (r *AdminRoleOpenController) DeleteRole(c *gin.Context)
- func (r *AdminRoleOpenController) DeleteRoleUsers(c *gin.Context)
- func (r *AdminRoleOpenController) GetRole(c *gin.Context)
- func (u *AdminRoleOpenController) GetRoleUsers(c *gin.Context)
- func (r *AdminRoleOpenController) GetRoles(c *gin.Context)
- func (r *AdminRoleOpenController) UpdateRole(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) CreateUsers(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) ImportUsers(c *gin.Context)
- func (u *AdminUserOpenController) PatchUser(c *gin.Context)
- func (u *AdminUserOpenController) ResetUserPassword(c *gin.Context)
- func (u *AdminUserOpenController) UpdateUser(c *gin.Context)
- type ChangeForm
- type ChangePasswordForm
- type OrganizationOpenController
- type OrganizationUserOpenController
- type PublicSystemOptionOpenController
- type SocialUserOpenController
- type TenantOpenController
- type TenantOptionOpenController
- type UserOpenController
- func (m *UserOpenController) AfterInitialize()
- func (u *UserOpenController) ChangeUserEmail(c *gin.Context)
- func (u *UserOpenController) ChangeUserMobile(c *gin.Context)
- func (u *UserOpenController) ChangeUserPassword(c *gin.Context)
- 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) PatchUser(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{ adminRoleOpenController, adminUserOpenController, adminOrganizationOpenController, adminTenantOpenController, adminTenantOptionOpenController, auth.AdminResources, }, }
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, adminRoleOpenController, organizationOpenController, organizationUserOpenController, userOptionOpenController, socialUserOpenController, tenantOptionOpenController, auth.UserResources, }, }
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 AdminRoleOpenController ¶ added in v0.0.15
type AdminRoleOpenController struct { controller.ResourceController RoleService *service.RoleService `inject:"roleService"` RoleUserService *service.RoleUserService `inject:"roleUserService"` UserService *service.UserService `inject:"userService"` TenantService *service.TenantService `inject:"tenantService"` }
func (*AdminRoleOpenController) AddRoleUsers ¶ added in v0.0.15
func (r *AdminRoleOpenController) AddRoleUsers(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 (*AdminRoleOpenController) AfterInitialize ¶ added in v0.0.15
func (m *AdminRoleOpenController) AfterInitialize()
func (*AdminRoleOpenController) CopyRole ¶ added in v0.0.15
func (r *AdminRoleOpenController) CopyRole(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 (*AdminRoleOpenController) CreateRole ¶ added in v0.0.15
func (r *AdminRoleOpenController) CreateRole(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 (*AdminRoleOpenController) DeleteRole ¶ added in v0.0.15
func (r *AdminRoleOpenController) 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 (*AdminRoleOpenController) DeleteRoleUsers ¶ added in v0.0.15
func (r *AdminRoleOpenController) DeleteRoleUsers(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 (*AdminRoleOpenController) GetRole ¶ added in v0.0.15
func (r *AdminRoleOpenController) 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 (*AdminRoleOpenController) GetRoleUsers ¶ added in v0.0.15
func (u *AdminRoleOpenController) GetRoleUsers(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 (*AdminRoleOpenController) GetRoles ¶ added in v0.0.15
func (r *AdminRoleOpenController) 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]
func (*AdminRoleOpenController) UpdateRole ¶ added in v0.0.15
func (r *AdminRoleOpenController) UpdateRole(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]
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) CreateUsers ¶ added in v0.0.20
func (u *AdminUserOpenController) CreateUsers(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) ImportUsers ¶ added in v0.0.20
func (u *AdminUserOpenController) ImportUsers(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) PatchUser ¶ added in v0.0.17
func (u *AdminUserOpenController) PatchUser(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]
func (*AdminUserOpenController) ResetUserPassword ¶ added in v0.0.9
func (u *AdminUserOpenController) ResetUserPassword(c *gin.Context)
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 ChangeForm ¶ added in v0.0.16
type ChangePasswordForm ¶ added in v0.0.9
type ChangePasswordForm struct { Password string `json:"password"` OldPassword string `json:"oldPassword"` }
*
- GET /openapi/user/invite-code
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 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"` SmsCodeValidator *SmsCode.SmsCodeValidator `inject:"smsCodeValidator"` EmailCodeValidator *EmailCode.EmailCodeValidator `inject:"emailCodeValidator"` }
func (*UserOpenController) ChangeUserEmail ¶ added in v0.0.16
func (u *UserOpenController) ChangeUserEmail(c *gin.Context)
func (*UserOpenController) ChangeUserMobile ¶ added in v0.0.16
func (u *UserOpenController) ChangeUserMobile(c *gin.Context)
func (*UserOpenController) ChangeUserPassword ¶ added in v0.0.9
func (u *UserOpenController) ChangeUserPassword(c *gin.Context)
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) PatchUser ¶ added in v0.0.17
func (u *UserOpenController) PatchUser(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]
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)