Documentation ¶
Index ¶
- 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 DomainMmodel
- func (DomainMmodel) Delete(js []DomainMmodel) error
- func (this DomainMmodel) Get() ([]DomainMmodel, error)
- func (DomainMmodel) GetRow(domain_id string) (DomainMmodel, error)
- func (DomainMmodel) Post(data url.Values, user_id string, user_domain_id string) (string, error)
- func (DomainMmodel) Update(data url.Values, user_id string) (string, error)
- type DomainShareData
- type DomainShareModel
- func (DomainShareModel) Delete(data []DomainShareData, domain_id string) (string, error)
- func (DomainShareModel) Get(domain_id string) ([]DomainShareData, error)
- func (this DomainShareModel) GetList(domain_id string) ([]DomainMmodel, error)
- func (this DomainShareModel) GetOwner(domain_id string) (domainDataSet, error)
- func (DomainShareModel) Post(data url.Values, user_id string) (string, error)
- func (DomainShareModel) UnAuth(domain_id string) ([]dusModel, error)
- func (DomainShareModel) Update(data url.Values, user_id string) (string, error)
- type HandleLogMode
- type HomePageMenusModel
- type LoginModels
- type OrgModel
- func (this OrgModel) Delete(mjs []SysOrgInfo, domain_id string) (string, error)
- func (OrgModel) Get(domain_id string) ([]SysOrgInfo, error)
- func (this OrgModel) GetSubOrgInfo(domain_id string, org_id string) ([]SysOrgInfo, error)
- func (OrgModel) Post(data url.Values, user_id string) (string, error)
- func (this OrgModel) Update(data url.Values, user_id string) (string, error)
- func (this OrgModel) Upload(data []SysOrgInfo) (string, error)
- type PasswdModels
- type ResourceModel
- func (this *ResourceModel) Delete(res_id string) (string, error)
- func (this *ResourceModel) Get() ([]resData, error)
- func (this *ResourceModel) GetChildren(res_id string) ([]resData, error)
- func (this *ResourceModel) Post(data url.Values) (string, error)
- func (this *ResourceModel) Query(res_id string) ([]resData, error)
- func (this *ResourceModel) Update(res_id, res_name string) (string, error)
- type RoleAndResourceModel
- func (this RoleAndResourceModel) Delete(role_id, res_id string) error
- func (this RoleAndResourceModel) Get(role_id string) ([]resData, error)
- func (this RoleAndResourceModel) Gets(roles []string, res_id ...string) ([]resData, error)
- func (this RoleAndResourceModel) Post(role_id, res_id string) error
- func (this RoleAndResourceModel) UnGetted(role_id string) ([]resData, error)
- type RoleInfo
- type RoleModel
- func (RoleModel) Delete(allrole []RoleInfo) (string, error)
- func (RoleModel) Get(domain_id string) ([]RoleInfo, error)
- func (this RoleModel) GetRow(role_id string) (RoleInfo, error)
- func (RoleModel) Post(data url.Values, user_id string) (string, error)
- func (RoleModel) Update(data url.Values, user_id string) (string, error)
- type RoleResourceRelData
- type SysOrgInfo
- type ThemeResourceModel
- func (this ThemeResourceModel) CheckThemeExists(theme_id string, res_id string) (int, string)
- func (this ThemeResourceModel) Get(theme_id string) ([]themeData, error)
- func (this ThemeResourceModel) GetDetails(res_id string, theme_id string) ([]themeData, error)
- func (this ThemeResourceModel) Post(...) (string, error)
- func (this ThemeResourceModel) Update(...) error
- type UserInfo
- type UserModel
- func (UserModel) Delete(data []UserInfo) (string, error)
- func (UserModel) GetDefault(domain_id string) ([]UserInfo, error)
- func (UserModel) GetOwnerDetails(user_id string) ([]UserInfo, error)
- func (this UserModel) ModifyPasswd(data url.Values) (string, error)
- func (this UserModel) ModifyStatus(status_id, user_id string) (string, error)
- func (UserModel) Post(data url.Values, user_id string) (string, error)
- func (this UserModel) Put(data url.Values, modify_user string) (string, error)
- func (this UserModel) Search(org_id string, status_id string, domain_id string) ([]UserInfo, error)
- type UserRolesModel
- func (UserRolesModel) Auth(data []UserRolesModel, user_id string) (string, error)
- func (UserRolesModel) GetOtherRoles(user_id string) ([]UserRolesModel, error)
- func (UserRolesModel) GetRolesByUser(user_id string) ([]UserRolesModel, error)
- func (UserRolesModel) Revoke(rst []UserRolesModel) (string, error)
- type UserThemeModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 DomainMmodel ¶
type DomainMmodel 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" dateType:"YYYY-MM-DD HH24:MM:SS"` User_id string `json:"create_user_id"` Domain_maintance_date string `json:"domain_modify_date" dateType:"YYYY-MM-DD HH24:MM:SS"` Domain_maintance_user string `json:"domain_modify_user"` Domain_status_cd string `json:"domain_status_cd"` }
func (DomainMmodel) Delete ¶
func (DomainMmodel) Delete(js []DomainMmodel) error
删除域信息 在controller中校验权限
func (DomainMmodel) Get ¶
func (this DomainMmodel) Get() ([]DomainMmodel, error)
func (DomainMmodel) GetRow ¶
func (DomainMmodel) GetRow(domain_id string) (DomainMmodel, error)
获取指定域的详细信息
type DomainShareData ¶
type DomainShareData struct {}
type DomainShareModel ¶
type DomainShareModel struct {
// contains filtered or unexported fields
}
func (DomainShareModel) Delete ¶
func (DomainShareModel) Delete(data []DomainShareData, domain_id string) (string, error)
func (DomainShareModel) Get ¶
func (DomainShareModel) Get(domain_id string) ([]DomainShareData, error)
获取指定域共享给了哪些对象
func (DomainShareModel) GetList ¶
func (this DomainShareModel) GetList(domain_id string) ([]DomainMmodel, error)
func (DomainShareModel) GetOwner ¶
func (this DomainShareModel) GetOwner(domain_id string) (domainDataSet, error)
func (DomainShareModel) UnAuth ¶
func (DomainShareModel) UnAuth(domain_id string) ([]dusModel, error)
type HandleLogMode ¶
type HandleLogMode struct { }
func (HandleLogMode) Download ¶
func (this HandleLogMode) Download(domain_id string) ([]handleLogs, error)
func (HandleLogMode) Get ¶
func (this HandleLogMode) Get(domain_id, offset, limit string) ([]handleLogs, int64, error)
func (HandleLogMode) Search ¶
func (this HandleLogMode) Search(domain_id, userid, start, end string) ([]handleLogs, error)
type HomePageMenusModel ¶
type HomePageMenusModel struct {
// contains filtered or unexported fields
}
type LoginModels ¶
type LoginModels struct { }
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 (this OrgModel) Delete(mjs []SysOrgInfo, domain_id string) (string, 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 (r PasswdModels) UpdateMyPasswd(newPd, User_id, oriEn string) (string, error)
func (PasswdModels) UpdateUserPasswd ¶
func (r PasswdModels) UpdateUserPasswd(newPd, userid string) error
type ResourceModel ¶
type ResourceModel struct {
Mtheme ThemeResourceModel
}
func (*ResourceModel) Delete ¶
func (this *ResourceModel) Delete(res_id string) (string, error)
删除指定的资源
func (*ResourceModel) GetChildren ¶
func (this *ResourceModel) GetChildren(res_id string) ([]resData, error)
func (*ResourceModel) Query ¶
func (this *ResourceModel) Query(res_id string) ([]resData, error)
所有指定资源的详细信息
type RoleAndResourceModel ¶
type RoleAndResourceModel struct {
// contains filtered or unexported fields
}
func (RoleAndResourceModel) Delete ¶
func (this RoleAndResourceModel) Delete(role_id, res_id string) error
func (RoleAndResourceModel) Get ¶
func (this RoleAndResourceModel) Get(role_id string) ([]resData, error)
查询角色已经拥有的资源信息
func (RoleAndResourceModel) Gets ¶
func (this RoleAndResourceModel) Gets(roles []string, res_id ...string) ([]resData, error)
获取某些角色,指定资源的所有下级资源
func (RoleAndResourceModel) Post ¶
func (this RoleAndResourceModel) Post(role_id, res_id string) error
func (RoleAndResourceModel) UnGetted ¶
func (this RoleAndResourceModel) UnGetted(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 RoleResourceRelData ¶
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"` 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 ThemeResourceModel ¶
type ThemeResourceModel struct { }
func (ThemeResourceModel) CheckThemeExists ¶
func (this ThemeResourceModel) CheckThemeExists(theme_id string, res_id string) (int, string)
func (ThemeResourceModel) Get ¶
func (this ThemeResourceModel) Get(theme_id string) ([]themeData, error)
func (ThemeResourceModel) GetDetails ¶
func (this ThemeResourceModel) GetDetails(res_id string, theme_id string) ([]themeData, error)
查询指定资源,指定主题的详细信息
func (ThemeResourceModel) Post ¶
func (this ThemeResourceModel) Post(theme_id, res_id, res_url, res_class, res_img, res_by_color, res_group_id, res_sort_id, res_type string) (string, error)
func (ThemeResourceModel) Update ¶
func (this ThemeResourceModel) Update(res_url, res_by_color, res_class, res_img, res_group_id, res_sort_id, theme_id, res_id, res_open_type string) error
type UserInfo ¶
type UserInfo struct { User_id string `json:"user_id"` User_name string `json:"user_name"` User_status_desc string `json:"status_desc"` User_create_date string `json:"create_date"` User_owner string `json:"create_user"` User_email string `json:"user_email"` User_phone string `json:"user_phone"` Org_unit_id string `json:"org_unit_id"` Org_unit_desc string `json:"org_unit_desc"` Domain_id string `json:"domain_id"` Domain_name string `json:"domain_name"` User_maintance_date string `json:"modify_date"` User_maintance_user string `json:"modify_user"` User_status_id string `json:"status_cd"` }
type UserModel ¶
type UserModel struct {
// contains filtered or unexported fields
}
func (UserModel) GetDefault ¶
查询域中所有的用户信息
func (UserModel) GetOwnerDetails ¶
查询用户自己的详细信息
func (UserModel) ModifyStatus ¶
type UserRolesModel ¶
type UserRolesModel struct { User_id string `json:"user_id"` Role_id string `json:"role_id"` Code_number string `json:"code_number"` Role_name string `json:"role_name"` Role_status string `json:"role_status"` }
func (UserRolesModel) Auth ¶
func (UserRolesModel) Auth(data []UserRolesModel, user_id string) (string, error)
对这个域中的用户进行授权
func (UserRolesModel) GetOtherRoles ¶
func (UserRolesModel) GetOtherRoles(user_id string) ([]UserRolesModel, error)
获取这个用户id,还没有获取的角色信息
func (UserRolesModel) GetRolesByUser ¶
func (UserRolesModel) GetRolesByUser(user_id string) ([]UserRolesModel, error)
根据用户id,获取这个用户已经拥有的角色
func (UserRolesModel) Revoke ¶
func (UserRolesModel) Revoke(rst []UserRolesModel) (string, error)
移除这个用户拥有的角色信息
type UserThemeModel ¶
type UserThemeModel struct { }
func (UserThemeModel) Get ¶
func (this UserThemeModel) Get(user_id string) ([]userThemeData, error)
func (UserThemeModel) Put ¶
func (this UserThemeModel) Put(user_id, theme_id string) error
Source Files ¶
- checkUserModels.go
- domainModels.go
- domainShareModels.go
- handleLogModels.go
- homePageMenusModels.go
- loginModels.go
- orgModels.go
- passwdModels.go
- resourceModels.go
- resource_theme_Models.go
- roleAndResourceModel.go
- roleModels.go
- sql_define.go
- sql_oracle.go
- userModels.go
- userRolesModels.go
- user_theme_models.go
Click to show internal directories.
Click to hide internal directories.