s3

package
v1.3.174 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: GPL-3.0 Imports: 14 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,
	bucketsPublicURLConfigMap map[string]map[string]string,
	region string,
	disableSSL bool,
	environment string) *AmazonS3

func (*AmazonS3) CreateObjectFromKey added in v0.6.8

func (amazonS3 *AmazonS3) CreateObjectFromKey(ormService *beeorm.Engine, bucket, key string) Object

func (*AmazonS3) DeleteObject added in v0.4.8

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

func (*AmazonS3) GetBucketName added in v0.6.8

func (amazonS3 *AmazonS3) GetBucketName(bucket string) string

func (*AmazonS3) GetClient added in v0.6.6

func (amazonS3 *AmazonS3) GetClient() interface{}

func (*AmazonS3) GetObjectCachedURL

func (amazonS3 *AmazonS3) GetObjectCachedURL(bucket string, object *entity.FileObject) string

func (*AmazonS3) GetObjectSignedURL

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

func (*AmazonS3) ReadFile

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

func (*AmazonS3) UploadImageFromBase64

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

func (*AmazonS3) UploadImageFromFile

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

func (*AmazonS3) UploadObjectFromBase64

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

func (*AmazonS3) UploadObjectFromByte added in v0.8.99

func (amazonS3 *AmazonS3) UploadObjectFromByte(ormService *beeorm.Engine, bucket string, byteData []byte, extension string) Object

func (*AmazonS3) UploadObjectFromFile

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

type CachedObjectURLTemplate added in v0.8.35

type CachedObjectURLTemplate struct {
	Environment string
	BucketName  string
	StorageKey  string
	CounterID   string
}

type Client added in v0.4.6

type Client interface {
	GetClient() interface{}
	GetBucketName(bucket string) string
	CreateObjectFromKey(ormService *beeorm.Engine, bucket, key string) Object
	GetObjectCachedURL(bucket string, object *entity.FileObject) string
	GetObjectSignedURL(bucket string, object *entity.FileObject, expires time.Duration) string
	UploadObjectFromFile(ormService *beeorm.Engine, bucket, localFile string) Object
	UploadObjectFromBase64(ormService *beeorm.Engine, bucket, content, extension string) Object
	UploadObjectFromByte(ormService *beeorm.Engine, bucket string, data []byte, extension string) Object
	UploadImageFromFile(ormService *beeorm.Engine, bucket, localFile string) Object
	UploadImageFromBase64(ormService *beeorm.Engine, bucket, image, extension string) Object
	DeleteObject(bucket string, objects ...*entity.FileObject) 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