2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

feat: 实现应用expr依赖判断

This commit is contained in:
耗子
2024-09-28 11:07:25 +08:00
parent 2fc19dd97e
commit af8ef1abc8
5 changed files with 50 additions and 15 deletions

25
pkg/api/acme.go Normal file
View File

@@ -0,0 +1,25 @@
package api
import "fmt"
type EAB struct {
KeyID string `json:"key_id"`
MacKey string `json:"mac_key"`
}
func (r *API) GoogleEAB() (*EAB, error) {
resp, err := r.client.R().SetResult(&Response{}).Get("/acme/googleEAB")
if err != nil {
return nil, err
}
if !resp.IsSuccess() {
return nil, fmt.Errorf("failed to get google eab: %s", resp.String())
}
eab, err := getResponseData[EAB](resp)
if err != nil {
return nil, err
}
return eab, nil
}

View File

@@ -13,8 +13,7 @@ type App struct {
Name string `json:"name"`
Description string `json:"description"`
Categories []string `json:"categories"`
Requires []string `json:"requires"`
Excludes []string `json:"excludes"`
Depends string `json:"depends"`
Versions []struct {
Version string `json:"version"`
Install string `json:"install"`