|
- package api
-
- import (
- "net/http"
-
- "gitlink.org.cn/cloudream/common/sdks"
- )
-
- type ClusterService struct {
- *Client
- }
-
- func (c *Client) Cluster() *ClusterService {
- return &ClusterService{c}
- }
-
- var ClusterStatusPath = "/cluster/status"
-
- type ClusterStatus struct{}
-
- func (r *ClusterStatus) MakeParam() *sdks.RequestParam {
- return sdks.MakeJSONParam(http.MethodGet, ClusterStatusPath, r)
- }
-
- type ClusterStatusResp struct {
- }
-
- func (r *ClusterStatusResp) ParseResponse(resp *http.Response) error {
- return sdks.ParseCodeDataJSONResponse(resp, r)
- }
-
- func (c *ClusterService) Status(req ClusterStatus) (*ClusterStatusResp, error) {
- return JSONAPI(&c.cfg, c.httpCli, &req, &ClusterStatusResp{})
- }
|