@@ -13,6 +13,7 @@ import (
1313)
1414
1515type Bool bool
16+
1617func (bit * Bool ) UnmarshalJSON (b []byte ) error {
1718 txt := string (b )
1819 * bit = Bool (txt == "1" || txt == "true" )
@@ -21,13 +22,13 @@ func (bit *Bool) UnmarshalJSON(b []byte) error {
2122
2223type objectInfo = minio.ObjectInfo
2324type S3Configuration struct {
24- BucketName string
25- Endpoint string
26- AccessKey string
27- SecretAccessKey string
28- SessionToken string
29- Region string
30- SSLEnabled Bool
25+ BucketName string `json:"bucketname"`
26+ Endpoint string `json:"endpoint"`
27+ AccessKey string `json:"accesskey"`
28+ SecretAccessKey string `json:"secretkey"`
29+ SessionToken string `json:"token"`
30+ Region string `json:"region"`
31+ SSLEnabled Bool `json:"sslenabled"`
3132}
3233
3334type S3Watcher struct {
@@ -57,8 +58,8 @@ func newS3Watcher(dir string, interval time.Duration) (Watcher, error) {
5758 config : nil ,
5859 stop : make (chan bool , 1 ),
5960 WatcherBase : WatcherBase {
60- Events : make (chan Event , 100 ),
61- Errors : make (chan error , 100 ),
61+ Events : make (chan Event , 100 ),
62+ Errors : make (chan error , 100 ),
6263 watchDir : dir ,
6364 pollingTime : interval ,
6465 },
0 commit comments