mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 07:57:21 +08:00
feat: 实现应用expr依赖判断
This commit is contained in:
25
pkg/api/acme.go
Normal file
25
pkg/api/acme.go
Normal 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
|
||||
}
|
||||
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user