object_storage_clusters.go raw

   1  package linodego
   2  
   3  import (
   4  	"context"
   5  )
   6  
   7  // ObjectStorageCluster represents a linode object storage cluster object
   8  type ObjectStorageCluster struct {
   9  	ID               string `json:"id"`
  10  	Domain           string `json:"domain"`
  11  	Status           string `json:"status"`
  12  	Region           string `json:"region"`
  13  	StaticSiteDomain string `json:"static_site_domain"`
  14  }
  15  
  16  // ListObjectStorageClusters lists ObjectStorageClusters
  17  func (c *Client) ListObjectStorageClusters(ctx context.Context, opts *ListOptions) ([]ObjectStorageCluster, error) {
  18  	return getPaginatedResults[ObjectStorageCluster](ctx, c, "object-storage/clusters", opts)
  19  }
  20  
  21  // Deprecated: GetObjectStorageCluster uses a deprecated API endpoint.
  22  // GetObjectStorageCluster gets the template with the provided ID
  23  func (c *Client) GetObjectStorageCluster(ctx context.Context, clusterID string) (*ObjectStorageCluster, error) {
  24  	e := formatAPIPath("object-storage/clusters/%s", clusterID)
  25  	return doGETRequest[ObjectStorageCluster](ctx, c, e)
  26  }
  27