modules

package
v0.0.0-...-ac56343 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DbConn *gorm.DB

Functions

func CreateLoginLog

func CreateLoginLog(c *gin.Context, html string, t uint8)

func CreateSequence

func CreateSequence(temps []MacroSequence) (macroText []string, maxTime int)

func GetApiByID

func GetApiByID(id string) (simpleApi database.SimpleApiItem, err error)

获取详情

func GetApiByParentID

func GetApiByParentID(tableType string, parentID string) (interface{}, error)

获取项目的子项目

func GetApiDetailUrlByID

func GetApiDetailUrlByID(tableType string, name string) (url string)

func GetApiListBySearchText

func GetApiListBySearchText(s string) (simpleApis []database.SearchApiItem, err error)

func GetApiTypeByTableType

func GetApiTypeByTableType(tbType string) (t uint8)

转换前端的tableType为api类型

func GetTbTypeByApiType

func GetTbTypeByApiType(t uint8) (tbType string)

func IsNotFound

func IsNotFound(err error) bool

func Return

func Return(c *gin.Context, code int32, resp interface{})

func ReturnPage

func ReturnPage(c *gin.Context, code int32, pageNo int64, pageSize int64, resp interface{})

func UpdateOrCreateLog

func UpdateOrCreateLog(ip string, method string, t uint8) error

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 ApiForGet

type ApiForGet struct {
	ID     int    `json:"id" db:"id"`
	Name   string `json:"name" db:"name"`
	NameCn string `json:"nameCn" db:"name_cn"`
	Desc   string `json:"desc" db:"desc"`
}

type ChartData

type ChartData struct {
	Name string `json:"name"`
	Data []int  `json:"data"`
}

type LoginForGet

type LoginForGet struct {
	ID        int    `json:"id" db:"id"`
	IP        string `json:"ip" db:"ip"`
	Method    string `json:"method" db:"method"`
	LoginDate string `json:"loginDate" db:"login_date"`
	Count     int    `json:"count" db:"count"`
}

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"`
}

Jump to

Keyboard shortcuts

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