blob

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package blob provides an interface for interacting with blob storage.

Index

Constants

View Source
const (
	// AccountParam is the AWS access key ID.
	AccountParam = "AWS_ACCESS_KEY_ID"
	// SecretParam is the AWS secret access key.
	SecretParam = "AWS_SECRET_ACCESS_KEY"
	// TokenParam is the AWS session token.
	TokenParam = "AWS_SESSION_TOKEN"
	// EndPointParam is the AWS endpoint.
	EndPointParam = "AWS_ENDPOINT"
	// RegionParam is the AWS region.
	RegionParam = "AWS_REGION"
	// UsePathStyleParam is the AWS use path style.
	UsePathStyleParam = "AWS_USE_PATH_STYLE"
	// SkipChecksum is the AWS skip checksum.
	SkipChecksum = "AWS_SKIP_CHECKSUM"
	// SkipTLSVerify is the AWS skip TLS verify.
	SkipTLSVerify = "AWS_SKIP_TLS_VERIFY"
	// AuthParam tells CockroachDB how to authenticate with the storage provider.
	AuthParam = "AUTH"

	// DefaultRegion is the default AWS region.
	DefaultRegion = "aws-global"
	// AuthImplicit tells CockroachDB to use the node's own environment-based
	// credentials (e.g. an IAM instance role) instead of expecting them in the URL.
	AuthImplicit = "implicit"
)

Variables

View Source
var (
	// ObfuscatedParams lists the parameters that should be obfuscated.
	ObfuscatedParams = []string{SecretParam, TokenParam}
	// Obfuscated is the value used to obfuscate sensitive parameters.
	Obfuscated = "******"
)

ValidParams lists the valid parameters for the S3 object storage.

Functions

This section is empty.

Types

type Params

type Params map[string]string

Params represents the parameters to be set for a destination to perform a backup/restore.

func (Params) Iter

func (p Params) Iter() iter.Seq2[string, string]

Iter returns an iterator over the parameters sorted by key.

type Storage

type Storage interface {
	// Params returns a copy of the params.
	Params() Params
	// URL returns a escaped URL.
	URL() string
	// BucketName returns the name of the bucket.
	BucketName() string
	// Warnings returns human-readable notices about known compatibility
	// issues detected against this storage provider. It returns nil if none
	// were found.
	Warnings() []string
}

Storage represents a destination to perform a backup/restore.

func S3FromEnv

func S3FromEnv(ctx *stopper.Context, env *env.Env) (Storage, error)

S3FromEnv creates a new S3 store from the environment. It will try to connect to the S3 service using the environment variables provided, and adding any parameters that are required.

Jump to

Keyboard shortcuts

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