Documentation
¶
Index ¶
- func CleanAndIndentJSON(v any, prefix, indent string) ([]byte, error)
- func FormatAccessKey(accessKey, argProjectID, defaultProjectID string) (formattedAccessKey string)
- func GetCommands() *core.Commands
- func GetS3Endpoint(ctx context.Context, region, customEndpoint string) (s3Endpoint string)
- func GetS3UsePathStyle(ctx context.Context, usePathStyle string) (bool, error)
- type BucketGetResult
- type BucketResponse
- type CustomS3ACLGrant
- type FetchBuckets
- type S3Args
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanAndIndentJSON ¶ added in v2.62.0
CleanAndIndentJSON takes any struct or data, marshals it, strips all top-level and nested "null" fields, and returns formatted JSON.
func FormatAccessKey ¶ added in v2.61.0
FormatAccessKey formats the access key to the <KEY>@<PROJECT_ID> format, overriding the already present project ID with the "project-id" argument if present.
func GetCommands ¶
func GetS3Endpoint ¶ added in v2.66.0
GetS3Endpoint retrieves the S3 API URL according to various configuration variables. The priority is following this pattern: - CLI arg (parameter of this function) - SCW Environment variable - AWS configuration - Profile field value - Default value, built with the provided region
func GetS3UsePathStyle ¶ added in v2.66.0
GetS3UsePathStyle retrieves the S3UsePathStyle flag value from various configuration variables. The priority is following this pattern: - CLI arg (parameter of this function) - SCW Environment variable - Profile field value
Types ¶
type BucketGetResult ¶ added in v2.33.0
type BucketResponse ¶ added in v2.33.0
type BucketResponse struct {
SuccessResult *core.SuccessResult
BucketInfo *bucketInfo
}
type CustomS3ACLGrant ¶ added in v2.33.0
type CustomS3ACLGrant struct {
Grantee *string
Permission types.Permission
}
type FetchBuckets ¶ added in v2.63.0
type FetchBuckets struct{}
func (*FetchBuckets) Fetch ¶ added in v2.63.0
func (f *FetchBuckets) Fetch( ctx context.Context, region scw.Region, projectID string, ) ([]fetch.ResourceResult, error)
Fetch fetches all object storage buckets in a given region.
func (*FetchBuckets) LocalityType ¶ added in v2.63.0
func (f *FetchBuckets) LocalityType() fetch.LocalityType
func (*FetchBuckets) Namespace ¶ added in v2.63.0
func (f *FetchBuckets) Namespace() string
func (*FetchBuckets) Resource ¶ added in v2.63.0
func (f *FetchBuckets) Resource() string