Documentation ¶
Index ¶
- Constants
- Variables
- func NewKMS() (*kms.Client, error)
- func NewS3() (*s3.Client, error)
- func NewSFN() (*sfn.Client, error)
- func NewSesV2() (*sesv2.Client, error)
- func RunActivity[IN, OUT any](c context.Context, svc *sfn.Client, workerName string, arn string, ...) error
- func SendEmail(svc *sesv2.Client, es CoreEmailSpec) (string, error)
- func SendEmailWithLength(svc *sesv2.Client, es CoreEmailSpec) (string, int, error)
- type Attachment
- type CoreEmailSpec
- type File
- type MultipartResponse
- type TaskContext
Constants ¶
View Source
const ( KB = 1024 // kilobyte MB = KB * KB // megabyte GB = KB * KB * KB // gigabyte TB = MB * MB // terabyte MinPartSize = 5 * MB // except last part, which can be smaller MaxPartSize = 5 * GB MaxTotalSize = 5 * TB )
re https://docs.aws.amazon.com/AmazonS3/latest/userguide/qfacts.html
View Source
const MaxEmailBytesSESV2 = 40 * 1024 * 1024
Variables ¶
View Source
var ErrDeferTaskTokenResponse = errors.New("task token response deferred")
if an activity function returns this, that means it wants to handle the task token response itself.
Functions ¶
func RunActivity ¶ added in v0.0.5
func SendEmail ¶
func SendEmail(svc *sesv2.Client, es CoreEmailSpec) (string, error)
will try sending with attachments, and if that fails due to length limit, will try sending without attachments.
func SendEmailWithLength ¶ added in v0.0.2
sends email and returns with length of raw email data, in bytes, even on error.
Types ¶
type Attachment ¶
type CoreEmailSpec ¶
type MultipartResponse ¶ added in v0.0.2
func UploadMultipart ¶ added in v0.0.2
func UploadMultipart(c context.Context, svc *s3.Client, f File, bucket, key string) (*MultipartResponse, error)
for large uploads
type TaskContext ¶ added in v0.0.5
type TaskContext struct {
TaskToken string
}
Click to show internal directories.
Click to hide internal directories.