-
Notifications
You must be signed in to change notification settings - Fork 351
/
block.go
57 lines (49 loc) · 1.34 KB
/
block.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package params
import (
"time"
"github.com/aws/aws-sdk-go/aws"
)
// AdapterConfig configures a block adapter.
type AdapterConfig interface {
BlockstoreType() string
BlockstoreLocalParams() (Local, error)
BlockstoreS3Params() (S3, error)
BlockstoreGSParams() (GS, error)
BlockstoreAzureParams() (Azure, error)
}
type Mem struct{}
type Local struct {
Path string
ImportEnabled bool
ImportHidden bool
AllowedExternalPrefixes []string
}
type S3 struct {
AwsConfig *aws.Config
StreamingChunkSize int
StreamingChunkTimeout time.Duration
DiscoverBucketRegion bool
SkipVerifyCertificateTestOnly bool
ServerSideEncryption string
ServerSideEncryptionKmsKeyID string
PreSignedExpiry time.Duration
DisablePreSigned bool
DisablePreSignedUI bool
}
type GS struct {
CredentialsFile string
CredentialsJSON string
PreSignedExpiry time.Duration
DisablePreSigned bool
DisablePreSignedUI bool
}
type Azure struct {
StorageAccount string
StorageAccessKey string
TryTimeout time.Duration
PreSignedExpiry time.Duration
DisablePreSigned bool
DisablePreSignedUI bool
// TestEndpointURL - For testing purposes, provide a custom URL to override the default URL template
TestEndpointURL string
}