object

package
v2.66.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanAndIndentJSON added in v2.62.0

func CleanAndIndentJSON(v any, prefix, indent string) ([]byte, error)

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

func FormatAccessKey(accessKey, argProjectID, defaultProjectID string) (formattedAccessKey string)

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 GetCommands() *core.Commands

func GetS3Endpoint added in v2.66.0

func GetS3Endpoint(
	ctx context.Context, region, customEndpoint string,
) (s3Endpoint string)

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

func GetS3UsePathStyle(ctx context.Context, usePathStyle string) (bool, error)

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 BucketGetResult struct {
	Size      *scw.Size
	NbObjects *int64
	NbParts   *int64
	// contains filtered or unexported fields
}

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

type S3Args added in v2.66.0

type S3Args struct {
	Region         scw.Region
	ProjectID      string
	S3Endpoint     string
	S3UsePathStyle string
}

S3Args holds the fields shared by every bucket-related arg struct. Required here for the WASM build.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL