s3

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBucket

func CreateBucket(bucket string) error

CreateBucket creates new bucket in S3 store

func DeleteBucket

func DeleteBucket(bucket string) error

DeleteBucket deletes bucket in S3 store

func DeleteObject

func DeleteObject(bucket, objectName, versionId string) error

DeleteObject deletes object from S3 storage

func GetObject

func GetObject(bucket, objectName string) ([]byte, error)

GetObjects returns given object from S3 storage

func ListBuckets

func ListBuckets() ([]minio.BucketInfo, error)

ListBuckets provides list of buckets in S3 store

func ListObjects

func ListObjects(bucket string) ([]minio.ObjectInfo, error)

ListObjects provides list of buckets in S3 store

func UploadObject

func UploadObject(bucket, objectName, contentType string, reader io.Reader, size int64) (minio.UploadInfo, error)

UploadObject uploads given object to S3 store

Types

type BucketObject

type BucketObject struct {
	Bucket  string             `json:"bucket"`
	Objects []minio.ObjectInfo `json:"objects"`
}

BucketObject represents s3 object

func BucketContent

func BucketContent(bucket string) (BucketObject, error)

BucketContent provides content on given bucket

type S3

type S3 struct {
	Endpoint     string
	AccessKey    string
	AccessSecret string
	UseSSL       bool
}

S3 represent S3 storage record

Jump to

Keyboard shortcuts

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