MCPcopy Create free account
hub / github.com/asternic/wuzapi / TestConnection

Method TestConnection

s3manager.go:334–348  ·  view source on GitHub ↗

TestConnection tests S3 connection

(ctx context.Context, userID string)

Source from the content-addressed store, hash-verified

332
333// TestConnection tests S3 connection
334func (m *S3Manager) TestConnection(ctx context.Context, userID string) error {
335 client, config, ok := m.GetClient(userID)
336 if !ok {
337 return fmt.Errorf("S3 client not initialized for user %s", userID)
338 }
339
340 // Try to list objects with max 1 result
341 input := &s3.ListObjectsV2Input{
342 Bucket: aws.String(config.Bucket),
343 MaxKeys: aws.Int32(1),
344 }
345
346 _, err := client.ListObjectsV2(ctx, input)
347 return err
348}
349
350// ProcessMediaForS3 handles the complete media upload process
351func (m *S3Manager) ProcessMediaForS3(ctx context.Context, userID, contactJID, messageID string,

Callers 1

TestS3ConnectionMethod · 0.80

Calls 2

GetClientMethod · 0.95
StringMethod · 0.80

Tested by

no test coverage detected