store

package
v0.0.0-...-07f0968 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenKey

func GenKey(prefix string, root ID, ids ...ID) string

Types

type Client

type Client interface {
	CreateBucket(bucket, acl string) error
	MustCreateBucket(bucket, acl string)
	Copy(srcBucket, dstBucket, key string) error
	MustCopy(srcBucket, dstBucket, key string)
	StreamUp(bucket, key, name, mimeType string, size int64, isPublic, isAttachment bool, timeout time.Duration, content io.ReadCloser) error
	MustStreamUp(bucket, key, name, mimeType string, size int64, isPublic, isAttachment bool, timeout time.Duration, content io.ReadCloser)
	Put(bucket, key string, name, mimeType string, size int64, isPublic, isAttachment bool, content io.ReadSeeker) error
	MustPut(bucket, key string, name, mimeType string, size int64, isPublic, isAttachment bool, content io.ReadSeeker)
	PresignedPutUrl(bucket, key string, name, mimeType string, size int64) (string, error)
	MustPresignedPutUrl(bucket, key string, name, mimeType string, size int64) string
	Get(bucket, key string) (string, string, int64, io.ReadCloser, error)
	MustGet(bucket, key string) (string, string, int64, io.ReadCloser)
	PresignedGetUrl(bucket, key string, name string, isAttachment bool) (string, error)
	MustPresignedGetUrl(bucket, key string, name string, isAttachment bool) string
	Delete(bucket, key string) error
	MustDelete(bucket, key string)
	DeletePrefix(bucket, prefix string) error
	MustDeletePrefix(bucket, prefix string)
}

func New

func New(s3 *s3.S3) Client

Jump to

Keyboard shortcuts

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