@@ -14,7 +14,7 @@ import (
14
14
)
15
15
16
16
type Config struct {
17
- EndPoint string `json:"end_point "`
17
+ Endpoint string `json:"endpoint "`
18
18
AccessKeyID string `json:"access_key"`
19
19
SecretAccessKey string `json:"secret"`
20
20
Token string `json:"token"`
@@ -28,7 +28,7 @@ type Client struct {
28
28
}
29
29
30
30
func NewClient (config * Config ) (* Client , error ) {
31
- client , err := minio .New (config .EndPoint , & minio.Options {
31
+ client , err := minio .New (config .Endpoint , & minio.Options {
32
32
Creds : credentials .NewStaticV4 (config .AccessKeyID , config .SecretAccessKey , config .Token ),
33
33
Secure : config .UseSSL ,
34
34
})
@@ -48,7 +48,7 @@ func (s *Client) GenerateURL(key string) string {
48
48
if strings .HasPrefix (key , "http://" ) || strings .HasPrefix (key , "https://" ) {
49
49
return key
50
50
}
51
- return fmt .Sprintf ("%s/%s/%s" , s .config .EndPoint , s .config .Bucket , strings .TrimPrefix (key , "/" ))
51
+ return fmt .Sprintf ("%s/%s/%s" , s .config .Endpoint , s .config .Bucket , strings .TrimPrefix (key , "/" ))
52
52
}
53
53
54
54
func (s * Client ) GenerateURLs (keys []string ) []string {
@@ -80,7 +80,7 @@ func (s *Client) ExtractKeyFromURLWithMode(uri string, strict bool) (string, err
80
80
if err != nil {
81
81
return "" , nil
82
82
}
83
- if u .Host != s .config .EndPoint {
83
+ if u .Host != s .config .Endpoint {
84
84
if strict {
85
85
return "" , fmt .Errorf ("invalid url" )
86
86
}
0 commit comments