system

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2025 License: MIT Imports: 11 Imported by: 0

README

系统请求记录

用于对系统请求进行记录,记录的内容包括

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDocDtail

func GetDocDtail(resource *embed.FS) gweb.HandlerFunc

func GetDocs

func GetDocs(resource *embed.FS) gweb.HandlerFunc

func GetIssue

func GetIssue(c *gweb.Context)

func GetLatestVersion

func GetLatestVersion(c *gweb.Context)

func GetSysDictMaps

func GetSysDictMaps(c *gweb.Context)

func GetSysDictOptions added in v1.0.3

func GetSysDictOptions(c *gweb.Context)

func GetSysDicts

func GetSysDicts(c *gweb.Context)

func GetSysDocContent added in v1.0.3

func GetSysDocContent(c *gweb.Context)

func GetSysDocs

func GetSysDocs(c *gweb.Context)

func GetSysIssues

func GetSysIssues(c *gweb.Context)

func GetVersions

func GetVersions(c *gweb.Context)

func LogAppRequest

func LogAppRequest(app *gweb.WebApp)

记录系统请求

func ReplyIssue

func ReplyIssue(c *gweb.Context)

func ReportIssue

func ReportIssue(c *gweb.Context)

func SaveSysRequest added in v1.0.4

func SaveSysRequest(c *gweb.Context, name string)

保存请求数据

func SaveVersion

func SaveVersion(c *gweb.Context)

func UseDataDict

func UseDataDict(app *gweb.WebApp)

func UseDoc

func UseDoc(app *gweb.WebApp)

UseStaticDoc 集成静态文档功能

func UseIssue

func UseIssue(app *gweb.WebApp)

func UseStaticDoc

func UseStaticDoc(app *gweb.WebApp, resource *embed.FS)

UseStaticDoc 集成静态文档功能

func UseVersion

func UseVersion(app *gweb.WebApp)

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 DocInfo

type DocInfo struct {
}

type IssueStatus

type IssueStatus int
const (
	IssueStatusTodo     IssueStatus = iota // 待处理
	IssueStatusHandling                    // 处理中
	IssueStatusDone                        // 已处理
	IssueStatusClosed                      // 已关闭
)

type JSONTags

type JSONTags []string

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:是否主版本"`
}

系统版本

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL