Documentation ¶
Overview ¶
Package s3 this package in intention to hide aws s3 storage implementation under the interface that will give you the ability to user other cloud providers in the future
Index ¶
- type FileInfo
- type Storage
- func (s *Storage) Create(path string) (io.ReadWriteCloser, error)
- func (s *Storage) Delete(path string) error
- func (s *Storage) Get(path string) (io.ReadCloser, error)
- func (s *Storage) Link(path string, expire time.Duration) (string, error)
- func (s *Storage) List(path string) ([]string, error)
- func (s *Storage) Put(path string, body io.Reader) error
- func (s *Storage) Stat(path string) (storage.FileInfo, error)
- func (s *Storage) Walk(path string, callback func(path string)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileInfo ¶
type FileInfo struct {
// contains filtered or unexported fields
}
FileInfo struct to get file information
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage interface adaptation for s3
func NewStorage ¶
NewStorage create new storage instance
func (*Storage) Create ¶
func (s *Storage) Create(path string) (io.ReadWriteCloser, error)
Create for create interface
func (*Storage) Get ¶
func (s *Storage) Get(path string) (io.ReadCloser, error)
Get file from s3 bucket
func (*Storage) List ¶
List reads the path content Note: it is not better performant than Walk because it still itterates over all objects in a path
Click to show internal directories.
Click to hide internal directories.