bucket

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWS   = "s3"
	GCP   = "gs"
	AZURE = "azblob"
)

Blob storage types

View Source
const (
	S3AccessKeyID        = "access-key-id"
	S3SecretAccessKey    = "secret-access-key"
	S3Region             = "region"
	S3EnvAccessKeyID     = "AWS_ACCESS_KEY_ID"
	S3EnvSecretAccessKey = "AWS_SECRET_ACCESS_KEY"
	S3EnvRegion          = "AWS_REGION"
)

AWS

View Source
const (
	AzureStorageAccount    = "storage-account"
	AzureStorageKey        = "storage-key"
	AzureEnvStorageAccount = "AZURE_STORAGE_ACCOUNT"
	AzureEnvStorageKey     = "AZURE_STORAGE_KEY"
)

Azure

View Source
const (
	GCPCredentialFile = "google-credentials-path"
)

GCP

Variables

This section is empty.

Functions

func DownloadBundle added in v0.1.27

func DownloadBundle(ctx context.Context, req BundleReq) error

func DownloadFile added in v0.1.18

func DownloadFile(ctx context.Context, src, dst, filename string, secretData map[string][]byte) error

func DownloadFiles added in v0.1.20

func DownloadFiles(ctx context.Context, src, dst string, secretData map[string][]byte) error

func OpenBucket

func OpenBucket(ctx context.Context, bucketURL string, secretData map[string][]byte) (*blob.Bucket, error)

func RemoveFile added in v0.1.22

func RemoveFile(ctx context.Context, bucket, key string, secretData map[string][]byte) error

func SecretData

func SecretData(ctx context.Context, sn string) (map[string][]byte, error)

Types

type BundleReq added in v0.1.27

type BundleReq struct {
	URL        string `json:"url"`
	SecretName string `json:"secret_name"`
	DestDir    string `json:"dest_dir"`
}

Jump to

Keyboard shortcuts

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