Documentation ¶
Index ¶
- func ValidateBucketName(name string) error
- type Bucket
- type BucketListResponse
- type BucketResponse
- type ObjectStorageBucketsService
- func (svc *ObjectStorageBucketsService) Create(ctx context.Context, projectID, bucketName string) (err error)
- func (svc *ObjectStorageBucketsService) Delete(ctx context.Context, projectID, bucketName string) (err error)
- func (svc *ObjectStorageBucketsService) Get(ctx context.Context, projectID, bucketName string) (res BucketResponse, err error)
- func (svc *ObjectStorageBucketsService) List(ctx context.Context, projectID string) (res BucketListResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateBucketName ¶
ValidateBucketName validates a given bucket name
Types ¶
type Bucket ¶
type Bucket struct { Name string `json:"name"` Region string `json:"region"` URLPathStyle string `json:"urlPathStyle"` URLVirtualHostedStyle string `json:"urlVirtualHostedStyle"` }
Bucket holds all the bucket information
type BucketListResponse ¶
type BucketListResponse struct { Project string `json:"project"` Buckets []Bucket `json:"buckets"` }
BucketListResponse is a struct representation of stackit's object storage api response for a bucket list
type BucketResponse ¶
BucketResponse is a struct representation of stackit's object storage api response for a bucket
type ObjectStorageBucketsService ¶
ObjectStorageBucketsService is the service that handles CRUD functionality for SKE buckets
func New ¶
func New(c common.Client) *ObjectStorageBucketsService
New returns a new handler for the service
func (*ObjectStorageBucketsService) Create ¶
func (svc *ObjectStorageBucketsService) Create(ctx context.Context, projectID, bucketName string) (err error)
Create creates a new bucket See also https://api.stackit.schwarz/object-storage-service/openapi.v1.html#operation/create_bucket_v1_project__projectId__bucket__bucketName__post
func (*ObjectStorageBucketsService) Delete ¶
func (svc *ObjectStorageBucketsService) Delete(ctx context.Context, projectID, bucketName string) (err error)
Delete deletes a bucket See also https://api.stackit.schwarz/ske-service/openapi.v1.html#operation/SkeService_DeleteBucket
func (*ObjectStorageBucketsService) Get ¶
func (svc *ObjectStorageBucketsService) Get(ctx context.Context, projectID, bucketName string) (res BucketResponse, err error)
Get returns the a bucket by project ID and bucket name See also https://api.stackit.schwarz/object-storage-service/openapi.v1.html#operation/get_bucket_v1_project__projectId__bucket__bucketName__get
func (*ObjectStorageBucketsService) List ¶
func (svc *ObjectStorageBucketsService) List(ctx context.Context, projectID string) (res BucketListResponse, err error)
List returns the a list of buckets assigned to a project ID See also https://api.stackit.schwarz/object-storage-service/openapi.v1.html#operation/get_buckets_v1_project__projectId__buckets_get