storage

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3

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

S3 type

func NewS3Client

func NewS3Client(key, secret, endpoint, region string) *S3

NewS3Client creates a new s3 instance

func (*S3) CleanupOld added in v0.1.1

func (s *S3) CleanupOld(bucket, path string, beforeDays int) (int, error)

CleanupOld apply a retention policy over a certain path

func (*S3) CreateBucket

func (s *S3) CreateBucket(bucket string) error

CreateBucket creates a bucket

func (*S3) DeleteFile added in v0.1.1

func (s *S3) DeleteFile(bucket, file string) error

DeleteFile delete a file

func (*S3) ListFiles added in v0.1.1

func (s *S3) ListFiles(bucket, prefix string) ([]string, error)

ListFiles lists files

func (*S3) UploadFile

func (s *S3) UploadFile(bucket, localPath, remotePath string, includeChecksum bool) error

UploadFile upload a file to s3 bucket

Jump to

Keyboard shortcuts

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