Documentation
¶
Index ¶
- type Local
- func (l *Local) Delete(files ...string) error
- func (l *Local) Exists(file string) bool
- func (l *Local) LastModified(file string) (time.Time, error)
- func (l *Local) List(path string) ([]string, error)
- func (l *Local) Put(file string, content io.Reader) error
- func (l *Local) Size(file string) (int64, error)
- type S3
- type S3AddressingStyle
- type S3Config
- type SFTP
- func (s *SFTP) Delete(files ...string) error
- func (s *SFTP) Exists(file string) bool
- func (s *SFTP) LastModified(file string) (time.Time, error)
- func (s *SFTP) List(path string) ([]string, error)
- func (s *SFTP) Put(file string, content io.Reader) error
- func (s *SFTP) Size(file string) (int64, error)
- type SFTPConfig
- type Storage
- type WebDav
- func (w *WebDav) Delete(files ...string) error
- func (w *WebDav) Exists(file string) bool
- func (w *WebDav) LastModified(file string) (time.Time, error)
- func (w *WebDav) List(path string) ([]string, error)
- func (w *WebDav) Put(file string, content io.Reader) error
- func (w *WebDav) Size(file string) (int64, error)
- type WebDavConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
func (*Local) LastModified ¶
LastModified 获取文件最后修改时间
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
func (*S3) LastModified ¶
LastModified 获取文件最后修改时间
type S3AddressingStyle ¶
type S3AddressingStyle string
S3AddressingStyle S3 地址模式
const ( // S3AddressingStylePath Path 模式:https://s3.region.amazonaws.com/bucket/key S3AddressingStylePath S3AddressingStyle = "path" // S3AddressingStyleVirtualHosted Virtual Hosted 模式:https://bucket.s3.region.amazonaws.com/key S3AddressingStyleVirtualHosted S3AddressingStyle = "virtual-hosted" )
type SFTP ¶
type SFTP struct {
// contains filtered or unexported fields
}
func (*SFTP) LastModified ¶
LastModified 获取文件最后修改时间
type SFTPConfig ¶
type Storage ¶
type Storage interface {
// Delete deletes the given file(s).
Delete(file ...string) error
// Exists determines if a file exists.
Exists(file string) bool
// LastModified gets the file's last modified time.
LastModified(file string) (time.Time, error)
// List lists all files (not directories) in the given path.
List(path string) ([]string, error)
// Put writes the contents of a file.
Put(file string, content io.Reader) error
// Size gets the file size of a given file.
Size(file string) (int64, error)
}
func NewSFTP ¶
func NewSFTP(config SFTPConfig) (Storage, error)
func NewWebDav ¶
func NewWebDav(config WebDavConfig) (Storage, error)
type WebDav ¶
type WebDav struct {
// contains filtered or unexported fields
}
func (*WebDav) LastModified ¶
LastModified 获取文件最后修改时间
Click to show internal directories.
Click to hide internal directories.