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 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 SocialUserOpenController
- type TenantOpenController
- 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)
Constants ¶
This section is empty.
Variables ¶
var AdminResources *controller.Controllers = &controller.Controllers{ Controllers: []controller.Controller{ adminUserOpenController, adminOrganizationOpenController, adminTenantOpenController, adminRoleOpenController, }, }
var Resources *controller.Controllers = &controller.Controllers{ Controllers: []controller.Controller{ UserResources, AdminResources, }, }
var UserResources *controller.Controllers = &controller.Controllers{ Controllers: []controller.Controller{ organizationOpenController, organizationUserOpenController, userOpenController, socialUserOpenController, }, }
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 ¶
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 ¶
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 ¶
func (m *AdminRoleOpenController) AfterInitialize()
func (*AdminRoleOpenController) CopyRole ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 AdminUserOpenController ¶
type AdminUserOpenController struct { controller.ResourceController UserService *service.UserService `inject:"userService"` TenantService *service.TenantService `inject:"tenantService"` SocialUserService *service.SocialUserService `inject:"socialUserService"` 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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
type ChangePasswordForm ¶
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 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 UserOpenController ¶
type UserOpenController struct { controller.ResourceController UserService *service.UserService `inject:"userService"` SocialUserService *service.SocialUserService `inject:"socialUserService"` 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 ¶
func (u *UserOpenController) ChangeUserEmail(c *gin.Context)
func (*UserOpenController) ChangeUserMobile ¶
func (u *UserOpenController) ChangeUserMobile(c *gin.Context)
func (*UserOpenController) ChangeUserPassword ¶
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 ¶
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]