Documentation ¶
Index ¶
- Variables
- func CreateLoginLog(c *gin.Context, html string, t uint8)
- func CreateSequence(temps []MacroSequence) (macroText []string, maxTime int)
- func GetApiByID(id string) (simpleApi database.SimpleApiItem, err error)
- func GetApiByParentID(tableType string, parentID string) (interface{}, error)
- func GetApiDetailUrlByID(tableType string, name string) (url string)
- func GetApiListBySearchText(s string) (simpleApis []database.SearchApiItem, err error)
- func GetApiTypeByTableType(tbType string) (t uint8)
- func GetTbTypeByApiType(t uint8) (tbType string)
- func IsNotFound(err error) bool
- func Return(c *gin.Context, code int32, resp interface{})
- func ReturnPage(c *gin.Context, code int32, pageNo int64, pageSize int64, resp interface{})
- func UpdateOrCreateLog(ip string, method string, t uint8) error
- type Api
- type ApiForGet
- type ChartData
- type LoginForGet
- type MacroSequence
- type QueryFilter
- type UnVerifyApi
Constants ¶
This section is empty.
Variables ¶
View Source
var DbConn *gorm.DB
Functions ¶
func CreateSequence ¶
func CreateSequence(temps []MacroSequence) (macroText []string, maxTime int)
func GetApiByParentID ¶
获取项目的子项目
func GetApiDetailUrlByID ¶
func GetApiListBySearchText ¶
func GetApiListBySearchText(s string) (simpleApis []database.SearchApiItem, err error)
func GetApiTypeByTableType ¶
转换前端的tableType为api类型
func GetTbTypeByApiType ¶
func IsNotFound ¶
func ReturnPage ¶
Types ¶
type Api ¶
type Api struct { ID int `json:"id" db:"id"` ParentID int `json:"parentID" db:"parent_id"` Name string `json:"name" db:"name"` NameCn string `json:"nameCn" db:"name_cn"` Desc string `json:"desc" db:"desc"` Enabled int `json:"enabled" db:"enabled"` CreateTime string `json:"createTime" db:"create_time"` UpdateTime string `json:"updateTime" db:"update_time"` }
type LoginForGet ¶
type MacroSequence ¶
type MacroSequence struct { // 名称 SkillName string `json:"skillName"` // 优先级 Level int `json:"level"` // 冷却时间(秒*100) Cooldown int `json:"cooldown"` // 剩余时间 CDTime int `json:"-"` }
快速创建
type QueryFilter ¶
type QueryFilter struct { QueryString string QueryParams []interface{} }
func (*QueryFilter) FilterParams ¶
func (query *QueryFilter) FilterParams(fieldName string, fieldValue interface{})
type UnVerifyApi ¶
type UnVerifyApi struct { ApiID int `json:"apiID" db:"api_id"` Type string `json:"type" db:"type"` Name string `json:"name" db:"name"` NameCn string `json:"nameCn" db:"name_cn"` Desc string `json:"desc" db:"desc"` InfoDesc string `json:"infoDesc" db:"info_desc"` CreateTime string `json:"createTime" db:"create_time"` }
Click to show internal directories.
Click to hide internal directories.