Documentation
¶
Index ¶
- Constants
- func GetDocDtail(resource *embed.FS) gweb.HandlerFunc
- func GetDocs(resource *embed.FS) gweb.HandlerFunc
- func GetIssue(c *gweb.Context)
- func GetLatestVersion(c *gweb.Context)
- func GetSysDictMaps(c *gweb.Context)
- func GetSysDictOptions(c *gweb.Context)
- func GetSysDicts(c *gweb.Context)
- func GetSysDocContent(c *gweb.Context)
- func GetSysDocs(c *gweb.Context)
- func GetSysIssues(c *gweb.Context)
- func GetVersions(c *gweb.Context)
- func LogAppRequest(app *gweb.WebApp)
- func ReplyIssue(c *gweb.Context)
- func ReportIssue(c *gweb.Context)
- func SaveSysRequest(c *gweb.Context, name string)
- func SaveVersion(c *gweb.Context)
- func UseAuthView(app *gweb.WebApp)
- func UseDataDict(app *gweb.WebApp)
- func UseDoc(app *gweb.WebApp)
- func UseIssue(app *gweb.WebApp)
- func UseStaticDoc(app *gweb.WebApp, resource *embed.FS)
- func UseVersion(app *gweb.WebApp)
- type DocInfo
- type IssueStatus
- type JSONTags
- type SysDict
- type SysDictOption
- type SysDoc
- type SysIssue
- type SysRequest
- type SysVersion
- type SysViewAuth
- type SysViewElement
Constants ¶
View Source
const ( ViewMenu = "menu" // 菜单 ViewPage = "page" // 页面 ViewComponent = "component" // 组件 )
Variables ¶
This section is empty.
Functions ¶
func GetDocDtail ¶
func GetDocDtail(resource *embed.FS) gweb.HandlerFunc
func GetLatestVersion ¶
func GetSysDictMaps ¶
func GetSysDictOptions ¶ added in v1.0.3
func GetSysDicts ¶
func GetSysDocContent ¶ added in v1.0.3
func GetSysDocs ¶
func GetSysIssues ¶
func GetVersions ¶
func ReplyIssue ¶
func ReportIssue ¶
func SaveVersion ¶
func UseAuthView ¶
func UseDataDict ¶
func UseVersion ¶
Types ¶
type IssueStatus ¶
type IssueStatus int
const ( IssueStatusTodo IssueStatus = iota // 待处理 IssueStatusHandling // 处理中 IssueStatusDone // 已处理 IssueStatusClosed // 已关闭 )
type SysDict ¶
type SysDict struct { base.Model Name string `json:"name" gorm:"not null;unique;size:50;comment:名称"` Code string `json:"code" gorm:"not null;unique;size:50;comment:标识"` }
系统数据键
type SysDictOption ¶ added in v1.0.3
type SysDictOption struct { base.Model Value string `json:"value" gorm:"size:255;comment:值"` Sort int `json:"sort,omitempty" gorm:"not null;comment:排序"` Tags string `json:"tags,omitempty" gorm:"comment:标签"` // 可以像struct tags一样标记额外信息 DictID uint `json:"dict_id,omitempty" gorm:"not null;comment:数据字典"` Dict *SysDict `json:"dict,omitempty" gorm:"foreignKey:dict_id"` }
系统数据值
type SysDoc ¶
type SysDoc struct { base.Model Name string `json:"title" gorm:"not null;size:100;comment:名称"` FilePath string `json:"file_path" gorm:"size:255;comment:文件路径"` Usage string `json:"usage" gorm:"size:20;comment:用途"` Tags datatypes.JSONSlice[string] `json:"tags" gorm:"default:'[]'"` Size float64 `json:"size" gorm:"comment:文件大小"` UploaderID uint `json:"uploader_id" gorm:"comment:上传人"` Uploader *auth.User `json:"uploader" gorm:"foreignKey:uploader_id"` }
type SysIssue ¶
type SysIssue struct { base.Model Title string `json:"title" gorm:"not null;size:255;comment:标题"` Content string `json:"content" gorm:"not null;size:2000;comment:内容"` ReplyContent string `json:"reply_content" gorm:"size:2000;comment:回复"` CategoryID uint `json:"category_id" gorm:"comment:问题类型"` ReporterID uint `json:"reporter_id" gorm:"not null;comment:报告人"` Status IssueStatus `json:"status" gorm:"not null;comment:状态"` Category *SysDictOption `json:"category,omitempty" gorm:"foreignKey:category_id"` Reporter *auth.User `json:"reporter,omitempty" gorm:"foreignKey:reporter_id"` }
系统问题
type SysRequest ¶ added in v1.0.3
type SysRequest struct { ID string `json:"id" gorm:"primaryKey"` Host string `json:"host" gorm:"size:20;not null"` Method string `json:"method" gorm:"size:4;not null"` RoutePath string `json:"route_path" gorm:"size:50;not null"` RouteName string `json:"route_name" gorm:"size:100;comment:路由名称"` Data datatypes.JSON `json:"data"` RequestTime time.Time `json:"request_time" gorm:"not null"` UserID uint `json:"user"` }
type SysVersion ¶
type SysVersion struct { base.Model Version string `json:"version" gorm:"not null;size:10;comment:版本"` Summary string `json:"summary" gorm:"size:50;comment:名称"` Detail string `json:"detail" gorm:"size:500;comment:更新内容"` IsMajor bool `json:"is_major" gorm:"default:false;comment:是否主版本"` }
系统版本
type SysViewAuth ¶
type SysViewAuth struct { ElementKey string `json:"element_key" gorm:"primaryKey;comment:元素key"` RoleID uint `json:"role_id" gorm:"primaryKey;comment:角色ID"` AuthorizerID uint `json:"authorizer_id" gorm:"not null;comment:授权人ID"` Authorizer *auth.User `json:"authorizer,omitempty" gorm:"foreignKey:authorizer_id"` Role *auth.Role `json:"role,omitempty" gorm:"foreignKey:role_id"` Element *SysViewElement `json:"element,omitempty" gorm:"foreignKey:element_key"` }
type SysViewElement ¶
type SysViewElement struct { Key string `json:"key" gorm:"primaryKey;size:255;comment:组件Key"` Name string `json:"name" gorm:"not null;size:50;comment:名称"` RouteName string `json:"route_name" gorm:"not null;index;size:50;comment:前端路由名称"` ParentKey string `json:"parent_key,omitempty" gorm:"comment:父元素ID"` Desc string `json:"desc" gorm:"size:500;comment:描述"` Type string `json:"type" gorm:"not null;comment:类型ID"` Tooltip string `json:"tooltip" gorm:"comment:系统提示帮助"` CreateTime *time.Time `gorm:"not null;default:CURRENT_TIMESTAMP(3);comment:创建时间" json:"create_time,omitempty"` UpdateTime *time.Time `gorm:"default:NULL on update CURRENT_TIMESTAMP(3);comment:更新时间" json:"update_time,omitempty"` Parent *SysViewElement `json:"parent,omitempty" gorm:"foreignKey:parent_key"` }
视图元素
Click to show internal directories.
Click to hide internal directories.