s3store

package
v0.0.78 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sent

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

Sent handles storing messages in S3

func NewSent

func NewSent(region, bucket, id, secret string) (*Sent, error)

NewSent creates a new S3 store.

func (Sent) Key

func (h Sent) Key(messageID mail.ID, contentsHash, msg []byte) string

Key of resource stored.

func (Sent) PutMessage

func (h Sent) PutMessage(messageID mail.ID, contentsHash, msg []byte, headers map[string]string) (
	address, resource string, mli uint64, err error)

PutMessage stores the message in S3.

type UploadProvider added in v0.0.49

type UploadProvider struct {
	Uploader func(ctx context.Context, input *s3manager.UploadInput, options ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error)
	Bucket   string
}

func NewUploader added in v0.0.49

func NewUploader(region, bucket, id, secret string) (*UploadProvider, error)

NewUploader creates a new UploadProvider store for S3.

func (*UploadProvider) Upload added in v0.0.49

func (s *UploadProvider) Upload(ctx context.Context, metadata map[string]*string, key string, msg []byte) (string, error)

type Uploader added in v0.0.49

type Uploader interface {
	Upload(ctx context.Context, metadata map[string]*string, key string, msg []byte) (string, error)
}

Jump to

Keyboard shortcuts

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