Help us shape the future of Go! Take the 2026 Go Developer Survey

s3

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 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 AmazonS3

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

func NewAmazonS3

func NewAmazonS3(endpoint string, accessKeyID string, secretAccessKey string, allowedBuckets map[string]uint64, bucketsConfigDefinitions map[string]map[string]string,
	region string, disableSSL bool, urlPrefix string, domain string, environment string) *AmazonS3

func (*AmazonS3) DeleteObject added in v0.4.8

func (amazonS3 *AmazonS3) DeleteObject(bucket string, objects ...*Object) bool

func (*AmazonS3) GetObjectCachedURL

func (amazonS3 *AmazonS3) GetObjectCachedURL(bucket string, object *Object) string

func (*AmazonS3) GetObjectSignedURL

func (amazonS3 *AmazonS3) GetObjectSignedURL(bucket string, object *Object, expiresIn time.Duration) string

func (*AmazonS3) ReadFile

func (amazonS3 *AmazonS3) ReadFile(localFile string) ([]byte, string)

func (*AmazonS3) UploadImageFromBase64

func (amazonS3 *AmazonS3) UploadImageFromBase64(ormService *orm.Engine, bucket, base64image, extension string) Object

func (*AmazonS3) UploadImageFromFile

func (amazonS3 *AmazonS3) UploadImageFromFile(ormService *orm.Engine, bucket, localFile string) Object

func (*AmazonS3) UploadObjectFromBase64

func (amazonS3 *AmazonS3) UploadObjectFromBase64(ormService *orm.Engine, bucket, base64content, extension string) Object

func (*AmazonS3) UploadObjectFromFile

func (amazonS3 *AmazonS3) UploadObjectFromFile(ormService *orm.Engine, bucket, localFile string) Object

type Client added in v0.4.6

type Client interface {
	GetObjectCachedURL(bucket string, object *Object) string
	GetObjectSignedURL(bucket string, object *Object, expires time.Duration) string
	UploadObjectFromFile(ormService *orm.Engine, bucket, localFile string) Object
	UploadObjectFromBase64(ormService *orm.Engine, bucket, content, extension string) Object
	UploadImageFromFile(ormService *orm.Engine, bucket, localFile string) Object
	UploadImageFromBase64(ormService *orm.Engine, bucket, image, extension string) Object
	DeleteObject(bucket string, objects ...*Object) bool
}

type Object

type Object struct {
	ID         uint64
	StorageKey string
	CachedURL  string
	Data       interface{}
}

Jump to

Keyboard shortcuts

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