mms

package
v0.13.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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 Destroy

func Destroy()

func DisableModule

func DisableModule(req *DisableModuleRequest) error

func EnableModule

func EnableModule(req *EnableModuleRequest) error

EnableModule 开通模块

func Init

func Init(baseUrl string, timeoutSec time.Duration)

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 CreateModulePermissionBaseRequest

type CreateModulePermissionBaseRequest struct {
	Describe string `json:"describe"`
	Resource string `json:"resource" binding:"required"`
	Action   string `json:"action" binding:"required"`
}

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 DeleteModulePermissionsQuery

type DeleteModulePermissionsQuery struct {
	Namespace string `form:"namespace" binding:"required"`
	IDs       string `form:"ids" binding:"required"`
}

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 DisableModuleRequest struct {
	Namespace string `json:"namespace" binding:"required"`
	ModuleID  string `json:"moduleId" binding:"required"`
	OrgID     string `json:"orgId" binding:"required"`
}

type DisableModuleResponse

type DisableModuleResponse struct {
	// contains filtered or unexported fields
}

type EnableModuleRequest

type EnableModuleRequest struct {
	Namespace string `json:"namespace" binding:"required"`
	ModuleID  string `json:"moduleId" binding:"required"`
	OrgID     string `json:"orgId" binding:"required"`
}

type EnableModuleResponse

type EnableModuleResponse struct {
	// contains filtered or unexported fields
}

type GetEnabledModulesQuery

type GetEnabledModulesQuery struct {
	Namespace string `form:"namespace" binding:"required"`
	ModuleID  string `form:"moduleId"`
	OrgID     string `form:"orgId"`
}

type GetEnabledModulesResponse

type GetEnabledModulesResponse struct {
	PageNo     int                          `json:"pageNo"`
	TotalCount int64                        `json:"totalCount"`
	Infos      []ModuleInfoWithEnabledOrgID `json:"infos"`
	// contains filtered or unexported fields
}

type GetModulePermissionsQuery

type GetModulePermissionsQuery struct {
	Namespace string `form:"namespace" binding:"required"`
	ID        string `form:"id"`
	Resource  string `form:"resource"`
	Action    string `form:"action"`
	PageNo    int    `form:"pageNo"`
	PageSize  int    `form:"pageSize"`
}

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 GetModuleRolesQuery struct {
	Namespace string `form:"namespace" binding:"required"`
	ID        string `form:"id"`
	ModuleID  string `form:"moduleId"`
	Name      string `form:"name"`
	PageNo    int    `form:"pageNo"`
	PageSize  int    `form:"pageSize"`
}

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 GetModulesQuery struct {
	Namespace string `form:"namespace"  binding:"required"`
	ID        string `form:"id"`
	Name      string `form:"name"`
	PageNo    int    `form:"pageNo"`
	PageSize  int    `form:"pageSize"`
}

type GetModulesResponse

type GetModulesResponse struct {
	PageNo     int          `json:"pageNo"`
	TotalCount int64        `json:"totalCount"`
	Infos      []ModuleInfo `json:"infos"`
	// contains filtered or unexported fields
}

type GetModulesWithEnabledInfoQuery

type GetModulesWithEnabledInfoQuery struct {
	Namespace string `form:"namespace" binding:"required"`
	ModuleID  string `form:"moduleId"`
	OrgID     string `form:"orgId"`
}

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

type ModuleInfo struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func GetModules

func GetModules(req *GetModulesQuery) ([]ModuleInfo, error)

type ModuleInfoWithEnabledInfo

type ModuleInfoWithEnabledInfo struct {
	*ModuleInfo
	Enabled bool
	OrgID   string
}

type ModuleInfoWithEnabledOrgID

type ModuleInfoWithEnabledOrgID struct {
	*ModuleInfo
	OrgID string
}

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

type ModuleRoleInfo struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

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 UpdateModuleRequest struct {
	Namespace string `json:"namespace" binding:"required"`
	ID        string `json:"id" binding:"required"`
	Name      string `json:"name"`
}

type UpdateModuleResponse

type UpdateModuleResponse struct {
	// contains filtered or unexported fields
}

type UpdateModuleRoleRequest

type UpdateModuleRoleRequest struct {
	Namespace string `json:"namespace" binding:"required"`
	ID        string `json:"id" binding:"required"`
	Name      string `json:"name"`
}

type UpdateModuleRoleResponse

type UpdateModuleRoleResponse struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL