Documentation ¶
Index ¶
- Variables
- type Config
- type S3Storage
- func (s *S3Storage) Accepts(ext string) (accepts bool)
- func (s *S3Storage) AddFile(r io.Reader, p string) (string, error)
- func (s *S3Storage) Close() error
- func (s *S3Storage) DeleteContainer() (err error)
- func (s *S3Storage) EmtpyContainer() error
- func (s *S3Storage) GetFile(p string) (io.ReadCloser, error)
- func (s *S3Storage) NormalizePath(entries ...string) string
- func (s *S3Storage) Open(urlString string) (storage.Driver, error)
- func (s *S3Storage) Path() string
- func (s *S3Storage) RemoveFile(p string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrURLParse = errors.New("awss3: error parsing url")
)
Functions ¶
This section is empty.
Types ¶
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
func (*S3Storage) DeleteContainer ¶
func (*S3Storage) EmtpyContainer ¶
func (*S3Storage) NormalizePath ¶
func (*S3Storage) Open ¶
Open creates an S3Storage. The urlString should be in the form asws3://bucket/prefix?region=&accept=&auto-create=false&acl=public-read The URL parameters accepted are as follows:
- region: region where the bucket is created. Default "us-east-1"
- accept: comma-separated list of file extensions to accept. Could be repeated. e.g. url://bucket/prefix?accept=.jpeg,.svg&accept=.png would accept .jpeg, .svg and .png files. Default .jgp,.jpeg,.png,.svg
- auto-create: will NOT create the bucket automatically if this value is any of: 0, off, disable, false.
- acl: canned ACL policy for file uploads. See https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL for details. Default "public-read".
func (*S3Storage) RemoveFile ¶
Click to show internal directories.
Click to hide internal directories.