Documentation
¶
Index ¶
- 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 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 DataDict
- type DataDictOption
- type DocInfo
- type IssueStatus
- type JSONTags
- type SysDoc
- type SysIssue
- type SysRequest
- type SysVersion
Constants ¶
This section is empty.
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 UseDataDict ¶
func UseVersion ¶
Types ¶
type DataDict ¶ added in v1.0.9
type DataDict struct {
gweb.Model
Name string `json:"name" gorm:"not null;unique;size:50;comment:名称"`
Code string `json:"code" gorm:"not null;unique;size:50;comment:标识"`
Options []DataDictOption `json:"options,omitempty" gorm:"foreignkey:dict_id"`
}
数据字典
type DataDictOption ¶ added in v1.0.9
type DataDictOption struct {
gweb.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:数据字典"`
BkgColor string `gorm:"size:15" json:"bkg_color,omitempty"`
ForeColor string `gorm:"size:15" json:"fore_color,omitempty"`
Dict *DataDict `json:"dict,omitempty" gorm:"foreignKey:dict_id"`
}
数据字典值
type IssueStatus ¶
type IssueStatus int
const ( IssueStatusTodo IssueStatus = iota // 待处理 IssueStatusHandling // 处理中 IssueStatusDone // 已处理 IssueStatusClosed // 已关闭 )
type SysDoc ¶
type SysDoc struct {
gweb.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:用途"`
Keywords datatypes.JSONSlice[string] `json:"keywords" 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 {
gweb.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 *DataDictOption `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"`
Requested_at time.Time `json:"requested_at" gorm:"not null"`
UserID uint `json:"user_id"`
User *auth.User `json:"user,omitempty" gorm:"foreignKey:user_id"`
}
type SysVersion ¶
type SysVersion struct {
gweb.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:是否主版本"`
}
系统版本
Click to show internal directories.
Click to hide internal directories.