(ctx context.Context, table *schema.Table, objKey string)
| 24 | var reInvalidJSONKey = regexp.MustCompile(`\W`) |
| 25 | |
| 26 | func (c *Client) createObject(ctx context.Context, table *schema.Table, objKey string) (*filetypes.Stream, error) { |
| 27 | s, err := c.Client.StartStream(table, func(r io.Reader) error { |
| 28 | params := &transfermanager.UploadObjectInput{ |
| 29 | Bucket: aws.String(c.spec.Bucket), |
| 30 | Key: aws.String(objKey), |
| 31 | Body: r, |
| 32 | ContentType: aws.String(c.spec.GetContentType()), |
| 33 | } |
| 34 | |
| 35 | if c.spec.ACL != "" { |
| 36 | params.ACL = tmtypes.ObjectCannedACL(c.spec.ACL) |
| 37 | } |
| 38 | |
| 39 | sseConfiguration := c.spec.ServerSideEncryptionConfiguration |
| 40 | if sseConfiguration != nil { |
| 41 | params.SSEKMSKeyID = &sseConfiguration.SSEKMSKeyId |
| 42 | params.ServerSideEncryption = tmtypes.ServerSideEncryption(sseConfiguration.ServerSideEncryption) |
| 43 | } |
| 44 | |
| 45 | _, err := c.transferManager.UploadObject(ctx, params) |
| 46 | return err |
| 47 | }) |
| 48 | return s, err |
| 49 | } |
| 50 | |
| 51 | func (c *Client) WriteTable(ctx context.Context, msgs <-chan *message.WriteInsert) error { |
| 52 | var s *filetypes.Stream |
no test coverage detected