Documentation
¶
Index ¶
- Variables
- func InitRouter(engine *gin.Engine)
- 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
- 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 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) UpdateUser(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
var Resources = &controller.Controllers{ Base: "/mapi", Handlers: []gin.HandlerFunc{ security.HandleTokenVerify(), security.CheckUserPermissions(), security.NeedSystemUser(), }, Controllers: []controller.Controller{ userMController, roleMController, socialUserMController, organizationMController, organizationUserMController, systemOptionMController, tenantOptionMController, auth.Resources, }, }
Functions ¶
func InitRouter ¶
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:"roleMController"`
}
func (*RoleMController) AddRole ¶
func (r *RoleMController) 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 (*RoleMController) AfterInitialize ¶
func (m *RoleMController) AfterInitialize()
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) EditRole ¶
func (r *RoleMController) 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 (*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) 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]
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 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"`
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) 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]