Documentation ¶
Index ¶
- Variables
- func New(config *Config) flysystem.IAdapter
- type Config
- type FsOss
- func (f *FsOss) Copy(source, destination string) (bool, error)
- func (f *FsOss) CreateDirectory(dirname string) error
- func (f *FsOss) Delete(path string) (int64, error)
- func (f *FsOss) DiskName() string
- func (f *FsOss) Exists(path string) (bool, error)
- func (f *FsOss) GFSAdapter() gfs.IAdapter
- func (f *FsOss) MimeType(path string) (string, error)
- func (f *FsOss) Move(source, destination string) (bool, error)
- func (f *FsOss) Read(path string) ([]byte, error)
- func (f *FsOss) Size(path string) (int64, error)
- func (f *FsOss) URL(path string) (*url.URL, error)
- func (f *FsOss) Update(path string, contents []byte) (string, error)
- func (f *FsOss) UpdateStream(path, resource string) (string, error)
- func (f *FsOss) Write(path string, contents []byte) (string, error)
- func (f *FsOss) WriteReader(path string, reader io.Reader) (string, error)
- func (f *FsOss) WriteStream(path, resource string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultEndpoint = "oss-cn-hangzhou.aliyuncs.com"
)
Functions ¶
Types ¶
type Config ¶
type Config struct { CDN string `json:"cdn" xml:"CDN" yaml:"CDN"` Bucket string `json:"bucket" xml:"Bucket" yaml:"Bucket"` //https://help.aliyun.com/zh/oss/user-guide/regions-and-endpoints Endpoint string `json:"endpoint" xml:"Endpoint" yaml:"Endpoint"` AccessKeyID string `json:"access_key_id" xml:"AccessKeyID" yaml:"AccessKeyID"` AccessKeySecret string `json:"access_key_secret" xml:"AccessKeySecret" yaml:"AccessKeySecret"` Config *oss.Config `json:"config" xml:"Config" yaml:"Config"` PathPrefix string `json:"path_prefix" xml:"PathPrefix" yaml:"PathPrefix"` }
type FsOss ¶
type FsOss struct { gfs.AbstractAdapter Config *Config // contains filtered or unexported fields }
func (*FsOss) CreateDirectory ¶
func (*FsOss) GFSAdapter ¶ added in v0.3.0
func (*FsOss) WriteReader ¶ added in v0.0.2
Click to show internal directories.
Click to hide internal directories.