v1

package
v0.0.0-...-14a2a1b Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppCardRechargeReq

type AppCardRechargeReq struct {
	g.Meta    `path:"/recharge" tags:"卡密管理" method:"post" summary:"以卡充卡"`
	CardCode  string `p:"cardCode"  v:"required#卡号不能为空"`
	CardCode2 string `p:"cardCode2"  v:"required#卡号不能为空"` // card2的时间加到card1上
	Timestamp int64  `p:"timestamp" v:"required#参数错误,时间不能为空"`
	Sign      string `p:"sign"   v:"required#参数签名错误"`
}

type AppCardRechargeRes

type AppCardRechargeRes struct {
	g.Meta    `mime:"application/json"`
	Expires   *gtime.Time `json:"expires"`
	ExpiresTs int64       `json:"expiresTs"`
}

type AppCardUnbindReq

type AppCardUnbindReq struct {
	g.Meta     `path:"/unbind" tags:"卡密管理" method:"post" summary:"卡密解绑"`
	CardCode   string `p:"cardCode"  v:"required#参数错误,卡密ID不能为空"`
	DeviceCode string `p:"deviceCode"  v:"required#参数错误,设备编号不能为空"`
	Timestamp  int64  `p:"timestamp" v:"required#参数错误,时间不能为空"`
	Sign       string `p:"sign"   v:"required#参数签名错误"`
}

type AppCardUnbindRes

type AppCardUnbindRes struct {
	g.Meta `mime:"application/json"`
	Row    int64 `json:"row"`
}

type CardAddReq

type CardAddReq struct {
	g.Meta      `path:"/add" tags:"卡密管理" method:"post" summary:"添加卡密"`
	SoftwareId  int64  `p:"softwareId"  v:"required#参数错误,软件ID不能为空"`
	CardType    int    `p:"cardType"  v:"required#参数错误,请选择卡密类型"`
	CardValue   int    `p:"cardValue"  v:"required#参数错误,请输入卡密面值"`
	UnbindCount int    `p:"unbindCount"  d:"5"`
	GenCount    int    `p:"genCount"  d:"1"`
	Comment     string `p:"comment"`
	Customize   int    `p:"customize"`
	KeyPrefix   string `p:"keyPrefix" v:"regex:[a-zA-Z]#卡密前缀只能是字母"`
	MultiOnline int    `p:"multiOnline"`
	IsReplace   int    `p:"isReplace"`
}

type CardAddRes

type CardAddRes struct {
	g.Meta `mime:"application/json"`
	List   *[]string `json:"list"`
}

type CardDelReq

type CardDelReq struct {
	g.Meta `path:"/del" tags:"卡密管理" method:"delete" summary:"删除卡密"`
	Id     int64 `p:"id"  v:"required#参数错误,ID不能为空"`
}

type CardDelRes

type CardDelRes struct {
	g.Meta `mime:"application/json"`
	Id     int64 `json:"id"`
}

type CardDownloadTemplateReq

type CardDownloadTemplateReq struct {
	g.Meta `path:"/download-template" tags:"卡密管理" method:"get" summary:"下载导入模板"`
}

type CardDownloadTemplateRes

type CardDownloadTemplateRes struct {
	g.Meta
}

type CardEditReq

type CardEditReq struct {
	g.Meta      `path:"/edit" tags:"卡密管理" method:"put" summary:"编辑卡密"`
	Id          int64       `p:"id"  v:"required#参数错误,卡密ID不能为空"`
	Customize   int         `p:"customize"`
	MultiOnline int         `p:"multiOnline"`
	IsReplace   int         `p:"isReplace"`
	ExpireTime  *gtime.Time `p:"expireTime"`
	Comment     string      `p:"comment"`
}

type CardEditRes

type CardEditRes struct {
	g.Meta `mime:"application/json"`
}

type CardFreezeCardReq

type CardFreezeCardReq struct {
	g.Meta `path:"/freeze" tags:"卡密管理" method:"put" summary:"冻结卡密"`
	Id     int64 `p:"id"  v:"required#参数错误,卡密ID不能为空"`
}

type CardFreezeCardRes

type CardFreezeCardRes struct {
	g.Meta `mime:"application/json"`
	Row    int `json:"row"`
}

type CardHeartbeatReq

