bucket

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Overview

Package bucket provides functions to open gocloud buckets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWithConfig added in v0.10.0

func NewWithConfig(ctx context.Context, c *Config) (*blob.Bucket, error)

NewWithConfig opens a bucket based on the provided configuration. It defaults to using AWS SDK v2 via s3blob.OpenBucketV2 unless the URL field is specified, in which case it uses blob.OpenBucket.

Types

type Config

type Config struct {
	// URL specifies the connection string for a bucket as described in
	// https://gocloud.dev/howto/blob/. If provided, this URL will be used to
	// open the bucket directly.
	URL string

	// These fields are used for direct access to S3-compatible services when
	// the URL field is not specified. They provide a more granular
	// configuration using specific credentials and connection details.
	Endpoint  string
	Bucket    string
	AccessKey string
	SecretKey string
	Token     string
	Profile   string
	Region    string
	PathStyle bool
}

Jump to

Keyboard shortcuts

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