storage

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 S3Store

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

S3Store implements the sent store using S3.

func NewSentStore

func NewSentStore(region, bucket, id, secret string) (*S3Store, error)

NewSentStore creates a new S3 store.

func (S3Store) Exists

func (s S3Store) Exists(messageID mail.ID, contentsHash, integrityHash, contents []byte) error

Exists checks if a file already exists returning an error if it does.

func (S3Store) Put

func (s S3Store) Put(messageID mail.ID, contentsHash, integrityHash, contents []byte) (
	address, resource string, msgLocInd uint64, err error)

Put stores the message in S3 as an object.

type Store

type Store interface {
	Exists(messageID mail.ID, contentsHash, integrityHash, contents []byte) error
	Put(messageID mail.ID, contentsHash, integrityHash, contents []byte) (address, resource string, mli uint64, err error)
}

Store interface for using S3.

Directories

Path Synopsis
Package storagetest is a generated GoMock package.
Package storagetest is a generated GoMock package.

Jump to

Keyboard shortcuts

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