object_storage.go raw

   1  package linodego
   2  
   3  import (
   4  	"context"
   5  )
   6  
   7  // ObjectStorageTransfer is an object matching the response of object-storage/transfer
   8  type ObjectStorageTransfer struct {
   9  	AmmountUsed int `json:"used"`
  10  }
  11  
  12  // CancelObjectStorage cancels and removes all object storage from the Account
  13  func (c *Client) CancelObjectStorage(ctx context.Context) error {
  14  	return doPOSTRequestNoRequestResponseBody(ctx, c, "object-storage/cancel")
  15  }
  16  
  17  // GetObjectStorageTransfer returns the amount of outbound data transferred used by the Account
  18  func (c *Client) GetObjectStorageTransfer(ctx context.Context) (*ObjectStorageTransfer, error) {
  19  	return doGETRequest[ObjectStorageTransfer](ctx, c, "object-storage/transfer")
  20  }
  21