Documentation ¶
Index ¶
- Variables
- type OrganizationMController
- func (m *OrganizationMController) AfterInitialize()
- func (a *OrganizationMController) CreateOrganization(c *gin.Context)
- func (a *OrganizationMController) DeleteOrganization(c *gin.Context)
- func (a *OrganizationMController) GetList(context *gin.Context)
- func (a *OrganizationMController) GetOrganization(context *gin.Context)
- func (a *OrganizationMController) GetSubList(context *gin.Context)
- func (a *OrganizationMController) UpdateOrganization(c *gin.Context)
- type OrganizationUserMController
- type RoleMController
- func (r *RoleMController) AddRoleUsers(c *gin.Context)
- func (m *RoleMController) AfterInitialize()
- func (r *RoleMController) CopyRole(c *gin.Context)
- func (r *RoleMController) CreateRole(c *gin.Context)
- func (r *RoleMController) DeleteRole(c *gin.Context)
- func (r *RoleMController) DeleteRoleUsers(c *gin.Context)
- func (r *RoleMController) GetRole(c *gin.Context)
- func (u *RoleMController) GetRoleUsers(c *gin.Context)
- func (r *RoleMController) GetRoles(c *gin.Context)
- func (r *RoleMController) UpdateRole(c *gin.Context)
- type SocialUserMController
- type SystemOptionMController
- func (c *SystemOptionMController) AddSystemOptions(ctx *gin.Context)
- func (c *SystemOptionMController) AfterInitialize()
- func (c *SystemOptionMController) GetSystemOptions(ctx *gin.Context)
- func (c *SystemOptionMController) RemoveSystemOption(ctx *gin.Context)
- func (c *SystemOptionMController) RemoveSystemOptions(ctx *gin.Context)
- func (c *SystemOptionMController) SetSystemOptions(ctx *gin.Context)
- type TenantMController
- func (m *TenantMController) AfterInitialize()
- func (a *TenantMController) CreateTenant(c *gin.Context)
- func (a *TenantMController) DeleteTenant(c *gin.Context)
- func (a *TenantMController) GetTenant(c *gin.Context)
- func (a *TenantMController) GetTenants(c *gin.Context)
- func (a *TenantMController) PatchTenant(c *gin.Context)
- func (a *TenantMController) UpdateTenant(c *gin.Context)
- type TenantOptionMController
- func (s *TenantOptionMController) AddTenantOptions(c *gin.Context)
- func (s *TenantOptionMController) AfterInitialize()
- func (s *TenantOptionMController) GetTenantOptions(c *gin.Context)
- func (s *TenantOptionMController) RemoveTenantOption(c *gin.Context)
- func (s *TenantOptionMController) RemoveTenantOptions(c *gin.Context)
- func (s *TenantOptionMController) SetTenantOptions(c *gin.Context)
- type UserMController
- func (u *UserMController) AddUser(c *gin.Context)
- func (m *UserMController) AfterInitialize()
- func (u *UserMController) CreateUser(c *gin.Context)
- func (u *UserMController) DeleteUser(c *gin.Context)
- func (u *UserMController) GetCurrentUser(c *gin.Context)
- func (u *UserMController) GetUser(c *gin.Context)
- func (u *UserMController) GetUsers(c *gin.Context)
- func (u *UserMController) PatchUser(c *gin.Context)
- func (u *UserMController) ResetUserPassword(c *gin.Context)
- func (u *UserMController) UpdateUser(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
var Resources = &controller.Controllers{ Base: "/mapi", Handlers: []gin.HandlerFunc{ security.HandleTokenVerify(), permission.NeedSystemUser(), permission.CheckUserPermissions(), }, Controllers: []controller.Controller{ tenantMController, userMController, roleMController, socialUserMController, organizationMController, organizationUserMController, systemOptionMController, tenantOptionMController, auth.Resources, }, }
Functions ¶
This section is empty.
Types ¶
type OrganizationMController ¶
type OrganizationMController struct { controller.ResourceController OrganizationService *service.OrganizationService `inject:"organizationService"` }
func (*OrganizationMController) AfterInitialize ¶
func (m *OrganizationMController) AfterInitialize()
组织
func (*OrganizationMController) CreateOrganization ¶
func (a *OrganizationMController) CreateOrganization(c *gin.Context)
新增
func (*OrganizationMController) DeleteOrganization ¶
func (a *OrganizationMController) DeleteOrganization(c *gin.Context)
删除
func (*OrganizationMController) GetList ¶
func (a *OrganizationMController) GetList(context *gin.Context)
1.省份城市列表
func (*OrganizationMController) GetOrganization ¶
func (a *OrganizationMController) GetOrganization(context *gin.Context)
1.根据id查询节点
func (*OrganizationMController) GetSubList ¶
func (a *OrganizationMController) GetSubList(context *gin.Context)
1.根据fid查询子节点列表
func (*OrganizationMController) UpdateOrganization ¶
func (a *OrganizationMController) UpdateOrganization(c *gin.Context)
修改
type OrganizationUserMController ¶
type OrganizationUserMController struct { controller.ResourceController OrganizationUserService *service.OrganizationUserService `inject:"organizationUserService"` }
func (*OrganizationUserMController) AfterInitialize ¶
func (m *OrganizationUserMController) AfterInitialize()
成员
func (*OrganizationUserMController) GetOrganizationMemebers ¶
func (o *OrganizationUserMController) GetOrganizationMemebers(c *gin.Context)
type RoleMController ¶
type RoleMController struct { controller.ResourceController RoleService *service.RoleService `inject:"roleService"` RoleUserService *service.RoleUserService `inject:"roleUserService"` TenantService *service.TenantService `inject:"tenantService"` }
func (*RoleMController) AddRoleUsers ¶ added in v0.0.15
func (r *RoleMController) 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 (*RoleMController) AfterInitialize ¶
func (m *RoleMController) AfterInitialize()
func (*RoleMController) CopyRole ¶ added in v0.0.15
func (r *RoleMController) 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 (*RoleMController) CreateRole ¶ added in v0.0.15
func (r *RoleMController) 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 (*RoleMController) DeleteRole ¶
func (r *RoleMController) 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 (*RoleMController) DeleteRoleUsers ¶ added in v0.0.15
func (r *RoleMController) 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 (*RoleMController) GetRole ¶
func (r *RoleMController) 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 (*RoleMController) GetRoleUsers ¶ added in v0.0.15
func (u *RoleMController) 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 (*RoleMController) GetRoles ¶
func (r *RoleMController) 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 (*RoleMController) UpdateRole ¶ added in v0.0.15
func (r *RoleMController) 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 SocialUserMController ¶
type SocialUserMController struct { controller.ResourceController SocialUserService *service.SocialUserService `inject:"socialUserService"` }
type SystemOptionMController ¶
type SystemOptionMController struct { controller.ResourceController SystemOptionService *service.SysOptionService `inject:"sysOptionService"` }
func (*SystemOptionMController) AddSystemOptions ¶
func (c *SystemOptionMController) AddSystemOptions(ctx *gin.Context)
func (*SystemOptionMController) AfterInitialize ¶
func (c *SystemOptionMController) AfterInitialize()
func (*SystemOptionMController) GetSystemOptions ¶
func (c *SystemOptionMController) GetSystemOptions(ctx *gin.Context)
func (*SystemOptionMController) RemoveSystemOption ¶
func (c *SystemOptionMController) RemoveSystemOption(ctx *gin.Context)
func (*SystemOptionMController) RemoveSystemOptions ¶
func (c *SystemOptionMController) RemoveSystemOptions(ctx *gin.Context)
func (*SystemOptionMController) SetSystemOptions ¶
func (c *SystemOptionMController) SetSystemOptions(ctx *gin.Context)
type TenantMController ¶
type TenantMController struct { controller.ResourceController TenantService *service.TenantService `inject:"tenantService"` }
func (*TenantMController) CreateTenant ¶
func (a *TenantMController) CreateTenant(c *gin.Context)
创建
func (*TenantMController) DeleteTenant ¶
func (a *TenantMController) DeleteTenant(c *gin.Context)
删除
func (*TenantMController) GetTenant ¶
func (a *TenantMController) GetTenant(c *gin.Context)
1.根据id查询节点
func (*TenantMController) GetTenants ¶
func (a *TenantMController) GetTenants(c *gin.Context)
1.根据参数查询租户
func (*TenantMController) UpdateTenant ¶
func (a *TenantMController) UpdateTenant(c *gin.Context)
修改
type TenantOptionMController ¶
type TenantOptionMController struct { controller.ResourceController TenantOptionService *service.SysOptionService `inject:"sysOptionService"` }
func (*TenantOptionMController) AddTenantOptions ¶
func (s *TenantOptionMController) AddTenantOptions(c *gin.Context)
func (*TenantOptionMController) AfterInitialize ¶
func (s *TenantOptionMController) AfterInitialize()
func (*TenantOptionMController) GetTenantOptions ¶
func (s *TenantOptionMController) GetTenantOptions(c *gin.Context)
func (*TenantOptionMController) RemoveTenantOption ¶
func (s *TenantOptionMController) RemoveTenantOption(c *gin.Context)
func (*TenantOptionMController) RemoveTenantOptions ¶
func (s *TenantOptionMController) RemoveTenantOptions(c *gin.Context)
func (*TenantOptionMController) SetTenantOptions ¶
func (s *TenantOptionMController) SetTenantOptions(c *gin.Context)
type UserMController ¶
type UserMController struct { controller.ResourceController UserService *service.UserService `inject:"userService"` TenantService *service.TenantService `inject:"tenantService"` AuthorityService *auth.AuthorityService `inject:"authorityService"` UserMapper *mapper.UserMapper `inject:"userMapper"` }
func (*UserMController) AddUser ¶
func (u *UserMController) AddUser(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 (*UserMController) CreateUser ¶
func (u *UserMController) CreateUser(c *gin.Context)
@Summary 创建新用户 @Router /mapi/user [POST]
func (*UserMController) DeleteUser ¶
func (u *UserMController) 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 (*UserMController) GetCurrentUser ¶
func (u *UserMController) 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 (*UserMController) GetUser ¶
func (u *UserMController) 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 (*UserMController) GetUsers ¶
func (u *UserMController) 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 (*UserMController) PatchUser ¶
func (u *UserMController) 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 (*UserMController) ResetUserPassword ¶ added in v0.0.9
func (u *UserMController) ResetUserPassword(c *gin.Context)
func (*UserMController) UpdateUser ¶
func (u *UserMController) 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]