s3file

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyInfo

type KeyInfo struct {
	Key   string    `json:"key,omitempty"`
	Size  int64     `json:"size,omitempty"`
	Stamp time.Time `json:"stamp,omitempty"`
}

KeyInfo file status

type S3Store

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

S3Store access aws s3

func (*S3Store) Connect

func (s *S3Store) Connect(accessID, secretKey string, region string, endpoints ...string) (err error)

Connect connect to s3 server

func (*S3Store) GetPresignedURL

func (s *S3Store) GetPresignedURL(bucket, key string, durations ...time.Duration) (string, error)

GetPresignedURL creates a presigned URL for a bucket object

func (*S3Store) ListBucketFiles

func (s *S3Store) ListBucketFiles(bucket, prefix string) (prefixs []string, keys []KeyInfo, err error)

ListBucketFiles Returns some or all (up to 1,000) of the objects in a bucket

func (*S3Store) ListBuckets

func (s *S3Store) ListBuckets() (bkts []string, err error)

ListBuckets Returns a list of all buckets owned

Jump to

Keyboard shortcuts

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