storage

package module
v0.0.0-...-ba230bb Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	E2EStorageUrl      = "objectstore.e2enetworks.net"
	E2EAccessKeyId     = os.Getenv("E2E_ACCESS_KEY_ID")
	E2ESecretAccessKey = os.Getenv("E2E_SECRET_ACCESS_KEY")
)

Functions

func AttachKeyToBucket

func AttachKeyToBucket(storageKey *StorageTypes.BucketAccessKeyItem, bucket string) (bool, error)

AttachKeyToBucket attaches an access key with a set of permissions to a bucket

func CreateAccessKey

func CreateAccessKey(accessKeyTag string) (*StorageTypes.BucketAccessKeyItem, error)

CreateAccessKey creates an AWS S3-style access key pair to access a bucket

func CreateBucket

func CreateBucket(bucketName string) (*StorageTypes.Bucket, error)

CreateBucket creates a bucket

func DeleteAccessKey

func DeleteAccessKey(accessKeyId string) (bool, error)

DeleteAccessKey deletes an Access keypair

func DeleteBucket

func DeleteBucket(bucketName string) error

DeleteBucket deletes a bucket

func DeleteFile

func DeleteFile(bucketName string, srcPath string, accessKeyId string, accessKeySecret string) (bool, error)

DeleteFile deletes a file from a bucket

func DownloadFile

func DownloadFile(bucketName string, srcPath string, destPath string, accessKeyId string, accessKeySecret string) (string, error)

DownloadFile downloads the given file from a bucket

func ListAccessKeys

func ListAccessKeys() (*[]StorageTypes.BucketAccessKeyItem, error)

ListAccessKeys lists all access keys you have

func ListBuckets

func ListBuckets() ([]StorageTypes.Bucket, error)

ListBuckets lists all buckets you have

func LockUnlockAccessKey

func LockUnlockAccessKey(accessKeyId string, desiredState string) (bool, error)

LockUnlockAccessKey locks or unlocks an access key pair

func UploadFile

func UploadFile(filePath string, bucket string, destKey string, accessKeyId string, accessKeySecret string) (*minio.UploadInfo, error)

UploadFile uploads a file to a bucket

Types

This section is empty.

Jump to

Keyboard shortcuts

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