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

Method GetClient

s3manager.go:160–168  ·  view source on GitHub ↗

GetClient returns S3 client for a user

(userID string)

Source from the content-addressed store, hash-verified

158
159// GetClient returns S3 client for a user
160func (m *S3Manager) GetClient(userID string) (*s3.Client, *S3Config, bool) {
161 m.mu.RLock()
162 defer m.mu.RUnlock()
163
164 client, clientOk := m.clients[userID]
165 config, configOk := m.configs[userID]
166
167 return client, config, clientOk && configOk
168}
169
170// GenerateS3Key generates S3 object key based on message metadata
171func (m *S3Manager) GenerateS3Key(userID, contactJID, messageID string, mimeType string, isIncoming bool) string {

Callers 7

TestGetClientConcurrentFunction · 0.95
EnsureClientFromDBMethod · 0.95
UploadToS3Method · 0.95
GetPublicURLMethod · 0.95
TestConnectionMethod · 0.95
ProcessMediaForS3Method · 0.95
DeleteAllUserObjectsMethod · 0.95

Calls

no outgoing calls

Tested by 1

TestGetClientConcurrentFunction · 0.76