s3

package
v0.0.0-...-860e413 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStorage

func NewStorage(_ *sql.DB, rawConfig map[string]interface{}) (static.Storage, error)

Types

type Config

type Config struct {
	Endpoint        string
	AccessKeyID     string
	SecretAccessKey string
	SSL             bool
	Location        string
	BucketPrefix    string
	MultiDelete     bool
}

func (*Config) NewStorage

func (c *Config) NewStorage() (static.Storage, error)

type Minio

type Minio struct {
	Client       *minio.Client
	Location     string
	BucketPrefix string
	MultiDelete  bool
}

func (*Minio) GetObject

func (m *Minio) GetObject(ctx context.Context, instanceID, resourceOwner, name string) ([]byte, func() (*static.Asset, error), error)

func (*Minio) GetObjectInfo

func (m *Minio) GetObjectInfo(ctx context.Context, instanceID, resourceOwner, name string) (*static.Asset, error)

func (*Minio) PutObject

func (m *Minio) PutObject(ctx context.Context, instanceID, location, resourceOwner, name, contentType string, objectType static.ObjectType, object io.Reader, objectSize int64) (*static.Asset, error)

func (*Minio) RemoveObject

func (m *Minio) RemoveObject(ctx context.Context, instanceID, resourceOwner, name string) error

func (*Minio) RemoveObjects

func (m *Minio) RemoveObjects(ctx context.Context, instanceID, resourceOwner string, objectType static.ObjectType) error

Jump to

Keyboard shortcuts

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