config.go 678 B

123456789101112131415161718192021222324252627
  1. // Package s3util provides streaming transfers to and from Amazon S3.
  2. //
  3. // To use it, open or create an S3 object, read or write data,
  4. // and close the object.
  5. //
  6. // You must assign valid credentials to DefaultConfig.Keys before using
  7. // DefaultConfig. Be sure to close an io.WriteCloser returned by this package,
  8. // to flush buffers and complete the multipart upload process.
  9. package s3util
  10. // TODO(kr): parse error responses; return structured data
  11. import (
  12. "github.com/kr/s3"
  13. "net/http"
  14. )
  15. var DefaultConfig = &Config{
  16. Service: s3.DefaultService,
  17. Keys: new(s3.Keys),
  18. }
  19. type Config struct {
  20. *s3.Service
  21. *s3.Keys
  22. *http.Client // if nil, uses http.DefaultClient
  23. }