Documentation ¶
Index ¶
- Variables
- func BasicAuth(ctx *context.Context) bool
- func CheckDomain(ctx *context.Context, domain_id string, pattern string) bool
- func CheckDomainByOrgId(org_unit_id string) (string, error)
- func CheckDomainByRoleId(role_id string) (string, error)
- func CheckDomainByUserId(user_id string) (string, error)
- func CheckDomainRights(user_id string, domain_id string) int
- func CheckPasswd(user_id, user_passwd string) (bool, int, int64, string)
- func DomainAuth(ctx *context.Context, domain_id string) int
- type AuthorityModel
- type DomainShareModel
- func (DomainShareModel) Delete(js string, domain_id string) error
- func (DomainShareModel) Get(domain_id string) ([]dsModel, error)
- func (DomainShareModel) Post(domain_id, target_domain_id, auth_level, user_id string) error
- func (DomainShareModel) UnAuth(domain_id string) ([]dusModel, error)
- func (DomainShareModel) Update(uuid, user_id, auth_level string) error
- type HomePageMenusModel
- type LoginModels
- type OrgModel
- type PasswdModels
- type ProjectMgr
- func (ProjectMgr) Delete(js []ProjectMgr, user_id string, domain_id string) error
- func (ProjectMgr) Get(domain_id string) ([]ProjectMgr, error)
- func (ProjectMgr) GetAll(offset, limit string) ([]ProjectMgr, int64, error)
- func (ProjectMgr) GetOwner(domain_id string) (domainDataModel, error)
- func (ProjectMgr) GetRow(domain_id string) (ProjectMgr, error)
- func (ProjectMgr) Post(domain_id, domain_desc, domain_status, user_id, did string) error
- func (ProjectMgr) Update(domainDesc, domainStatus, user_id, domainId string) error
- type ResourceModel
- func (this ResourceModel) AddThemeInfo(...) (string, error)
- func (this ResourceModel) CheckThemeExists(theme_id string, res_id string) int
- func (this ResourceModel) Delete(res_id string) (string, error)
- func (ResourceModel) Get() ([]resData, error)
- func (ResourceModel) Post(res_id, res_name, res_attr, res_up_id, res_type, theme_id, res_url, ... string) error
- func (this ResourceModel) PostButton(res_id, res_name, res_attr, res_up_id, res_type string) error
- func (ResourceModel) Query(res_id string) ([]resData, error)
- func (ResourceModel) QueryTheme(res_id string, theme_id string) ([]themeData, error)
- func (this ResourceModel) UnGetted(role_id string) ([]resData, error)
- func (this ResourceModel) Update(res_id, res_name string) error
- func (this ResourceModel) UpdateTheme(...) error
- type RoleAndResourceModel
- type RoleInfo
- type RoleModel
- func (RoleModel) Delete(allrole []RoleInfo, user_id, domain_id string) error
- func (RoleModel) Get(domain_id string) ([]RoleInfo, error)
- func (RoleModel) GetRow(role_id string) ([]RoleInfo, error)
- func (RoleModel) Post(id, rolename, user_id, rolestatus, domainid, roleid string) error
- func (RoleModel) Update(Role_name, Role_status, Role_id, User_id, domain_id string) error
- type SysOrgInfo
- type ThemeModel
- type UserModel
- func (UserModel) Delete(ijs []byte, user_id, domain_id string) (string, error)
- func (UserModel) GetDefault(domain_id string) ([]userInfo, error)
- func (UserModel) GetOwnerDetails(user_id string) ([]userInfo, error)
- func (this UserModel) ModifyPasswd(passwd, user_id string) (string, error)
- func (this UserModel) ModifyStatus(status_id, user_id string) (string, error)
- func (UserModel) Post(userId, userPasswd, userDesc, userStatus, id, userEmail, userPhone, ... string) error
- func (this UserModel) Put(user_name, org_id, phone, email, uid, user_id, domain_id string) (string, error)
- func (this UserModel) Search(org_id string, status_id string, domain_id string) ([]userInfo, error)
- type UserRolesModel
- func (UserRolesModel) Auth(domain_id, user_id, ijs string) (string, error)
- func (UserRolesModel) GetOtherRoles(user_id string) ([]userRoleData, error)
- func (UserRolesModel) GetRolesByUser(user_id string) ([]userRoleData, error)
- func (UserRolesModel) Revoke(user_id string, role_id string, uid, did string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var AuthModel = new(AuthorityModel)
Functions ¶
func CheckDomain ¶
检查用户对指定的域的权限 第一个参数是上下文 context 第二个参数是用户想要访问的域 第三个参数是用户想要的权限,分两种情况,r 表示只读, w 表示读写
func CheckDomainByOrgId ¶
func CheckDomainByRoleId ¶
func CheckDomainByUserId ¶
func CheckDomainRights ¶
check the user wheather handle the domain return value : -1 : have no right to handle the domain 1 : can read the domain info 2 : can read and wirte the domain info
func CheckPasswd ¶
check user's passwd is right.
Types ¶
type AuthorityModel ¶
type AuthorityModel struct { }
func (AuthorityModel) GetGrantRoles ¶
func (AuthorityModel) GetGrantRoles(user_id, uid string) ([]gettedRoles, error)
func (AuthorityModel) GetOwnerRoles ¶
func (AuthorityModel) GetOwnerRoles(user_id string) ([]gettedRoles, error)
func (AuthorityModel) Grants ¶
func (AuthorityModel) Grants(users, roles, user_id string) ([]mbatchUsers, error)
type DomainShareModel ¶
type DomainShareModel struct { }
func (DomainShareModel) Get ¶
func (DomainShareModel) Get(domain_id string) ([]dsModel, error)
func (DomainShareModel) Post ¶
func (DomainShareModel) Post(domain_id, target_domain_id, auth_level, user_id string) error
func (DomainShareModel) UnAuth ¶
func (DomainShareModel) UnAuth(domain_id string) ([]dusModel, error)
func (DomainShareModel) Update ¶
func (DomainShareModel) Update(uuid, user_id, auth_level string) error
type HomePageMenusModel ¶
type HomePageMenusModel struct { Res_id string Res_name string Res_url string Res_bg_color string Res_class string Res_img string Group_id string Res_up_id string }
func (HomePageMenusModel) Get ¶
func (this HomePageMenusModel) Get(id, typeId, useId string) ([]byte, error)
func (HomePageMenusModel) GetUrl ¶
func (this HomePageMenusModel) GetUrl(user_id, id string) string
type LoginModels ¶
type LoginModels struct { }
func (LoginModels) GetDefaultDomainId ¶
func (this LoginModels) GetDefaultDomainId(user_id string) (domain_id string, err error)
func (LoginModels) GetDefaultOrgId ¶
func (this LoginModels) GetDefaultOrgId(user_id string) (org_id string, err error)
func (LoginModels) GetDefaultPage ¶
func (this LoginModels) GetDefaultPage(user_id string) string
type OrgModel ¶
type OrgModel struct { }
func (OrgModel) Delete ¶
func (OrgModel) Delete(mjs []SysOrgInfo) error
func (OrgModel) GetSubOrgInfo ¶
func (this OrgModel) GetSubOrgInfo(domain_id string, org_id string) ([]SysOrgInfo, error)
type PasswdModels ¶
type PasswdModels struct { }
func (PasswdModels) UpdateMyPasswd ¶
func (PasswdModels) UpdateMyPasswd(newPd, User_id, oriEn string) error
func (PasswdModels) UpdateUserPasswd ¶
func (PasswdModels) UpdateUserPasswd(newPd, userid string) error
type ProjectMgr ¶
type ProjectMgr struct { Project_id string `json:"domain_id"` Project_name string `json:"domain_desc"` Project_status string `json:"domain_status"` Maintance_date string `json:"maintance_date"` User_id string `json:"create_user_id"` Domain_maintance_date string `json:"domain_modify_date"` Domain_maintance_user string `json:"domain_modify_user"` Domain_dept string `json:"domain_dept"` Domain_up_id string `json:"domain_up_id"` }
func (ProjectMgr) Delete ¶
func (ProjectMgr) Delete(js []ProjectMgr, user_id string, domain_id string) error
func (ProjectMgr) Get ¶
func (ProjectMgr) Get(domain_id string) ([]ProjectMgr, error)
func (ProjectMgr) GetAll ¶
func (ProjectMgr) GetAll(offset, limit string) ([]ProjectMgr, int64, error)
func (ProjectMgr) GetOwner ¶
func (ProjectMgr) GetOwner(domain_id string) (domainDataModel, error)
func (ProjectMgr) GetRow ¶
func (ProjectMgr) GetRow(domain_id string) (ProjectMgr, error)
func (ProjectMgr) Post ¶
func (ProjectMgr) Post(domain_id, domain_desc, domain_status, user_id, did string) error
func (ProjectMgr) Update ¶
func (ProjectMgr) Update(domainDesc, domainStatus, user_id, domainId string) error
type ResourceModel ¶
type ResourceModel struct { }
func (ResourceModel) AddThemeInfo ¶
func (this ResourceModel) AddThemeInfo(theme_id, res_id, res_url, res_class, res_img, res_by_color, res_group_id, res_sort_id string) (string, error)
func (ResourceModel) CheckThemeExists ¶
func (this ResourceModel) CheckThemeExists(theme_id string, res_id string) int
func (ResourceModel) Delete ¶
func (this ResourceModel) Delete(res_id string) (string, error)
删除指定的资源
func (ResourceModel) Post ¶
func (ResourceModel) Post(res_id, res_name, res_attr, res_up_id, res_type, theme_id, res_url, res_bg_color, res_class, group_id, res_img, sort_id string) error
新增资源
func (ResourceModel) PostButton ¶
func (this ResourceModel) PostButton(res_id, res_name, res_attr, res_up_id, res_type string) error
新增按钮
func (ResourceModel) Query ¶
func (ResourceModel) Query(res_id string) ([]resData, error)
所有指定资源的详细信息
func (ResourceModel) QueryTheme ¶
func (ResourceModel) QueryTheme(res_id string, theme_id string) ([]themeData, error)
查询指定资源,指定主题的详细信息
func (ResourceModel) UnGetted ¶
func (this ResourceModel) UnGetted(role_id string) ([]resData, error)
查询没有获取到的资源信息
func (ResourceModel) Update ¶
func (this ResourceModel) Update(res_id, res_name string) error
func (ResourceModel) UpdateTheme ¶
func (this ResourceModel) UpdateTheme(res_url, res_by_color, res_class, res_img, res_group_id, res_sort_id, theme_id, res_id string) error
type RoleAndResourceModel ¶
type RoleAndResourceModel struct {
ResourceModel
}
func (RoleAndResourceModel) GetByRoleId ¶
func (RoleAndResourceModel) GetByRoleId(role_id string) ([]resData, error)
查询角色已经拥有的资源信息
type RoleInfo ¶
type RoleInfo struct { Code_number string `json:"code_number"` Role_name string `json:"role_name"` Role_owner string `json:"create_user"` Role_create_date string `json:"create_date"` Role_status_desc string `json:"role_status_desc"` Role_status string `json:"role_status_code"` Domain_id string `json:"domain_id"` Domain_desc string `json:"domain_desc"` Role_maintance_date string `json:"modify_date"` Role_maintance_user string `json:"modify_user"` Role_id string `json:"role_id"` }
type SysOrgInfo ¶
type SysOrgInfo struct { Org_unit_id string `json:"org_id"` Org_unit_desc string `json:"org_desc"` Up_org_id string `json:"up_org_id"` Org_status_id string `json:"status_id"` Org_status_desc string `json:"status_desc"` Domain_id string `json:"domain_id"` Create_date string `json:"create_date"` Maintance_date string `json:"modify_date"` Create_user string `json:"create_user"` Maintance_user string `json:"modify_user"` Code_number string `json:"code_number"` Org_dept string `json:"org_dept,omitempty"` }
type ThemeModel ¶
type ThemeModel struct { }
func (ThemeModel) Post ¶
func (ThemeModel) Post(user_id, theme_id string) error
type UserModel ¶
type UserModel struct {
// contains filtered or unexported fields
}
func (UserModel) GetDefault ¶
查询域中所有的用户信息
func (UserModel) GetOwnerDetails ¶
查询用户自己的详细信息
func (UserModel) ModifyPasswd ¶
func (UserModel) ModifyStatus ¶
func (UserModel) Post ¶
func (UserModel) Post(userId, userPasswd, userDesc, userStatus, id, userEmail, userPhone, userOrgUnitId, domain_id string) error
新增用户信息
type UserRolesModel ¶
type UserRolesModel struct {
User_id string
}
func (UserRolesModel) Auth ¶
func (UserRolesModel) Auth(domain_id, user_id, ijs string) (string, error)
func (UserRolesModel) GetOtherRoles ¶
func (UserRolesModel) GetOtherRoles(user_id string) ([]userRoleData, error)
func (UserRolesModel) GetRolesByUser ¶
func (UserRolesModel) GetRolesByUser(user_id string) ([]userRoleData, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.