修改证书排序

修改插件
pull/236/head
v-me-50 2025-06-17 18:24:04 +08:00
parent 8e2e4918eb
commit b9f457e7ba
3 changed files with 19 additions and 7 deletions

View File

@ -37,10 +37,10 @@ func GetList(search string, p, limit int64) ([]map[string]any, int, error) {
if search != "" { if search != "" {
count, err = s.Where("domains like ?", []interface{}{"%" + search + "%"}).Count() count, err = s.Where("domains like ?", []interface{}{"%" + search + "%"}).Count()
data, err = s.Where("domains like ?", []interface{}{"%" + search + "%"}).Limit(limits).Order("create_time", "desc").Select() data, err = s.Where("domains like ?", []interface{}{"%" + search + "%"}).Limit(limits).Order("end_time", "esc").Select()
} else { } else {
count, err = s.Count() count, err = s.Count()
data, err = s.Order("create_time", "desc").Limit(limits).Select() data, err = s.Order("end_time", "esc").Limit(limits).Select()
} }
if err != nil { if err != nil {
return data, 0, err return data, 0, err

View File

@ -19,8 +19,9 @@ var (
) )
type ActionInfo struct { type ActionInfo struct {
Name string `json:"name"` Name string `json:"name"`
Description string `json:"description"` Description string `json:"description"`
Params map[string]any `json:"params,omitempty"` // 可选参数
} }
type PluginMetadata struct { type PluginMetadata struct {

View File

@ -12,8 +12,9 @@ import (
) )
type ActionInfo struct { type ActionInfo struct {
Name string `json:"name"` Name string `json:"name"`
Description string `json:"description"` Description string `json:"description"`
Params map[string]any `json:"params,omitempty"`
} }
type Request struct { type Request struct {
@ -32,8 +33,18 @@ var pluginMeta = map[string]interface{}{
"description": "部署到多吉云", "description": "部署到多吉云",
"version": "1.0.0", "version": "1.0.0",
"author": "主包", "author": "主包",
"config": map[string]interface{}{
"access_key": "多吉云 AccessKey",
"secret_key": "多吉云 SecretKey",
},
"actions": []ActionInfo{ "actions": []ActionInfo{
{Name: "cdn", Description: "部署到多吉云cdn"}, {
Name: "cdn",
Description: "部署到多吉云cdn",
Params: map[string]any{
"domain": "CDN 域名",
},
},
}, },
} }