|
- package cdsapi
-
- import (
- "net/http"
-
- "gitlink.org.cn/cloudream/common/sdks"
- cdssdk "gitlink.org.cn/cloudream/common/sdks/storage"
- )
-
- const CacheMovePackagePath = "/cache/movePackage"
-
- type CacheMovePackageReq struct {
- UserID cdssdk.UserID `json:"userID"`
- PackageID cdssdk.PackageID `json:"packageID"`
- StorageID cdssdk.StorageID `json:"storageID"`
- }
-
- func (r *CacheMovePackageReq) MakeParam() *sdks.RequestParam {
- return sdks.MakeJSONParam(http.MethodPost, CacheMovePackagePath, r)
- }
-
- type CacheMovePackageResp struct{}
-
- func (r *CacheMovePackageResp) ParseResponse(resp *http.Response) error {
- return sdks.ParseCodeDataJSONResponse(resp, r)
- }
-
- func (c *Client) CacheMovePackage(req CacheMovePackageReq) (*CacheMovePackageResp, error) {
- return JSONAPI[*CacheMovePackageResp](c.cfg, http.DefaultClient, &req)
- }
|