You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

system.go 800 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package api
  2. import (
  3. "net/http"
  4. "gitlink.org.cn/cloudream/common/sdks"
  5. jcstypes "gitlink.org.cn/cloudream/jcs-pub/common/types"
  6. )
  7. type SystemService struct {
  8. *Client
  9. }
  10. func (c *Client) System() *SystemService {
  11. return &SystemService{c}
  12. }
  13. const SystemStatusPath = "/system/status"
  14. type SystemStatus struct {
  15. }
  16. func (r *SystemStatus) MakeParam() *sdks.RequestParam {
  17. return sdks.MakeQueryParam(http.MethodGet, SystemStatusPath, r)
  18. }
  19. type SystemStatusResp struct {
  20. SpeedStats jcstypes.SpeedStatsStatus `json:"speedStats"`
  21. }
  22. func (r *SystemStatusResp) ParseResponse(resp *http.Response) error {
  23. return sdks.ParseCodeDataJSONResponse(resp, r)
  24. }
  25. func (c *SystemService) Status(req SystemStatus) (*SystemStatusResp, error) {
  26. return JSONAPI(&c.cfg, c.httpCli, &req, &SystemStatusResp{})
  27. }

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。