bucket

package
v0.0.0-...-5edc56a Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

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

func Open

func Open(config config.BucketConfig) (*Bucket, error)

Connect to the configured S3 bucket. Tested: Wasabi, Backblaze, Minio

func OpenAll

func OpenAll(buckets []config.BucketConfig) ([]*Bucket, error)

func OpenMedia

func OpenMedia(buckets []config.BucketConfig, mediaType string) ([]Bucket, error)

func (*Bucket) List

func (b *Bucket) List(lastSync time.Time) (objectCh chan *Object, err error)

func (*Bucket) Presign

func (b *Bucket) Presign(key string) *url.URL

Generate a presigned url which expires based on config settings.

func (*Bucket) Rewrite

func (b *Bucket) Rewrite(path string) string

type Object

type Object struct {
	Key          string
	Path         string // Key modified by rewrite rules
	ETag         string
	Size         int64
	LastModified time.Time
}

Jump to

Keyboard shortcuts

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