type CardHeartbeatReq struct {
	g.Meta    `path:"/heartbeat" tags:"卡密验证" method:"post" summary:"心跳验证"`
	CardCode  string      `p:"cardCode"`
	SecretId  string      `p:"secretId"`
	Nonce     string      `p:"nonce"`
	Timestamp *gtime.Time `p:"timestamp"`
	Token     string      `p:"token"`
	Sign      string      `p:"sign"`
}

type CardHeartbeatRes

type CardHeartbeatRes struct {
	Expires         string `json:"expires"`
	ExpiresTs       int64  `json:"expiresTs"`
	ServerTimestamp int64  `json:"serverTimestamp"`
	Nonce           string `json:"nonce"`
	Sign            string `json:"sign"`
}

type CardImportReq

type CardImportReq struct {
	g.Meta `path:"/import" tags:"卡密管理" method:"post" summary:"导入卡密"`
	File   *ghttp.UploadFile `p:"file" type:"file"`
}

type CardImportRes

type CardImportRes struct {
	g.Meta `mime:"application/json"`
	Row    int64 `json:"row"`
}

type CardListReq

type CardListReq struct {
	g.Meta          `path:"/list" tags:"卡密管理" method:"get" summary:"卡密列表"`
	SoftwareId      int64       `p:"softwareId"`
	CardCode        string      `p:"cardCode"`
	BeginExpireTime *gtime.Time `p:"beginExpireTime"`
	EndExpireTime   *gtime.Time `p:"endExpireTime"`
	commonApi.PageReq
}

type CardListRes

type CardListRes struct {
	g.Meta `mime:"application/json"`
	Total  int                  `json:"total"`
	List   *[]CardListResEntity `json:"list"`
}

type CardListResEntity

type CardListResEntity struct {
	entity.VerifyCard
	SoftwareName string `json:"softwareName"`
}

type CardLoginReq

type CardLoginReq struct {
	g.Meta     `path:"/login" tags:"卡密验证" method:"post" summary:"卡密登录"`
	SecretId   string `p:"secretId"  v:"required#参数错误,secretId不能为空"`
	CardCode   string `p:"cardCode"  v:"required#参数错误,卡密不能为空"`
	DeviceCode string `p:"deviceCode" v:"required#参数错误,设备ID不能为空"`
	DeviceName string `p:"deviceName"`
	Nonce      string `p:"nonce"  v:"required#参数错误,Nonce不能为空"`
	Sign       string `p:"sign"  v:"required#参数错误,签名不能为空"`
}

type CardLoginRes

type CardLoginRes struct {
	g.Meta          `mime:"application/json"`
	CardType        string      `json:"cardType"`
	Expires         *gtime.Time `json:"expires"`
	ExpiresTs       int64       `json:"expiresTs"`
	Heartbeat       int         `json:"heartbeat"`
	Remark          string      `json:"remark"`
	ServerTimestamp string      `json:"serverTimestamp"`
	Token           string      `json:"token"`
	Version         VersionInfo `json:"version"`
}

type CardQuickRechargeReq

type CardQuickRechargeReq struct {
	g.Meta `path:"/quick/recharge" tags:"卡密管理" method:"put" summary:"卡密充值"`
	Id     int64 `p:"id"  v:"required#参数错误,卡密ID不能为空"`
}

type CardQuickRechargeRes

type CardQuickRechargeRes struct {
	g.Meta `mime:"application/json"`
}

type CardServerTimeReq

type CardServerTimeReq struct {
	g.Meta `path:"/server-time" tags:"卡密验证" method:"get" summary:"服务器时间"`
	Token  string `json:"token"`
}

type CardServerTimeRes

type CardServerTimeRes struct {
	ServerTime      string `json:"serverTime"`
	ServerTimestamp int64  `json:"serverTimestamp"`
}

type CardSessionListItem

type CardSessionListItem struct {
	entity.VerifyCardSession
	CardCode   string `json:"cardCode"`
	DeviceCode string `json:"deviceCode"`
	DeviceName string `json:"deviceName"`
}

type CardSessionListReq

type CardSessionListReq struct {
	g.Meta   `path:"/list" tags:"在线设备" method:"get" summary:"在线设备列表"`
	CardCode string `p:"cardCode"`
	commonApi.PageReq
}

