-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
51 lines (42 loc) · 850 Bytes
/
config.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
package s3util
type S3Config struct {
ForcePath bool
Endpoint string
AccessKey string
SecretKey string
Token string
Region string
Timeout *S3Timeout
}
func NewDefaultConfig(endpoint, ak, sk string) *S3Config {
return &S3Config{
ForcePath: true,
Endpoint: endpoint,
AccessKey: ak,
SecretKey: sk,
Token: "",
Region: "us-east-1",
Timeout: NewDefaultTimeout(),
}
}
func (c *S3Config) GetTimeout() *S3Timeout {
return c.Timeout
}
func (c *S3Config) GetEndpoint() string {
return c.Endpoint
}
func (c *S3Config) GetRegion() string {
return c.Region
}
func (c *S3Config) GetForcePath() bool {
return c.ForcePath
}
func (c *S3Config) GetAccessKey() string {
return c.AccessKey
}
func (c *S3Config) GetSecretKey() string {
return c.SecretKey
}
func (c *S3Config) GetToken() string {
return c.Token
}