s3

package
v0.0.0-...-17df531 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketMetrics

type BucketMetrics struct {
	Objects                       uint64
	ObjectsReadable               string
	ObjectsSize                   uint64
	ObjectsSizeReadable           string
	IncompleteObjects             uint64
	IncompleteObjectsReadable     string
	IncompleteObjectsSize         uint64
	IncompleteObjectsSizeReadable string
}

type S3AO

type S3AO struct {
	// contains filtered or unexported fields
}

func Init

func Init(endpoint, bucket, region, accessKey, secretKey string, secure bool, presignExpiry time.Duration) (S3AO, error)

Initialize S3AO

func (S3AO) GetBucketMetrics

func (s S3AO) GetBucketMetrics() (metrics BucketMetrics)

func (S3AO) GetObject

func (s S3AO) GetObject(bin string, filename string, start int64, end int64) (*minio.Object, error)

func (S3AO) GetObjectKey

func (s S3AO) GetObjectKey(bin string, filename string) (key string)

func (S3AO) ListObjects

func (s S3AO) ListObjects() (objects []string, err error)

func (S3AO) PresignedGetObject

func (s S3AO) PresignedGetObject(bin string, filename string, mime string) (presignedURL *url.URL, err error)

This only works with objects that are not encrypted

func (S3AO) PutObject

func (s S3AO) PutObject(bin string, filename string, data io.Reader, size int64) (err error)

func (S3AO) RemoveBucket

func (s S3AO) RemoveBucket() error

func (S3AO) RemoveKey

func (s S3AO) RemoveKey(key string) error

func (S3AO) RemoveObject

func (s S3AO) RemoveObject(bin string, filename string) error

func (S3AO) SetTrace

func (s S3AO) SetTrace(trace bool)

func (S3AO) Status

func (s S3AO) Status() bool

Jump to

Keyboard shortcuts

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