type CardSessionListRes

type CardSessionListRes struct {
	g.Meta `mime:"application/json"`
	Total  int                    `json:"total"`
	List   *[]CardSessionListItem `json:"list"`
}

type CardUnbindAllReq

type CardUnbindAllReq struct {
	g.Meta `path:"/unbind-all" tags:"卡密管理" method:"put" summary:"卡密解绑"`
	Id     int64 `p:"id"  v:"required#参数错误,卡密ID不能为空"`
}

type CardUnbindAllRes

type CardUnbindAllRes struct {
	g.Meta `mime:"application/json"`
	Row    int `json:"row"`
}

type LatestVersionReq

type LatestVersionReq struct {
	g.Meta `path:"/:id" tags:"版本信息" method:"get" summary:"最新版本"`
	Id     string `p:"id"`
	Token  string `p:"token"`
}

type LatestVersionRes

type LatestVersionRes struct {
	g.Meta `mime:"application/json"`
	VersionRes
}

type OfflineCardSessionReq

type OfflineCardSessionReq struct {
	g.Meta `path:"/offline" tags:"在线设备" method:"post" summary:"强制设备下线"`
	Id     int64 `p:"id"`
}

type OfflineCardSessionRes

type OfflineCardSessionRes struct {
	g.Meta `mime:"application/json"`
}

type Software

type Software struct {
	entity.VerifySoftware
}

type SoftwareAddReq

type SoftwareAddReq struct {
	g.Meta `path:"/add" tags:"软件管理" method:"post" summary:"添加软件"`
	*SoftwareReq
}

type SoftwareAddRes

type SoftwareAddRes struct {
	g.Meta `mime:"application/json"`
}

type SoftwareDelReq

type SoftwareDelReq struct {
	g.Meta     `path:"/del" tags:"软件管理" method:"delete" summary:"删除软件"`
	SoftwareId int64 `p:"softwareId" v:"required#参数错误,id不能为空"`
}

type SoftwareDelRes

type SoftwareDelRes struct {
	Result string `json:"result"`
}

type SoftwareEditReq

type SoftwareEditReq struct {
	g.Meta `path:"/edit" tags:"软件管理" method:"put" summary:"编辑软件"`
	Id     int64 `p:"id" v:"required#参数错误,id不能为空"`
	*SoftwareReq
}

type SoftwareEditRes

type SoftwareEditRes struct {
	g.Meta `mime:"application/json"`
	Id     string `json:"id"`
}

type SoftwareGetReq

type SoftwareGetReq struct {
	g.Meta `path:"/:id/" tags:"软件管理" method:"get" summary:"查询软件"`
	Id     string `p:"id"`
}

type SoftwareGetRes

type SoftwareGetRes struct {
	*entity.VerifySoftware
}

type SoftwareListReq

type SoftwareListReq struct {
	g.Meta       `path:"/list" tags:"软件管理" method:"get" summary:"软件列表"`
	SoftwareName string `p:"softwareName"`
	commonApi.PageReq
}

type SoftwareListRes

type SoftwareListRes struct {
	g.Meta `mime:"application/json" example:"string"`
	Total  int        `json:"total"`
	List   []Software `json:"list"`
}

type SoftwareReq

type SoftwareReq struct {
	SoftwareName   string `p:"softwareName" v:"bail|required|length:1,30#|请输入软件名称|软件名称长度应该在 1 到 30 之间"` // 软件名称
	SoftwareStatus int    `p:"softwareStatus" d:"1"`                                                    // 软件状态
	CardLength     int    `p:"cardLength" v:"bail|required|min:8#|请输入密钥长度|密钥长度最少为8位" d:"10"`            // 密钥长度
	EncryptType    string `p:"encryptType"  d:"AES"`                                                    // 加密方式 AES RSA MD5
	KeyPrefix      string `p:"keyPrefix" v:"bail|length:1,5|regex:[a-zA-Z]#|密钥前缀长度不能超过5位|密钥前缀只能为大小写字母"` // 密钥前缀
	MultiOnline    int    `p:"multiOnline" d:"20"`                                                      // 设备上限
	IsReplace      int    `p:"isReplace" d:"0"`                                                         // 是否顶号登录 1 是 0 否
	Heartbeat      int    `p:"heartbeat" v:"bail|required#|心跳间隔不能为空" d:"5"`                             // 心跳间隔
	OpenTrial      int    `p:"openTrial" d:"0"`                                                         // 开启试用 1 是 0 否
	TrialCount     int    `p:"trialCount" d:"0"`                                                        // 试用次数
	TrialTime      int    `p:"trialTime" d:"0"`                                                         // 试用时间(分钟)
	TrialDuration  int    `p:"trialDuration" d:"0"`                                                     // 每次试用间隔
	Comment        string `p:"comment"`                                                                 // 软件备注
}

