Documentation ¶
Index ¶
- Variables
- func Bind(c *gin.Context, obj interface{}) error
- func TransformSearch(qs string, mapping map[string]string) (ss map[string]string)
- type AccountEditPasswordDto
- type AssignDataPermDto
- type BindCodeDto
- type BindThirdDto
- type CheckPermDto
- type DataPermAddDto
- type DataPermEditDto
- type DeptCreateDto
- type DeptEditDto
- type DomainCreateDto
- type DomainEditDto
- type EmailSettingDTO
- type EmailVerificationDto
- type GeneralDelDto
- type GeneralGetDto
- type GeneralListDto
- type GeneralTreeDto
- type InstallDTO
- type LoginDto
- type LoginLogDto
- type LoginLogListDto
- type LoginOAuthDto
- type MenuCreateDto
- type MenuEditDto
- type OperationLogDto
- type OperationLogListDto
- type RoleCreateDto
- type RoleEditDto
- type SettingDTO
- type UnBindThirdDto
- type UserCreateDto
- type UserEditDto
- type UserEditPasswordDto
- type UserEditStatusDto
- type UserInDomainDto
- type UserMoveDepartmentDto
- type UserOAuthCreateDto
- type UserSecretCreateDto
- type UserSecretRetDto
- type VerifyEmailDto
Constants ¶
This section is empty.
Variables ¶
var DataPermListSearchMapping = map[string]string{
"d": "domain_id",
}
DataPermListSearchMapping - define search query keys in data permission list page
var MenuListSearchMapping = map[string]string{
"d": "domain_id",
}
UserListSearchMapping - define search query keys in user list page
var RoleListSearchMapping = map[string]string{
"n": "name",
"d": "domain_id",
"r": "role_name",
}
RoleListSearchMapping - define search query keys in role list page
var UserListSearchMapping = map[string]string{
"n": "username",
"d": "department_id",
}
UserListSearchMapping - define search query keys in user list page
var ValidateErrorMessage = map[string]string{
"customValidate": "%s can not be %s",
"required": "%s is required,got empty %#v",
"pwdValidate": "%s is not a valid password",
"permsValidate": "%s contains comma",
}
ValidateErrorMessage : customize error messages
Functions ¶
Types ¶
type AccountEditPasswordDto ¶
type AccountEditPasswordDto struct { Id int `uri:"id" json:"id" binding:"required"` RePassword string `form:"re_password" json:"re_password" binding:"required,pwdValidate"` NewPassword string `form:"new_password" json:"new_password" binding:"required,pwdValidate"` }
Account edit password only
type AssignDataPermDto ¶
type BindCodeDto ¶
type BindCodeDto struct {
Google2faToken string `form:"google_2fa_token" valid:"Required"` // 验证码
}
type BindThirdDto ¶
type CheckPermDto ¶
type DataPermAddDto ¶
type DataPermAddDto struct { DomainId int `form:"domain_id" json:"domain_id" binding:"required"` // 项目域id ParentId int `form:"parent_id" json:"parent_id"` // 父级id Name string `form:"name" json:"name" binding:"required"` // 名称 Perms string `form:"perms" json:"perms" binding:"permsValidate"` // 数据权限key PermsRule string `form:"perms_rule" json:"perms_rule"` // 数据权限规则 PermsType int `form:"perms_type" json:"perms_type" binding:"required"` // 类型 1=分类 2=数据权限 OrderNum int `form:"order_num" json:"order_num" binding:"required"` // 排序字段 Remarks string `form:"remarks" json:"remarks"` // 说明 }
type DataPermEditDto ¶
type DataPermEditDto struct { Id int `uri:"id" json:"id" binding:"required"` DomainId int `form:"domain_id" json:"domain_id" binding:"required"` // 项目域id ParentId int `form:"parent_id" json:"parent_id"` // 菜单ID Name string `form:"name" json:"name" binding:"required"` // 名称 Perms string `form:"perms" json:"perms" binding:"required" binding:"permsValidate"` // 数据权限key PermsRule string `form:"perms_rule" json:"perms_rule" binding:"required"` // 数据权限规则 PermsType int `form:"perms_type" json:"perms_type" binding:"required"` // 类型 1=分类 2=数据权限 OrderNum int `form:"order_num" json:"order_num" binding:"required"` // 排序字段 Remarks string `form:"remarks" json:"remarks"` // 说明 }
type DeptCreateDto ¶
type DeptCreateDto struct { Id int `json:"id"` Name string `form:"name" json:"name" binding:"required"` ParentId int `form:"parent_id" json:"parent_id"` OrderNum int `form:"order_num" json:"order_num"` CreateTime time.Time `type(datetime)" json:"create_time"` UpdateTime time.Time `type(datetime)" json:"-"` }
DeptCreateDto - binding domain creation params
type DeptEditDto ¶
type DeptEditDto struct { Id int `uri:"id" json:"id" binding:"required"` Name string `form:"name" json:"name" binding:"required"` //ParentId int `form:"parent_id" json:"parent_id" binding:"required"` OrderNum int `form:"order_num" json:"order_num"` }
DeptEditDto - binding domain edition params
type DomainCreateDto ¶
type DomainCreateDto struct { Id int `json:"id"` Name string `form:"name" json:"name" binding:"required"` Callbackurl string `form:"callbackurl" json:"callbackurl" binding:"required"` Remark string `form:"remark" json:"remark"` Code string `form:"code" json:"code" binding:"required"` CreateTime time.Time `type(datetime)" json:"create_time"` LastLoginTime time.Time `type(datetime)" json:"-"` }
DomainCreateDto - binding domain creation params
type DomainEditDto ¶
type DomainEditDto struct { Id int `uri:"id" json:"id" binding:"required"` Name string `form:"name" json:"name" binding:"required"` Callbackurl string `form:"callbackurl" json:"callbackurl"` Remark string `form:"remark" json:"remark"` Code string `form:"code" json:"code"` }
DomainEditDto - binding domain edition params
type EmailSettingDTO ¶
type EmailVerificationDto ¶
type EmailVerificationDto struct {
Code string `form:"code" binding:"required"` // email
}
type GeneralDelDto ¶
type GeneralDelDto struct {
Id int `uri:"id" json:"id" binding:"required"`
}
type GeneralGetDto ¶
type GeneralGetDto struct {
Id int `uri:"id" json:"id" binding:"required"`
}
type GeneralListDto ¶
type GeneralListDto struct { Skip int `form:"skip,default=0" json:"skip"` Limit int `form:"limit,default=20" json:"limit" binding:"max=10000"` Order string `form:"order" json:"order"` Q string `form:"q" json:"q"` }
GeneralListDto - General list request params
type GeneralTreeDto ¶
type GeneralTreeDto struct {
Q string `form:"q" json:"q"`
}
type InstallDTO ¶
type InstallDTO struct { SqlType string `form:"sqlType" json:"sqlType"` DataPath string `form:"dataPath" json:"dataPath"` SiteName string `form:"siteName" json:"siteName"` Port int `form:"port" json:"port"` BaseUrl string `form:"baseUrl" json:"baseUrl"` LogPath string `form:"logPath" json:"logPath"` SqlHost string `form:"sqlHost" json:"sqlHost"` SqlUser string `form:"sqlUser" json:"sqlUser"` SqlPassword string `form:"sqlPassword" json:"sqlPassword"` SqlName string `form:"sqlName" json:"sqlName"` SqlCharset string `form:"sqlCharset" json:"sqlCharset"` SqlSSL bool `form:"sqlSSL" json:"sqlSSL"` IsShowMailSetting bool `form:"isShowMailSetting" json:"isShowMailSetting"` SmtpServer string `form:"smtpServer" json:"smtpServer"` SmtpAddress string `form:"smtpAddress" json:"smtpAddress"` SmtpUser string `form:"smtpUser" json:"smtpUser"` SmtpPassword string `form:"smtpPassword" json:"smtpPassword"` IsShowServerSetting bool `form:"isShowServerSetting" json:"isShowServerSetting"` IsEnableCode bool `form:"isEnableCode" json:"isEnableCode"` IsEnableAccess bool `form:"isEnableAccess" json:"isEnableAccess"` IsShowAdminSetting bool `form:"isShowAdminSetting" json:"isShowAdminSetting"` AdminUser string `form:"adminUser" json:"adminUser"` AdminPassword string `form:"adminPassword" json:"adminPassword"` AdminConfirmPassword string `form:"adminConfirmPassword" json:"adminConfirmPassword"` AdminEmail string `form:"adminEmail" json:"adminEmail"` }
type LoginLogDto ¶
type LoginLogDto struct { UserId int `form:"user_id" binding:"required"` Client string `form:"client"` Platform string `form:"form"` Ip string `form:"ip"` IpLocation string `form:"ip_location"` LoginResult string `form:"login_result"` LoginStatus int `form:"login_status"` OperationContent string `form:"operation_content"` }
type LoginLogListDto ¶
type LoginLogListDto struct { Username string `form:"username"` Ip string `form:"ip"` StartTime string `form:"start_time"` EndTime string `form:"end_time"` Skip int `form:"skip,default=0" json:"skip"` Limit int `form:"limit,default=20" json:"limit" binding:"max=10000"` Order string `form:"order" json:"order"` }
type LoginOAuthDto ¶
type LoginOAuthDto struct { Code string `form:"code" binding:"required"` Type int `form:"type" binding:"required"` }
oauth login
type MenuCreateDto ¶
type MenuCreateDto struct { Name string `form:"name" json:"name" binding:"required"` ParentId int `form:"parent_id,default=0" json:"parent_id" binding:"gte=0"` DomainId int `form:"domain_id" json:"domain_id" binding:"required,gte=1"` Url string `form:"url" json:"url"` Perms string `form:"perms" json:"perms" binding:"permsValidate"` // alias which can be checked with permission(Like Perms above) also Alias string `form:"alias" json:"alias"` MenuType int `form:"menu_type,default=1" json:"menu_type"` Icon string `form:"icon" json:"icon"` OrderNum int `form:"order_num,default=1" json:"order_num"` }
MenuCreateDto - dto for menu's creation
type MenuEditDto ¶
type MenuEditDto struct { Id int `uri:"id" json:"id" binding:"required,gte=1"` Name string `form:"name" json:"name" binding:"required"` ParentId int `form:"parent_id,default=0" json:"parent_id" binding:"gte=0"` DomainId int `form:"domain_id" json:"domain_id" binding:"required,gte=1"` Url string `form:"url" json:"url"` Perms string `form:"perms" json:"perms" binding:"permsValidate"` // alias which can be checked with permission(Like Perms above) also Alias string `form:"alias" json:"alias"` MenuType int `form:"menu_type,default=0" json:"menu_type"` Icon string `form:"icon" json:"icon"` OrderNum int `form:"order_num,default=1" json:"order_num"` }
MenuEditDto - dto for menu's modification
type OperationLogDto ¶
type OperationLogDto struct { RequestUrl string `form:"request_url"` OperationMethod string `form:"operation_method"` Params string `form:"params"` UserId int `form:"user_id" valid:"Required"` Ip string `form:"ip"` IpLocation string `form:"ip_location"` OperationResult string `form:"operation_result"` OperationSuccess int `form:"operation_success"` OperationContent string `form:"operation_content"` }
type OperationLogListDto ¶
type OperationLogListDto struct { Username string `form:"username"` Ip string `form:"ip"` StartTime string `form:"start_time"` EndTime string `form:"end_time"` Skip int `form:"skip,default=0" json:"skip"` Limit int `form:"limit,default=20" json:"limit" binding:"max=10000"` Order string `form:"order" json:"order"` }
type RoleCreateDto ¶
type RoleCreateDto struct { Name string `form:"name" json:"name" binding:"required"` DomainId int `form:"domain_id" json:"domain_id" binding:"required,gte=1"` RoleName string `form:"role_name" json:"role_name" binding:"required"` Remark string `form:"remark" json:"remark"` MenuIds string `form:"menu_ids" json:"menu_ids"` MenuIdsEle string `form:"menu_ids_ele" json:"menu_ids_ele"` DataPermIds string `form:"data_perm_ids" json:"data_perm_ids"` }
RoleCreateDto - dto for role's creation
type RoleEditDto ¶
type RoleEditDto struct { Id int `uri:"id" json:"id" binding:"required,gte=1"` Name string `form:"name" json:"name" binding:"required"` DomainId int `form:"domain_id" json:"domain_id" binding:"required,gte=1"` Remark string `form:"remark" json:"remark"` MenuIds string `form:"menu_ids" json:"menu_ids"` MenuIdsEle string `form:"menu_ids_ele" json:"menu_ids_ele"` DataPermIds string `form:"data_perm_ids" json:"data_perm_ids"` }
RoleEditDto - dto for role's modification
type SettingDTO ¶
type SettingDTO struct { LdapUrl string `form:"ldapUrl" json:"ldapUrl"` LdapSearchDN string `form:"ldapSearchDN" json:"ldapSearchDN"` LdapSearchPassword string `form:"ldapSearchPassword" json:"ldapSearchPassword"` LdapBaseDN string `form:"ldapBaseDN" json:"ldapBaseDN"` LdapFilter string `form:"ldapFilter" json:"ldapFilter"` LdapUID string `form:"ldapUID" json:"ldapUID"` LdapGroupBaseDN string `form:"ldapGroupBaseDN" json:"ldapGroupBaseDN"` LdapGroupFilter string `form:"ldapGroupFilter" json:"ldapGroupFilter"` LdapGroupGID string `form:"ldapGroupGID" json:"ldapGroupGID"` LdapGroupAdminDN string `form:"ldapGroupAdminDN" json:"ldapGroupAdminDN"` }
type UserCreateDto ¶
type UserCreateDto struct { Id int `json:"id"` Username string `form:"username" json:"username" binding:"required"` Mobile string `form:"mobile" json:"mobile"` Sex int `form:"sex" json:"sex"` Realname string `form:"realname" json:"realname"` Password string `form:"password" json:"password" binding:"required,pwdValidate"` Salt string `json:"-"` DepartmentId int `form:"department_id" json:"department_id"` Faceicon string `json:"faceicon"` Email string `form:"email" json:"email"` Title string `form:"title" json:"title"` Status int `form:"status,default=1" json:"status"` CreateTime time.Time `type(datetime)" json:"create_time"` LastLoginTime time.Time `type(datetime)" json:"-"` Roles string `form:"roles" json:"roles"` }
UserCreateDto - binding user creation params
type UserEditDto ¶
type UserEditDto struct { Id int `uri:"id" json:"id" binding:"required"` Username string `form:"username" json:"username" binding:"required"` Mobile string `form:"mobile" json:"mobile"` Sex int `form:"sex" json:"sex"` Realname string `form:"realname" json:"realname"` DepartmentId int `form:"department_id" json:"department_id"` Faceicon string `json:"faceicon"` Email string `form:"email" json:"email"` Title string `form:"title" json:"title"` Status int `form:"status,default=1" json:"status"` Roles string `form:"roles" json:"roles"` }
UserCreateDto - binding user edition params
type UserEditPasswordDto ¶
type UserEditPasswordDto struct { Id int `uri:"id" json:"id" binding:"required"` Password string `form:"password" json:"password" binding:"required,pwdValidate"` }
UserEditPasswordDto - User update password only
type UserEditStatusDto ¶
type UserEditStatusDto struct { Id int `uri:"id" json:"id" binding:"required,min=1"` Status int `form:"status" json:"status" binding:"gte=0"` }
UserEditStatusDto - User update status only
type UserInDomainDto ¶
type UserInDomainDto struct {
Domain string `form:"domain" json:"domain" binding:"required"`
}
UserInDomainDto
type UserMoveDepartmentDto ¶
type UserOAuthCreateDto ¶
type UserOAuthCreateDto struct { Id int `form:"id" json:"id"` From int `form:"from" json:"from"` User_id int `form:"user_id" json:"user_id"` Openid string `form:"openid" json:"openid"` Unionid string `form:"unionid" json:"unionid"` Avatar string `form:"avatar" json:"avatar"` Extra string `form:"extra" json:"extra"` Name string `form:"name" json:"name"` CreateTime time.Time `type(datetime)" json:"create_time"` UpdateTime time.Time `type(datetime)" json:"-"` }
type UserSecretCreateDto ¶
type UserSecretCreateDto struct { Id int `json:"id"` User_id int `form:"user_id" json:"user_id"` Account_name string `form:"account_name" json:"account_name"` Secret string `form:"secret" json:"secret"` CreateTime time.Time `type(datetime)" json:"create_time"` UpdateTime time.Time `type(datetime)" json:"-"` }
type UserSecretRetDto ¶
type VerifyEmailDto ¶
type VerifyEmailDto struct {
Email string `form:"email" json:"email" valid:"required"` // email
}