mirror of
https://github.com/warmbly/warmbly.git
synced 2026-10-07 00:02:07 +00:00
18 lines
659 B
Go
18 lines
659 B
Go
package config
|
|
|
|
import "github.com/google/uuid"
|
|
|
|
var (
|
|
// StorageEndpointMailboxPrefix is where everything one mailbox writes to
|
|
// object storage lives. Erasing a mailbox deletes this prefix, so the two
|
|
// are defined together: a body written outside it would survive the
|
|
// mailbox being deleted, with nothing to notice.
|
|
StorageEndpointMailboxPrefix = func(userID, emailID uuid.UUID) string {
|
|
return "users/" + userID.String() + "/emails/" + emailID.String() + "/"
|
|
}
|
|
|
|
StorageEndpointEmailBody = func(userID, emailID, emailMessageID uuid.UUID) string {
|
|
return StorageEndpointMailboxPrefix(userID, emailID) + emailMessageID.String() + ".emsg"
|
|
}
|
|
)
|