Documentation ¶
Index ¶
- func CreateModule(req *CreateModuleRequest) (string, error)
- func CreateModuleConvenient(req *CreateModuleConvenientRequest) (string, error)
- func CreateModulePermissions(req *CreateModulePermissionsRequest) ([]string, error)
- func CreateModuleRole(req *CreateModuleRoleRequest) (string, error)
- func CreateModuleRoleConvenient(req *CreateModuleRoleConvenientRequest) (string, error)
- func DeleteModuleDB(req *DeleteModuleDBQuery) error
- func DeleteModulePermissions(req *DeleteModulePermissionsQuery) error
- func DeleteModuleRoleDB(req *DeleteModuleRoleDBQuery) error
- func Destroy()
- func DisableModule(req *DisableModuleRequest) error
- func EnableModule(req *EnableModuleRequest) error
- func Init(baseUrl string, timeoutSec time.Duration)
- func UpdateModule(req *UpdateModuleRequest) error
- func UpdateModuleRole(req *UpdateModuleRoleRequest) error
- type CreateModuleBaseRequest
- type CreateModuleConvenientRequest
- type CreateModuleConvenientResponse
- type CreateModulePermissionBaseRequest
- type CreateModulePermissionsRequest
- type CreateModulePermissionsResponse
- type CreateModuleRequest
- type CreateModuleResponse
- type CreateModuleRoleAndPermissionsBaseRequest
- type CreateModuleRoleBaseRequest
- type CreateModuleRoleConvenientRequest
- type CreateModuleRoleConvenientResponse
- type CreateModuleRoleRequest
- type CreateModuleRoleResponse
- type DeleteModuleDBQuery
- type DeleteModuleDBResponse
- type DeleteModulePermissionsQuery
- type DeleteModulePermissionsResponse
- type DeleteModuleRoleDBQuery
- type DeleteModuleRoleDBResponse
- type DisableModuleRequest
- type DisableModuleResponse
- type EnableModuleRequest
- type EnableModuleResponse
- type GetEnabledModulesQuery
- type GetEnabledModulesResponse
- type GetModulePermissionsQuery
- type GetModulePermissionsResponse
- type GetModulePermissionsWithRoleQuery
- type GetModulePermissionsWithRoleResponse
- type GetModuleRolesQuery
- type GetModuleRolesResponse
- type GetModuleRolesWithModuleQuery
- type GetModuleRolesWithModuleResponse
- type GetModuleRolesWithPermissionsQuery
- type GetModuleRolesWithPermissionsResponse
- type GetModulesQuery
- type GetModulesResponse
- type GetModulesWithEnabledInfoQuery
- type GetModulesWithEnabledInfoResponse
- type GetModulesWithRolesQuery
- type GetModulesWithRolesResponse
- type ModuleInfo
- type ModuleInfoWithEnabledInfo
- type ModuleInfoWithEnabledOrgID
- type ModuleInfoWithRoles
- type ModulePermissionInfo
- type ModulePermissionInfoWithRole
- type ModuleRoleInfo
- type ModuleRoleInfoWithModule
- type ModuleRoleInfoWithPermissions
- type UpdateModuleRequest
- type UpdateModuleResponse
- type UpdateModuleRoleRequest
- type UpdateModuleRoleResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateModule ¶
func CreateModule(req *CreateModuleRequest) (string, error)
func CreateModuleConvenient ¶
func CreateModuleConvenient(req *CreateModuleConvenientRequest) (string, error)
CreateModuleConvenient 便捷创建模块
func CreateModulePermissions ¶
func CreateModulePermissions(req *CreateModulePermissionsRequest) ([]string, error)
CreateModulePermissions 创建模块权限
func CreateModuleRole ¶
func CreateModuleRole(req *CreateModuleRoleRequest) (string, error)
CreateModuleRole 创建模块角色
func CreateModuleRoleConvenient ¶
func CreateModuleRoleConvenient(req *CreateModuleRoleConvenientRequest) (string, error)
CreateModuleRoleConvenient 便捷创建模块角色
func DeleteModuleDB ¶
func DeleteModuleDB(req *DeleteModuleDBQuery) error
func DeleteModulePermissions ¶
func DeleteModulePermissions(req *DeleteModulePermissionsQuery) error
DeleteModulePermissions 删除模块权限
func DeleteModuleRoleDB ¶
func DeleteModuleRoleDB(req *DeleteModuleRoleDBQuery) error
func DisableModule ¶
func DisableModule(req *DisableModuleRequest) error
func UpdateModule ¶
func UpdateModule(req *UpdateModuleRequest) error
func UpdateModuleRole ¶
func UpdateModuleRole(req *UpdateModuleRoleRequest) error
Types ¶
type CreateModuleBaseRequest ¶
type CreateModuleBaseRequest struct {
Name string `json:"name" binding:"required"`
}
type CreateModuleConvenientRequest ¶
type CreateModuleConvenientRequest struct { Namespace string `json:"namespace" binding:"required"` CreateModuleBaseRequest ModuleRolesAndPermissions []CreateModuleRoleAndPermissionsBaseRequest `json:"moduleRolesAndPermissions" binding:"required"` }
type CreateModuleConvenientResponse ¶
type CreateModuleConvenientResponse struct { ID string `json:"id"` // contains filtered or unexported fields }
type CreateModulePermissionsRequest ¶
type CreateModulePermissionsRequest struct { Namespace string `json:"namespace" binding:"required"` ModuleID string `json:"moduleId" binding:"required"` ModuleRoleID string `json:"moduleRoleId" binding:"required"` ModulePermissions []CreateModulePermissionBaseRequest `json:"modulePermissions" binding:"required"` }
type CreateModulePermissionsResponse ¶
type CreateModulePermissionsResponse struct { IDs []string `json:"ids"` // contains filtered or unexported fields }
type CreateModuleRequest ¶
type CreateModuleRequest struct { Namespace string `json:"namespace" binding:"required"` CreateModuleBaseRequest }
type CreateModuleResponse ¶
type CreateModuleResponse struct { ID string `json:"id"` // contains filtered or unexported fields }
type CreateModuleRoleAndPermissionsBaseRequest ¶
type CreateModuleRoleAndPermissionsBaseRequest struct { CreateModuleRoleBaseRequest ModulePermissions []CreateModulePermissionBaseRequest `json:"modulePermissions" binding:"required"` }
type CreateModuleRoleBaseRequest ¶
type CreateModuleRoleBaseRequest struct {
Name string `json:"name" binding:"required"`
}
type CreateModuleRoleConvenientRequest ¶
type CreateModuleRoleConvenientRequest struct { Namespace string `json:"namespace" binding:"required"` ModuleID string `json:"moduleId" binding:"required"` CreateModuleRoleBaseRequest ModulePermissions []CreateModulePermissionBaseRequest `json:"modulePermissions" binding:"required"` }
type CreateModuleRoleConvenientResponse ¶
type CreateModuleRoleConvenientResponse struct { ID string `json:"id"` // contains filtered or unexported fields }
type CreateModuleRoleRequest ¶
type CreateModuleRoleRequest struct { Namespace string `json:"namespace" binding:"required"` ModuleID string `json:"moduleId" binding:"required"` CreateModuleRoleBaseRequest }
type CreateModuleRoleResponse ¶
type CreateModuleRoleResponse struct { ID string `json:"id"` // contains filtered or unexported fields }
type DeleteModuleDBQuery ¶
type DeleteModuleDBQuery struct {
Namespace string `form:"namespace" binding:"required"`
}
type DeleteModuleDBResponse ¶
type DeleteModuleDBResponse struct {
// contains filtered or unexported fields
}
type DeleteModulePermissionsResponse ¶
type DeleteModulePermissionsResponse struct {
// contains filtered or unexported fields
}
type DeleteModuleRoleDBQuery ¶
type DeleteModuleRoleDBQuery struct {
Namespace string `form:"namespace" binding:"required"`
}
type DeleteModuleRoleDBResponse ¶
type DeleteModuleRoleDBResponse struct {
// contains filtered or unexported fields
}
type DisableModuleRequest ¶
type DisableModuleResponse ¶
type DisableModuleResponse struct {
// contains filtered or unexported fields
}
type EnableModuleRequest ¶
type EnableModuleResponse ¶
type EnableModuleResponse struct {
// contains filtered or unexported fields
}
type GetEnabledModulesQuery ¶
type GetEnabledModulesResponse ¶
type GetEnabledModulesResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []ModuleInfoWithEnabledOrgID `json:"infos"` // contains filtered or unexported fields }
type GetModulePermissionsResponse ¶
type GetModulePermissionsResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []ModulePermissionInfo `json:"infos"` // contains filtered or unexported fields }
type GetModulePermissionsWithRoleQuery ¶
type GetModulePermissionsWithRoleQuery struct {
GetModulePermissionsQuery
}
type GetModulePermissionsWithRoleResponse ¶
type GetModulePermissionsWithRoleResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []ModulePermissionInfoWithRole `json:"infos"` // contains filtered or unexported fields }
type GetModuleRolesQuery ¶
type GetModuleRolesResponse ¶
type GetModuleRolesResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []ModuleRoleInfo `json:"infos"` // contains filtered or unexported fields }
type GetModuleRolesWithModuleQuery ¶
type GetModuleRolesWithModuleQuery struct {
GetModuleRolesQuery
}
type GetModuleRolesWithModuleResponse ¶
type GetModuleRolesWithModuleResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []ModuleRoleInfoWithModule `json:"infos"` // contains filtered or unexported fields }
type GetModuleRolesWithPermissionsQuery ¶
type GetModuleRolesWithPermissionsQuery struct {
GetModuleRolesQuery
}
type GetModuleRolesWithPermissionsResponse ¶
type GetModuleRolesWithPermissionsResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []ModuleRoleInfoWithPermissions `json:"infos"` // contains filtered or unexported fields }
type GetModulesQuery ¶
type GetModulesResponse ¶
type GetModulesResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []ModuleInfo `json:"infos"` // contains filtered or unexported fields }
type GetModulesWithEnabledInfoResponse ¶
type GetModulesWithEnabledInfoResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []ModuleInfoWithEnabledInfo `json:"infos"` // contains filtered or unexported fields }
type GetModulesWithRolesQuery ¶
type GetModulesWithRolesQuery struct {
GetModulesQuery
}
type GetModulesWithRolesResponse ¶
type GetModulesWithRolesResponse struct { PageNo int `json:"pageNo"` TotalCount int64 `json:"totalCount"` Infos []ModuleInfoWithRoles `json:"infos"` // contains filtered or unexported fields }
type ModuleInfo ¶
func GetModules ¶
func GetModules(req *GetModulesQuery) ([]ModuleInfo, error)
type ModuleInfoWithEnabledInfo ¶
type ModuleInfoWithEnabledInfo struct { *ModuleInfo Enabled bool OrgID string }
func GetModulesWithEnabledInfo ¶
func GetModulesWithEnabledInfo(req *GetModulesWithEnabledInfoQuery) ([]ModuleInfoWithEnabledInfo, error)
type ModuleInfoWithEnabledOrgID ¶
type ModuleInfoWithEnabledOrgID struct { *ModuleInfo OrgID string }
func GetEnabledModules ¶
func GetEnabledModules(req *GetEnabledModulesQuery) ([]ModuleInfoWithEnabledOrgID, error)
type ModuleInfoWithRoles ¶
type ModuleInfoWithRoles struct { ID string `json:"id"` Name string `json:"name"` ModuleRoleInfos []ModuleRoleInfo `json:"moduleRoleInfos"` }
func GetModulesWithRoles ¶
func GetModulesWithRoles(req *GetModulesWithRolesQuery) ([]ModuleInfoWithRoles, error)
GetModulesWithRoles 获取模块及其模块角色
type ModulePermissionInfo ¶
type ModulePermissionInfo struct { ID string `json:"id"` Describe string `json:"describe"` Resource string `json:"resource"` Action string `json:"action"` }
func GetModulePermissions ¶
func GetModulePermissions(req *GetModulePermissionsQuery) ([]ModulePermissionInfo, error)
GetModulePermissions 获取模块权限
type ModulePermissionInfoWithRole ¶
type ModulePermissionInfoWithRole struct { ID string `json:"id"` Describe string `json:"describe"` Resource string `json:"resource"` Action string `json:"action"` ModuleRoleInfo *ModuleRoleInfo `json:"moduleRoleInfo"` }
func GetModulePermissionsWithRole ¶
func GetModulePermissionsWithRole(req *GetModulePermissionsWithRoleQuery) ([]ModulePermissionInfoWithRole, error)
GetModulePermissionsWithRole 获取模块及其模块角色
type ModuleRoleInfo ¶
func GetModuleRoles ¶
func GetModuleRoles(req *GetModuleRolesQuery) ([]ModuleRoleInfo, error)
type ModuleRoleInfoWithModule ¶
type ModuleRoleInfoWithModule struct { ID string `json:"id"` Name string `json:"name"` ModuleInfo *ModuleInfo `json:"moduleInfo"` }
func GetModuleRolesWithModule ¶
func GetModuleRolesWithModule(req *GetModuleRolesWithModuleQuery) ([]ModuleRoleInfoWithModule, error)
GetModuleRolesWithModule 获取模块角色及其所属的模块
type ModuleRoleInfoWithPermissions ¶
type ModuleRoleInfoWithPermissions struct { ID string Name string ModulePermissionInfos []ModulePermissionInfo }
func GetModuleRolesWithPermissions ¶
func GetModuleRolesWithPermissions(req *GetModuleRolesWithPermissionsQuery) ([]ModuleRoleInfoWithPermissions, error)
GetModuleRolesWithPermissions 获取模块角色及其权限
type UpdateModuleRequest ¶
type UpdateModuleResponse ¶
type UpdateModuleResponse struct {
// contains filtered or unexported fields
}
type UpdateModuleRoleRequest ¶
type UpdateModuleRoleResponse ¶
type UpdateModuleRoleResponse struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.