type VersionAddReq

type VersionAddReq struct {
	g.Meta        `path:"/add" tags:"版本管理" method:"post" summary:"添加版本"`
	SoftwareId    int64  `p:"softwareId"  v:"required#参数错误,软件ID不能为空"`
	IsPublish     int    `p:"isPublish"`
	VersionNumber string `p:"versionNumber"  v:"required#参数错误,版本号不能为空"`
	StoreType     int    `p:"storeType" v:"required#参数错误,存储类型不能为空"`
	Link          string `p:"link" v:"required#参数错误,下载链接不能为空"`
	Password      string `p:"password"`
	Comment       string `p:"comment"`
}

type VersionAddRes

type VersionAddRes struct {
	g.Meta `mime:"application/json"`
	AttId  int64 `json:"attId"`
}

type VersionDelReq

type VersionDelReq struct {
	g.Meta `path:"/del" tags:"版本管理" method:"delete" summary:"删除版本"`
	Id     int64 `p:"id"  v:"required#参数错误,版本ID不能为空"`
}

type VersionDelRes

type VersionDelRes struct {
	g.Meta `mime:"application/json"`
}

type VersionEditReq

type VersionEditReq struct {
	g.Meta        `path:"/edit" tags:"版本管理" method:"put" summary:"编辑版本"`
	Id            int64  `p:"idd"  v:"required#参数错误,版本ID不能为空"`
	IsPublish     int    `p:"isPublish"`
	VersionNumber string `p:"versionNumber"  v:"required#参数错误,版本号不能为空"`
	StoreType     int    `p:"storeType" v:"required#参数错误,存储类型不能为空"`
	Link          string `p:"link" v:"required#参数错误,下载链接不能为空"`
	Password      string `p:"password"`
	Comment       string `p:"comment"`
}

type VersionEditRes

type VersionEditRes struct {
	g.Meta `mime:"application/json"`
}

type VersionInfo

type VersionInfo struct {
	LatestVersionId     int64       `json:"latestVersionId"`
	LatestVersionNumber string      `json:"latestVersionNumber"`
	UpdatedAt           *gtime.Time `json:"updatedAt"`
	Comment             string      `json:"comment"`
}

type VersionListEntity

type VersionListEntity struct {
	Ver      *entity.VerifyVersion
	Att      *entity.VerifyAttachment
	Software *entity.VerifySoftware
}

type VersionListReq

type VersionListReq struct {
	g.Meta        `path:"/list" tags:"版本管理" method:"get" summary:"版本列表"`
	SoftwareId    int64  `p:"softwareId"`
	VersionNumber string `p:"versionNumber"`
	StoreType     int    `p:"storeType"`
	commonApi.PageReq
}

type VersionListRes

type VersionListRes struct {
	g.Meta `mime:"application/json"`
	Total  int                       `json:"total"`
	List   *[]map[string]interface{} `json:"list"`
}

type VersionReleaseReq

type VersionReleaseReq struct {
	g.Meta    `path:"/release" tags:"版本管理" method:"put" summary:"发布版本"`
	Id        int64 `p:"id"  v:"required#参数错误,版本ID不能为空"`
	IsPublish int   `p:"isPublish"   v:"required#参数错误"`
}

type VersionReleaseRes

type VersionReleaseRes struct {
	g.Meta `mime:"application/json"`
}

type VersionRes

type VersionRes struct {
	VersionNumber string      `json:"versionNumber"`
	Link          string      `json:"link"`
	FileName      string      `json:"fileName"`
	Status        int         `json:"status"`
	UpdatedAt     *gtime.Time `json:"updatedAt"`
	Comment       string      `json:"comment"`
}

Jump to

Keyboard shortcuts

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