Documentation ¶
Index ¶
- Variables
- type OrganizationController
- func (m *OrganizationController) AfterInitialize()
- func (a *OrganizationController) CreateOrganization(c *gin.Context)
- func (a *OrganizationController) DeleteOrganization(c *gin.Context)
- func (a *OrganizationController) GetList(context *gin.Context)
- func (a *OrganizationController) GetOrganization(context *gin.Context)
- func (a *OrganizationController) GetSubList(context *gin.Context)
- func (a *OrganizationController) UpdateOrganization(c *gin.Context)
- type OrganizationUserController
- type RoleController
- type SocialUserController
- type UserController
- func (m *UserController) AfterInitialize()
- func (u *UserController) CreateUser(c *gin.Context)
- func (u *UserController) DeleteUser(c *gin.Context)
- func (u *UserController) GetCurrentUser(c *gin.Context)
- func (u *UserController) GetUser(c *gin.Context)
- func (u *UserController) GetUsers(c *gin.Context)
- func (u *UserController) UpdateUser(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
var Resources *controller.Controllers = &controller.Controllers{ Controllers: []controller.Controller{ userController, roleController, organizationController, organizationUserController, socialUserController, }, }
Functions ¶
This section is empty.
Types ¶
type OrganizationController ¶
type OrganizationController struct { controller.ResourceController OrganizationService *service.OrganizationService `inject:"organizationService"` }
func (*OrganizationController) AfterInitialize ¶
func (m *OrganizationController) AfterInitialize()
组织
func (*OrganizationController) CreateOrganization ¶
func (a *OrganizationController) CreateOrganization(c *gin.Context)
新增
func (*OrganizationController) DeleteOrganization ¶
func (a *OrganizationController) DeleteOrganization(c *gin.Context)
删除
func (*OrganizationController) GetList ¶
func (a *OrganizationController) GetList(context *gin.Context)
1.省份城市列表
func (*OrganizationController) GetOrganization ¶
func (a *OrganizationController) GetOrganization(context *gin.Context)
1.根据id查询节点
func (*OrganizationController) GetSubList ¶
func (a *OrganizationController) GetSubList(context *gin.Context)
1.根据fid查询子节点列表
func (*OrganizationController) UpdateOrganization ¶
func (a *OrganizationController) UpdateOrganization(c *gin.Context)
修改
type OrganizationUserController ¶
type OrganizationUserController struct { controller.ResourceController OrganizationUserService *service.OrganizationUserService `inject:"organizationUserService"` }
func (*OrganizationUserController) AfterInitialize ¶
func (m *OrganizationUserController) AfterInitialize()
成员
func (*OrganizationUserController) GetOrganizationMemebers ¶
func (o *OrganizationUserController) GetOrganizationMemebers(c *gin.Context)
type RoleController ¶
type RoleController struct { controller.ResourceController RoleService *service.RoleService `inject:"roleService"` }
func (*RoleController) AddRole ¶
func (r *RoleController) 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 (*RoleController) AfterInitialize ¶
func (m *RoleController) AfterInitialize()
func (*RoleController) DeleteRole ¶
func (r *RoleController) 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 (*RoleController) EditRole ¶
func (r *RoleController) 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 (*RoleController) FindRoles ¶
func (r *RoleController) FindRoles(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 (*RoleController) GetRole ¶
func (r *RoleController) 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]
type SocialUserController ¶
type SocialUserController struct { controller.ResourceController SocialUserService *service.SocialUserService `inject:"socialUserService"` }
type UserController ¶
type UserController struct { controller.ResourceController UserService *service.UserService `inject:"userService"` SocialUserService *service.SocialUserService `inject:"socialUserService"` AuthorityService *auth.AuthorityService `inject:"authorityService"` UserMapper *mapper.UserMapper `inject:"userMapper"` SocialUserMapper *mapper.SocialUserMapper `inject:"socialUserMapper"` }
func (*UserController) CreateUser ¶
func (u *UserController) 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 (*UserController) DeleteUser ¶
func (u *UserController) 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 (*UserController) GetCurrentUser ¶
func (u *UserController) 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 (*UserController) GetUser ¶
func (u *UserController) 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 (*UserController) GetUsers ¶
func (u *UserController) 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 (*UserController) UpdateUser ¶
func (u *UserController) 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]