Documentation
¶
Index ¶
- Variables
- func NewFile(name string, cfg FileConfig) interfaces.IStorage
- func NewS3(name string, cfg S3Config) interfaces.IStorage
- type File
- func (t *File) Delete(name string) error
- func (t *File) GetModified(name string) (int64, error)
- func (t *File) GetSize(name string) (int64, error)
- func (t *File) Has(name string) bool
- func (t *File) Init(app interfaces.IEngine) error
- func (t *File) IsFolder(name string) (bool, error)
- func (t *File) List(folder string) ([]string, error)
- func (t *File) Put(name string, data io.Reader) error
- func (t *File) Read(name string) (io.ReadCloser, error)
- func (t *File) Stop() error
- func (t *File) StoreFolder(name string) error
- func (t *File) String() string
- type FileConfig
- type Mock
- func (t *Mock) Delete(name string) error
- func (t *Mock) GetModified(name string) (int64, error)
- func (t *Mock) GetSize(name string) (int64, error)
- func (t *Mock) Has(name string) bool
- func (t *Mock) Init(_ interfaces.IEngine) error
- func (t *Mock) IsFolder(name string) (bool, error)
- func (t *Mock) List(path string) ([]string, error)
- func (t *Mock) Put(name string, data io.Reader) error
- func (t *Mock) Read(name string) (io.ReadCloser, error)
- func (t *Mock) Stop() error
- func (t *Mock) StoreFolder(name string) error
- func (t *Mock) String() string
- type S3
- func (t *S3) Delete(name string) error
- func (t *S3) GetModified(name string) (int64, error)
- func (t *S3) GetSize(name string) (int64, error)
- func (t *S3) Has(name string) bool
- func (t *S3) Init(app interfaces.IEngine) error
- func (t *S3) IsFolder(name string) (bool, error)
- func (t *S3) List(path string) ([]string, error)
- func (t *S3) Put(name string, data io.Reader) error
- func (t *S3) Read(name string) (io.ReadCloser, error)
- func (t *S3) Stop() error
- func (t *S3) StoreFolder(name string) error
- func (t *S3) String() string
- type S3Config
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFileNotFound = errors.New("file not found")
View Source
var ErrNotSupported = errors.New("operation not supported")
View Source
var ErrTypeMismatch = errors.New("type mismatch")
Functions ¶
func NewFile ¶
func NewFile(name string, cfg FileConfig) interfaces.IStorage
Types ¶
type File ¶
type File struct { Name string // contains filtered or unexported fields }
func (*File) StoreFolder ¶
type FileConfig ¶ added in v0.4.3
type FileConfig struct {
Folder string `yaml:"folder"`
}
type Mock ¶ added in v0.3.0
type Mock struct {
Name string
}
func (*Mock) StoreFolder ¶ added in v0.3.0
type S3 ¶
type S3 struct { Name string // contains filtered or unexported fields }
func (*S3) StoreFolder ¶
Click to show internal directories.
Click to hide internal directories.