Compare commits
5 Commits
main
...
local_mini
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c61f14903 | ||
|
|
7396ab1094 | ||
|
|
277e7e1b3e | ||
|
|
bb2de3b8d6 | ||
|
|
b1a32505ff |
File diff suppressed because it is too large
Load Diff
@ -636,7 +636,7 @@ func UnwrapEmailAddress(contact models.Recipientable) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func mailCollisionKeyProps() []string {
|
func mailCollisionKeyProps() []string {
|
||||||
return idAnd("subject", sentDateTime, receivedDateTime)
|
return idAnd("subject", sentDateTime, receivedDateTime, createdDateTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MailCollisionKey constructs a key from the messageable's subject, sender, and recipients (to, cc, bcc).
|
// MailCollisionKey constructs a key from the messageable's subject, sender, and recipients (to, cc, bcc).
|
||||||
|
|||||||
@ -246,7 +246,6 @@ func (c Mail) GetItemsInContainerByCollisionKey(
|
|||||||
|
|
||||||
return m, nil
|
return m, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c Mail) GetItemIDsInContainer(
|
func (c Mail) GetItemIDsInContainer(
|
||||||
ctx context.Context,
|
ctx context.Context,
|
||||||
userID, containerID string,
|
userID, containerID string,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package storage
|
package storage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/alcionai/clues"
|
"github.com/alcionai/clues"
|
||||||
@ -50,6 +51,13 @@ func (c S3Config) Normalize() S3Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
// hack to avoid cycle with config pkg
|
||||||
|
AccessKey = "aws_access_key_id"
|
||||||
|
SecretAccessKey = "aws_secret_access_key"
|
||||||
|
SessionToken = "aws_session_token"
|
||||||
|
)
|
||||||
|
|
||||||
// StringConfig transforms a s3Config struct into a plain
|
// StringConfig transforms a s3Config struct into a plain
|
||||||
// map[string]string. All values in the original struct which
|
// map[string]string. All values in the original struct which
|
||||||
// serialize into the map are expected to be strings.
|
// serialize into the map are expected to be strings.
|
||||||
@ -74,14 +82,21 @@ func (s Storage) S3Config() (S3Config, error) {
|
|||||||
c := S3Config{}
|
c := S3Config{}
|
||||||
|
|
||||||
if len(s.Config) > 0 {
|
if len(s.Config) > 0 {
|
||||||
c.AccessKey = orEmptyString(s.Config[keyS3AccessKey])
|
// c.AccessKey = orEmptyString(s.Config[keyS3AccessKey])
|
||||||
c.SecretKey = orEmptyString(s.Config[keyS3SecretKey])
|
// c.SecretKey = orEmptyString(s.Config[keyS3SecretKey])
|
||||||
c.SessionToken = orEmptyString(s.Config[keyS3SessionToken])
|
// c.SessionToken = orEmptyString(s.Config[keyS3SessionToken])
|
||||||
|
|
||||||
c.Bucket = orEmptyString(s.Config[keyS3Bucket])
|
c.AccessKey = os.Getenv(AccessKey)
|
||||||
c.Endpoint = orEmptyString(s.Config[keyS3Endpoint])
|
c.SecretKey = os.Getenv(SecretAccessKey)
|
||||||
|
c.SessionToken = os.Getenv(SessionToken)
|
||||||
|
c.Bucket = "ap-test"
|
||||||
|
c.Endpoint = "localhost:9000"
|
||||||
c.Prefix = orEmptyString(s.Config[keyS3Prefix])
|
c.Prefix = orEmptyString(s.Config[keyS3Prefix])
|
||||||
c.DoNotUseTLS = str.ParseBool(s.Config[keyS3DoNotUseTLS])
|
|
||||||
|
// c.Bucket = orEmptyString(s.Config[keyS3Bucket])
|
||||||
|
// c.Endpoint = orEmptyString(s.Config[keyS3Endpoint])
|
||||||
|
// c.Prefix = orEmptyString(s.Config[keyS3Prefix])
|
||||||
|
c.DoNotUseTLS = true
|
||||||
c.DoNotVerifyTLS = str.ParseBool(s.Config[keyS3DoNotVerifyTLS])
|
c.DoNotVerifyTLS = str.ParseBool(s.Config[keyS3DoNotVerifyTLS])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user