mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:47:20 +08:00
26 lines
462 B
Go
26 lines
462 B
Go
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
|
|
}
|