-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage.go
37 lines (31 loc) · 949 Bytes
/
storage.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
package configuration
type EndpointConfig struct {
URL string `yaml:"endpointUrl"`
PartitionID string `yaml:"partitionId"`
SigningName string `yaml:"signingName"`
SigningMethod string `yaml:"signingMethod"`
SigningRegion string `yaml:"signingRegion"`
}
type AccessConfig struct {
AccessKeyID string `yaml:"accessKeyId"`
SecretKey string `yaml:"secretKey"`
Token string `yaml:"token"`
}
type BucketConfig struct {
Name string `yaml:"name"`
Folder string `yaml:"folder"`
CDNUrl string `yaml:"cdnUrl"`
}
type S3Config struct {
Endpoint EndpointConfig `yaml:"endpoint"`
Access AccessConfig `yaml:"access"`
Bucket BucketConfig `yaml:"bucket"`
}
type LocalStorageConfig struct {
StoragePath string `yaml:"storage_path"` //nolint:tagliatelle // legacy
}
type StorageConfig struct {
Type string `yaml:"type"`
Local LocalStorageConfig `yaml:"local"`
S3 S3Config `yaml:"s3"`
}