s3

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Secret *katana.Secret

	Host        string
	Region      string
	AccessKeyID string
	SecretKey   string
	Bucket      string
	Path        string
	PartSize    int64
}

Config is configuration for S3 uploader

func (*Config) Validate

func (c *Config) Validate() error

Validate validates configuration

type S3Uploader

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

S3Uploader is S3 uploader instance

func NewUploader

func NewUploader(config *Config) (*S3Uploader, error)

NewUploader creates new S3 uploader instance

func (*S3Uploader) SetDispatcher

func (u *S3Uploader) SetDispatcher(d *events.Dispatcher)

SetDispatcher sets events dispatcher

func (*S3Uploader) Upload

func (u *S3Uploader) Upload(file, fileName string) error

Upload uploads given file to S3 storage

func (*S3Uploader) Write added in v0.0.2

func (u *S3Uploader) Write(r io.ReadCloser, fileName string, fileSize int64) error

Write writes data from given reader to given file

Jump to

Keyboard shortcuts

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