Documentation ¶
Index ¶
- Variables
- func OrderByColumn(sortBy string, desc bool) interface{}
- func RequestShouldBindJSON(c *gin.Context, obj interface{}) error
- func ResponseErrorData(data interface{}, c *gin.Context)
- func ResponseErrorMessage(message string, c *gin.Context)
- func ResponseErrorMessageData(data interface{}, message string, c *gin.Context)
- func ResponseErrorMessageWithLog(message string, c *gin.Context)
- func ResponseSuccessData(data interface{}, c *gin.Context)
- func ResponseSuccessMessage(message string, c *gin.Context)
- func ResponseSuccessMessageData(data interface{}, message string, c *gin.Context)
- func ResponseSuccessMessageDataWithLog(data interface{}, message string, c *gin.Context)
- func ResponseSuccessMessageWithLog(message string, c *gin.Context)
- func Result(code int, data interface{}, message string, c *gin.Context)
- type ColumnList
- type GqaModelWithCreatedByAndUpdatedBy
- type Plugin
- type PluginModel
- type RequestAdd
- type RequestAddApi
- type RequestAddConfigBackend
- type RequestAddConfigFrontend
- type RequestAddDept
- type RequestAddDict
- type RequestAddMenu
- type RequestAddNotice
- type RequestAddRole
- type RequestAddTodo
- type RequestAddUser
- type RequestChangeNickname
- type RequestChangePassword
- type RequestDbInit
- type RequestDeptCode
- type RequestDeptUser
- type RequestDeptUserAdd
- type RequestEditRoleApi
- type RequestEditRoleApiDetail
- type RequestGetApiList
- type RequestGetConfigBackendList
- type RequestGetConfigFrontendList
- type RequestGetDeptList
- type RequestGetDictList
- type RequestGetGenPluginList
- type RequestGetLogLoginList
- type RequestGetLogOperationList
- type RequestGetMenuList
- type RequestGetNoticeList
- type RequestGetRoleList
- type RequestGetTodoList
- type RequestGetUserList
- type RequestGetUserOnlineList
- type RequestLogin
- type RequestPage
- type RequestPageAndSort
- type RequestQueryById
- type RequestQueryByUUID
- type RequestQueryByUsername
- type RequestRoleButton
- type RequestRoleCode
- type RequestRoleDeptDataPermission
- type RequestRoleMenu
- type RequestRoleMenuEdit
- type RequestRoleUser
- type RequestRoleUserAdd
- type RequestSort
- type Response
- type ResponseCaptcha
- type ResponseLogin
- type ResponsePage
- type ResponsePageWithParentId
- type SysApi
- type SysButton
- type SysConfigBackend
- type SysConfigFrontend
- type SysCron
- type SysDept
- type SysDeptUser
- type SysDict
- type SysGenPlugin
- type SysGenPluginList
- type SysJwtClaims
- type SysLogLogin
- type SysLogOperation
- type SysMenu
- type SysNotice
- type SysNoticeToUser
- type SysRole
- type SysRoleApi
- type SysRoleButton
- type SysRoleMenu
- type SysTodo
- type SysUser
- type SysUserOnline
- type SysUserRole
- type WsMessage
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //Clients = make(map[string]*websocket.Conn) Clients sync.Map BroadcastMsg = make(chan []byte, 100) )
Functions ¶
func OrderByColumn ¶
func RequestShouldBindJSON ¶
func ResponseErrorData ¶
func ResponseErrorMessage ¶
func ResponseSuccessData ¶
func ResponseSuccessMessage ¶
Types ¶
type ColumnList ¶
type PluginModel ¶
type PluginModel struct { ModelName string `json:"model_name"` WithGqaColumn bool `json:"with_gqa_column"` WithPublicList bool `json:"with_public_list"` WithDataPermission bool `json:"with_data_permission"` WithLogOperation bool `json:"with_log_operation"` ColumnList []ColumnList `json:"column_list"` }
type RequestAdd ¶
type RequestAddApi ¶
type RequestAddApi struct { RequestAdd ApiGroup string `json:"api_group"` ApiMethod string `json:"api_method"` ApiPath string `json:"api_path"` }
type RequestAddConfigBackend ¶
type RequestAddConfigBackend struct { RequestAdd ConfigItem string `json:"config_item"` ItemDefault string `json:"item_default"` ItemCustom string `json:"item_custom"` }
type RequestAddConfigFrontend ¶
type RequestAddConfigFrontend struct { RequestAdd ConfigItem string `json:"config_item"` ItemDefault string `json:"item_default"` ItemCustom string `json:"item_custom"` }
type RequestAddDept ¶
type RequestAddDept struct { RequestAdd ParentCode string `json:"parent_code"` DeptCode string `json:"dept_code"` DeptName string `json:"dept_name"` Leader string `json:"leader"` }
type RequestAddDict ¶
type RequestAddDict struct { RequestAdd ParentCode string `json:"parent_code"` DictCode string `json:"dict_code"` DictLabel string `json:"dict_label"` DictExt1 string `json:"dict_ext_1"` DictExt2 string `json:"dict_ext_2"` DictExt3 string `json:"dict_ext_3"` DictExt4 string `json:"dict_ext_4"` DictExt5 string `json:"dict_ext_5"` }
type RequestAddMenu ¶
type RequestAddMenu struct { RequestAdd ParentCode string `json:"parent_code"` Name string `json:"name"` Path string `json:"path"` Component string `json:"component"` Title string `json:"title"` Icon string `json:"icon"` Hidden string `json:"hidden"` KeepAlive string `json:"keep_alive"` IsLink string `json:"is_link"` }
type RequestAddNotice ¶
type RequestAddRole ¶
type RequestAddRole struct { RequestAdd RoleCode string `json:"role_code"` RoleName string `json:"role_name"` }
type RequestAddTodo ¶
type RequestAddTodo struct {
TodoDetail string `json:"todo_detail"`
}
type RequestAddUser ¶
type RequestChangeNickname ¶
type RequestChangeNickname struct {
Nickname string `json:"nickname" binding:"required"`
}
type RequestChangePassword ¶
type RequestDbInit ¶
type RequestDbInit struct { DbType string `json:"db_type" binding:"required"` DbHost string `json:"db_host" binding:"required"` DbPort string `json:"db_port" binding:"required"` DbSchema string `json:"db_schema" binding:"required"` DbUser string `json:"db_user" binding:"required"` DbPassword string `json:"db_password" binding:"required"` }
type RequestDeptCode ¶
type RequestDeptCode struct {
DeptCode string `json:"dept_code"`
}
type RequestDeptUser ¶
type RequestDeptUserAdd ¶
type RequestEditRoleApi ¶
type RequestEditRoleApi struct { RoleCode string `json:"role_code"` RoleApi []RequestEditRoleApiDetail `json:"role_api"` }
type RequestGetApiList ¶
type RequestGetApiList struct { RequestPageAndSort ApiGroup string `json:"api_group"` ApiMethod string `json:"api_method"` }
type RequestGetConfigBackendList ¶
type RequestGetConfigBackendList struct { RequestPageAndSort ConfigItem string `json:"config_item"` Memo string `json:"memo"` }
type RequestGetConfigFrontendList ¶
type RequestGetConfigFrontendList struct { RequestPageAndSort ConfigItem string `json:"config_item"` Memo string `` }
type RequestGetDeptList ¶
type RequestGetDeptList struct { RequestPageAndSort DeptCode string `json:"dept_code"` DeptName string `json:"dept_name"` }
type RequestGetDictList ¶
type RequestGetDictList struct { RequestPageAndSort ParentCode string `json:"parent_code"` DictCode string `json:"dict_code"` DictLabel string `json:"dict_label"` }
type RequestGetGenPluginList ¶
type RequestGetGenPluginList struct { RequestPageAndSort PluginSort uint `json:"plugin_sort"` PluginCode string `json:"plugin_code"` PluginName string `json:"plugin_name"` }
type RequestGetLogLoginList ¶
type RequestGetLogLoginList struct { RequestPageAndSort LoginUsername string `json:"login_username"` LoginSuccess string `json:"login_success"` }
type RequestGetLogOperationList ¶
type RequestGetLogOperationList struct { RequestPageAndSort OperationUsername string `json:"operation_username"` }
type RequestGetMenuList ¶
type RequestGetMenuList struct { RequestPageAndSort Path string `json:"path"` Title string `json:"title"` }
type RequestGetNoticeList ¶
type RequestGetRoleList ¶
type RequestGetRoleList struct { RequestPageAndSort RoleCode string `json:"role_code"` RoleName string `json:"role_name"` }
type RequestGetTodoList ¶
type RequestGetTodoList struct { RequestPageAndSort TodoStatus string `json:"todo_status"` }
type RequestGetUserList ¶
type RequestGetUserList struct { RequestPageAndSort DeptCode string `json:"dept_code"` Username string `json:"username"` RealName string `json:"real_name"` WithAdmin bool `json:"with_admin"` // 是否显示admin用户 }
type RequestGetUserOnlineList ¶
type RequestGetUserOnlineList struct { RequestPageAndSort Username string `json:"username"` }
type RequestLogin ¶
type RequestPage ¶
type RequestPageAndSort ¶
type RequestPageAndSort struct { RequestPage RequestSort }
type RequestQueryById ¶
type RequestQueryById struct {
Id uint `json:"id"`
}
type RequestQueryByUUID ¶
type RequestQueryByUsername ¶
type RequestQueryByUsername struct {
Username string `json:"username"`
}
type RequestRoleButton ¶
type RequestRoleCode ¶
type RequestRoleCode struct {
RoleCode string `json:"role_code"`
}
type RequestRoleMenu ¶
type RequestRoleMenuEdit ¶
type RequestRoleMenuEdit struct { RoleCode string `json:"role_code"` RoleMenu []RequestRoleMenu `json:"role_menu"` RoleButton []RequestRoleButton `json:"role_button"` DefaultPage string `json:"default_page"` }
type RequestRoleUser ¶
type RequestRoleUserAdd ¶
type RequestSort ¶
type ResponseCaptcha ¶
type ResponseLogin ¶
type ResponsePage ¶
type SysApi ¶
type SysApi struct { GqaModelWithCreatedByAndUpdatedBy ApiGroup string `json:"api_group" gorm:"comment:Api分组;index;not null;"` ApiMethod string `json:"api_method" gorm:"comment:请求方法;default:POST;index;not null;"` ApiPath string `json:"api_path" gorm:"comment:Api地址;index;not null;"` }
type SysConfigBackend ¶
type SysConfigBackend struct { GqaModelWithCreatedByAndUpdatedBy ConfigItem string `json:"config_item" gorm:"comment:配置项;not null;index;"` ItemDefault string `json:"item_default" gorm:"comment:默认值;not null;"` ItemCustom string `json:"item_custom" gorm:"comment:自定义值;"` }
type SysConfigFrontend ¶
type SysConfigFrontend struct { GqaModelWithCreatedByAndUpdatedBy ConfigItem string `json:"config_item" gorm:"comment:配置项;not null;index;"` ItemDefault string `json:"item_default" gorm:"comment:默认值;not null;"` ItemCustom string `json:"item_custom" gorm:"comment:自定义值;"` }
type SysDept ¶
type SysDept struct { GqaModelWithCreatedByAndUpdatedBy //ParentCode <==> DeptCode ParentCode string `json:"parent_code" gorm:"comment:父部门DeptCode;index;"` DeptCode string `json:"dept_code" gorm:"comment:部门编码;not null;uniqueIndex;"` DeptName string `json:"dept_name" gorm:"comment:部门名称;not null;"` Leader string `json:"leader" gorm:"comment:部门负责人username;"` LeaderUser SysUser `json:"leader_user" gorm:"comment:部门负责人;foreignKey:Leader;references:Username"` Staff []SysUser `` /* 146-byte string literal not displayed */ Children []SysDept `json:"children" gorm:"foreignKey:ParentCode;references:DeptCode"` }
type SysDeptUser ¶
type SysDict ¶
type SysDict struct { GqaModelWithCreatedByAndUpdatedBy //ParentCode <==> DictCode ParentCode string `json:"parent_code" gorm:"comment:父字典编码;index"` DictCode string `json:"dict_code" gorm:"comment:字典编码;not null;uniqueIndex;"` DictLabel string `json:"dict_label" gorm:"comment:字典名称;not null;"` DictExt1 string `json:"dict_ext_1" gorm:"comment:字典扩展项1;"` DictExt2 string `json:"dict_ext_2" gorm:"comment:字典扩展项2;"` DictExt3 string `json:"dict_ext_3" gorm:"comment:字典扩展项3;"` DictExt4 string `json:"dict_ext_4" gorm:"comment:字典扩展项4;"` DictExt5 string `json:"dict_ext_5" gorm:"comment:字典扩展项5;"` Children []SysDict `json:"children" gorm:"foreignKey:ParentCode;references:DictCode"` }
type SysGenPlugin ¶
type SysGenPlugin struct { PluginSort uint `json:"plugin_sort"` PluginCode string `json:"plugin_code"` PluginName string `json:"plugin_name"` PluginModel []PluginModel `json:"plugin_model"` }
type SysGenPluginList ¶
type SysGenPluginList struct { GqaModelWithCreatedByAndUpdatedBy PluginSort uint `json:"plugin_sort" gorm:"comment:插件排序"` PluginCode string `json:"plugin_code" gorm:"comment:插件编码;index"` PluginName string `json:"plugin_name" gorm:"comment:插件名称;"` PluginFile string `json:"plugin_file" gorm:"comment:插件位置"` }
type SysJwtClaims ¶
type SysJwtClaims struct { Username string `json:"username"` RefreshAt int64 `json:"refresh_at"` jwt.StandardClaims }
type SysLogLogin ¶
type SysLogLogin struct { GqaModelWithCreatedByAndUpdatedBy LoginUsername string `json:"login_username" gorm:"comment:登录用户名;index"` LoginIp string `json:"login_ip" gorm:"comment:登录IP;index"` LoginBrowser string `json:"login_browser" gorm:"comment:登录浏览器;"` LoginOs string `json:"login_os" gorm:"comment:登录操作系统;"` LoginPlatform string `json:"login_platform" gorm:"comment:登录平台;"` LoginSuccess string `json:"login_success" gorm:"是否登录成功;index"` }
type SysLogOperation ¶
type SysLogOperation struct { GqaModelWithCreatedByAndUpdatedBy OperationUsername string `json:"operation_username" gorm:"comment:请求用户名;index"` OperationIp string `json:"operation_ip" gorm:"comment:请求IP;"` OperationMethod string `json:"operation_method" gorm:"comment:请求方法"` OperationApi string `json:"operation_api" gorm:"comment:请求Api;"` OperationStatus int `json:"operation_status" gorm:"comment:请求状态;"` OperationBody string `json:"operation_body" gorm:"comment:body;type:text;"` }
type SysMenu ¶
type SysMenu struct { GqaModelWithCreatedByAndUpdatedBy //ParentCode <==> Name ParentCode string `json:"parent_code" gorm:"comment:父菜单Name;index;"` Name string `json:"name" gorm:"comment:菜单Name;not null;unique;index;"` Path string `json:"path" gorm:"comment:菜单地址;"` Component string `json:"component" gorm:"comment:前端组件;"` Redirect string `json:"redirect" gorm:"comment:重定向地址;"` Title string `json:"title" gorm:"comment:菜单名称;"` Icon string `json:"icon" gorm:"comment:菜单图标;"` Hidden string `json:"hidden" gorm:"comment:是否在列表隐藏;default:yesNo_no;"` KeepAlive string `json:"keep_alive" gorm:"comment:是否缓存;default:yesNo_no;"` IsLink string `json:"is_link" gorm:"comment:是否外链;default:yesNo_no;"` Role []SysRole `json:"role" gorm:"many2many:sys_role_menu;"` Children []SysMenu `json:"children" gorm:"foreignKey:ParentCode;references:Name"` Button []SysButton `json:"button" gorm:"foreignKey:MenuName;references:Name"` }
type SysNotice ¶
type SysNotice struct { GqaModelWithCreatedByAndUpdatedBy NoticeId uuid.UUID `json:"notice_id" gorm:"comment:消息ID;index;not null"` NoticeTitle string `json:"notice_title" gorm:"comment:消息题目;index;"` NoticeContent string `json:"notice_content" gorm:"comment:消息内容;type:text;"` NoticeType string `json:"notice_type" gorm:"comment:消息类型;index;"` NoticeSent string `json:"notice_sent" gorm:"comment:已经发送;default:yesNo_no;index;"` NoticeToUserType string `json:"notice_to_user_type" gorm:"comment:接收用户范围;not null;"` NoticeToUser []SysNoticeToUser `json:"notice_to_user" gorm:"foreignKey:NoticeId;references:NoticeId"` }
type SysNoticeToUser ¶
type SysRole ¶
type SysRole struct { GqaModelWithCreatedByAndUpdatedBy RoleCode string `json:"role_code" gorm:"comment:角色编码;not null;uniqueIndex;"` RoleName string `json:"role_name" gorm:"comment:角色名称;not null;index;"` DeptDataPermissionType string `json:"dept_data_permission_type" gorm:"comment:部门数据权限分类;not null;default:deptDataPermissionType_user;"` DeptDataPermissionCustom string `json:"dept_data_permission_custom" gorm:"comment:自定义部门数据权限;type:text;"` User []SysUser `` /* 145-byte string literal not displayed */ Menu []SysMenu `` /* 137-byte string literal not displayed */ Button []SysButton `` /* 155-byte string literal not displayed */ DefaultPage string `json:"default_page" gorm:"comment:默认首页;default:dashboard"` DefaultPageMenu SysMenu `json:"default_page_menu" gorm:"foreignKey:DefaultPage;references:Name"` }
type SysRoleApi ¶
type SysRoleApi struct { RoleCode string `json:"role_code" gorm:"comment:角色编码;index;not null;"` ApiGroup string `json:"api_group" gorm:"comment:Api分组;index;not null;"` ApiMethod string `json:"api_method" gorm:"comment:请求方法;default:POST;index;not null;"` ApiPath string `json:"api_path" gorm:"comment:Api地址;index;not null;"` }
type SysRoleButton ¶
type SysRoleMenu ¶
type SysTodo ¶
type SysTodo struct { GqaModelWithCreatedByAndUpdatedBy TodoDetail string `json:"todo_detail" gorm:"comment:内容;type:text;"` TodoStatus string `json:"todo_status" gorm:"comment:状态;default:yesNo_no;index;"` }
type SysUser ¶
type SysUser struct { GqaModelWithCreatedByAndUpdatedBy Username string `json:"username" gorm:"comment:用户名;not null;uniqueIndex;"` Nickname string `json:"nickname" gorm:"comment:用户昵称;"` RealName string `json:"real_name" gorm:"comment:真实姓名;"` Password string `json:"-" gorm:"comment:用户密码;"` Avatar string `json:"avatar" gorm:"comment:头像"` Gender string `json:"gender" gorm:"comment:性别;default:gender_unknown;"` Mobile string `json:"mobile" gorm:"comment:手机号;"` Email string `json:"email" gorm:"comment:邮箱;"` Role []SysRole `` /* 145-byte string literal not displayed */ Dept []SysDept `` /* 145-byte string literal not displayed */ }
type SysUserOnline ¶
type SysUserRole ¶
Source Files ¶
- api.go
- button.go
- captcha.go
- configbackend.go
- configfrontend.go
- cron.go
- db.go
- dept.go
- deptuser.go
- dict.go
- genplugin.go
- log.go
- login.go
- menu.go
- notice.go
- noticetouser.go
- plugin.go
- request.go
- response.go
- role.go
- roleapi.go
- rolebutton.go
- rolemenu.go
- todo.go
- user.go
- useronline.go
- userrole.go
- websocket.go
Click to show internal directories.
Click to hide internal directories.