wasabi

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Bifrost interface for Wasabi Cloud Storage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WasabiCloudStorage

type WasabiCloudStorage struct {
	// Provider is the name of the cloud storage service to use.
	Provider types.Provider
	// DefaultBucket is the S3 bucket to use for storage
	DefaultBucket string
	// CredentialsFile is the path to the S3 credentials file
	CredentialsFile string
	// Region is the S3 region to use for storage
	Region string
	// Zone is the S3 zone to use for storage
	Zone string
	// DefaultTimeout is the time-to-live for time-dependent S3 operations
	DefaultTimeout int64
	// UseAsync enables asynchronous operations with go routines.
	UseAsync bool
	// s3 client
	Client *s3v1.S3
	// PublicRead enables public read access to uploaded files.
	PublicRead bool
	// SecretKey is the secret key for IAM authentication.
	SecretKey string
	// AccessKey is the access key for IAM authentication.
	AccessKey string
	// EnableDebug enables debug logging.
	EnableDebug bool
}

WasabiCloudStorage is the S3 struct

func (*WasabiCloudStorage) Config

func (w *WasabiCloudStorage) Config() *types.BridgeConfig

Config returns the wasabi configuration.

func (*WasabiCloudStorage) DeleteFile added in v0.0.8

func (w *WasabiCloudStorage) DeleteFile(fileFace interface{}) error

DeleteFile deletes a file from Wasabi and returns an error if one occurs.

Note: DeleteFile requires that a default bucket be set in bifrost.BridgeConfig.

func (*WasabiCloudStorage) Disconnect

func (w *WasabiCloudStorage) Disconnect() error

Disconnect closes the Wasabi connection and returns an error if one occurs.

Disconnect should only be called when the connection is no longer needed.

func (*WasabiCloudStorage) IsConnected

func (w *WasabiCloudStorage) IsConnected() bool

IsConnected returns true if the Wasabi connection is open.

func (*WasabiCloudStorage) UploadFile

func (w *WasabiCloudStorage) UploadFile(fileFace interface{}) (*types.UploadedFile, error)

UploadFile uploads a file to Wasabi and returns an error if one occurs.

Note: UploadFile requires that a default bucket be set in bifrost.BridgeConfig.

func (*WasabiCloudStorage) UploadFolder

func (w *WasabiCloudStorage) UploadFolder(foldFace interface{}) ([]*types.UploadedFile, error)

UploadFolder uploads a folder to the provider storage and returns an error if one occurs.

Note: for some providers, UploadFolder requires that a default bucket be set in bifrost.BridgeConfig.

func (*WasabiCloudStorage) UploadMultiFile

func (w *WasabiCloudStorage) UploadMultiFile(multiFace interface{}) ([]*types.UploadedFile, error)

UploadMultiFile

Jump to

Keyboard shortcuts

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