Documentation ¶
Index ¶
- type Mailer
- type Message
- type ProcessingResult
- type QRApp
- type S3Storage
- func (ss *S3Storage) Delete(ctx context.Context, bucket, key string) error
- func (ss *S3Storage) DownloadToTmpFile(ctx context.Context, bucket, key string) (fs.File, error)
- func (ss *S3Storage) RemoveTmpFile(ctx context.Context, tmpFile fs.File) error
- func (ss *S3Storage) Upload(ctx context.Context, bucket, key, contentType string, r io.Reader) error
- type SESMailer
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { NotificationType string `json:"notificationType"` Mail struct { CommonHeaders struct { ReturnPath string `json:"returnPath"` From []string `json:"from"` MessageID string `json:"messageId"` Subject string `json:"subject"` } `json:"commonHeaders"` } `json:"mail"` Receipt struct { Recipients []string `json:"recipients"` Action struct { Type string `json:"type"` BucketName string `json:"bucketName"` ObjectKey string `json:"objectKey"` } `json:"action"` } `json:"receipt"` }
type ProcessingResult ¶
type S3Storage ¶
type S3Storage struct { S3Downloader *manager.Downloader S3Uploader *manager.Uploader S3Client *s3.Client }
func (*S3Storage) DownloadToTmpFile ¶
func (*S3Storage) RemoveTmpFile ¶
type Storage ¶
type Storage interface { // DownloadToTmpFile downloads an object from a bucket to a temporary file. DownloadToTmpFile(ctx context.Context, bucket, key string) (fs.File, error) // RemoveTmpFile removes a temporary file created by DownloadToTmpFile. RemoveTmpFile(ctx context.Context, tmpFile fs.File) error // Upload uploads an object to a bucket, using the contents from the reader, setting the given content type. Upload(ctx context.Context, bucket, key, contentType string, r io.Reader) error // Delete deletes an object from a bucket. Delete(ctx context.Context, bucket, key string) error }
Click to show internal directories.
Click to hide internal directories.