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.

cache.go 826 B

1 year ago
1 year ago
123456789101112131415161718192021222324252627282930
  1. package cdsapi
  2. import (
  3. "net/http"
  4. "gitlink.org.cn/cloudream/common/sdks"
  5. cdssdk "gitlink.org.cn/cloudream/common/sdks/storage"
  6. )
  7. const CacheMovePackagePath = "/cache/movePackage"
  8. type CacheMovePackageReq struct {
  9. UserID cdssdk.UserID `json:"userID"`
  10. PackageID cdssdk.PackageID `json:"packageID"`
  11. StorageID cdssdk.StorageID `json:"storageID"`
  12. }
  13. func (r *CacheMovePackageReq) MakeParam() *sdks.RequestParam {
  14. return sdks.MakeJSONParam(http.MethodPost, CacheMovePackagePath, r)
  15. }
  16. type CacheMovePackageResp struct{}
  17. func (r *CacheMovePackageResp) ParseResponse(resp *http.Response) error {
  18. return sdks.ParseCodeDataJSONResponse(resp, r)
  19. }
  20. func (c *Client) CacheMovePackage(req CacheMovePackageReq) (*CacheMovePackageResp, error) {
  21. return JSONAPI(c.cfg, http.DefaultClient, &req, &CacheMovePackageResp{})
  22. }