Documentation ¶ Index ¶ type FS func NewFS() *FS func (fs *FS) Delete(path string) error func (fs *FS) Read(path string) (io.Reader, error) func (fs *FS) Type() Type func (fs *FS) Write(path string, r io.Reader) error type OSS func NewOSS(endpoint, accessKeyID, accessKeySecret, bucket string, ...) *OSS func (o *OSS) Delete(path string) error func (o *OSS) Read(path string) (io.Reader, error) func (o *OSS) Type() Type func (o *OSS) Write(path string, r io.Reader) error type Storager type Type Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type FS ¶ type FS struct{} func NewFS ¶ func NewFS() *FS func (*FS) Delete ¶ func (fs *FS) Delete(path string) error func (*FS) Read ¶ func (fs *FS) Read(path string) (io.Reader, error) func (*FS) Type ¶ func (fs *FS) Type() Type func (*FS) Write ¶ func (fs *FS) Write(path string, r io.Reader) error type OSS ¶ type OSS struct { // contains filtered or unexported fields } func NewOSS ¶ func NewOSS(endpoint, accessKeyID, accessKeySecret, bucket string, clientOptions []oss.ClientOption, options []oss.Option) *OSS func (*OSS) Delete ¶ func (o *OSS) Delete(path string) error func (*OSS) Read ¶ func (o *OSS) Read(path string) (io.Reader, error) func (*OSS) Type ¶ func (o *OSS) Type() Type func (*OSS) Write ¶ func (o *OSS) Write(path string, r io.Reader) error type Storager ¶ type Storager interface { Type() Type Read(path string) (io.Reader, error) Write(path string, r io.Reader) error Delete(path string) error } type Type ¶ type Type string var ( TypeFileSystem Type = "fs" TypeOSS Type = "oss" ) Source Files ¶ View all Source files fs.go oss.go storage.go Click to show internal directories. Click to hide internal directories.