Documentation
¶
Index ¶
- func New(config *Config) flysystem.IAdapter
- type Config
- type FSCloudStorage
- func (a *FSCloudStorage) Copy(source, destination string) (bool, error)
- func (a *FSCloudStorage) Delete(path string) (int64, error)
- func (a *FSCloudStorage) DiskName() string
- func (a *FSCloudStorage) Exists(path string) (bool, error)
- func (a *FSCloudStorage) GFSAdapter() gfs.IAdapter
- func (a *FSCloudStorage) MimeType(path string) (string, error)
- func (a *FSCloudStorage) Move(source, destination string) (bool, error)
- func (a *FSCloudStorage) Read(path string) ([]byte, error)
- func (a *FSCloudStorage) Size(path string) (int64, error)
- func (a *FSCloudStorage) URL(path string) (*url.URL, error)
- func (a *FSCloudStorage) Update(path string, contents []byte) (string, error)
- func (a *FSCloudStorage) UpdateStream(path, resource string) (string, error)
- func (a *FSCloudStorage) Write(path string, contents []byte) (string, error)
- func (a *FSCloudStorage) WriteReader(path string, reader io.Reader) (string, error)
- func (a *FSCloudStorage) WriteStream(path, resource string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { CDN string `json:"cdn" xml:"CDN" yaml:"CDN"` Bucket string `json:"bucket" xml:"Bucket" yaml:"Bucket"` WithTimeout time.Duration `json:"with_timeout" xml:"WithTimeout" yaml:"WithTimeout"` CredentialsFile string `json:"credentials_file" xml:"CredentialsFile" yaml:"CredentialsFile"` CredentialsJSON string `json:"credentials_json" xml:"CredentialsJSON" yaml:"CredentialsJSON"` Option []option.ClientOption PathPrefix string `json:"path_prefix" xml:"PathPrefix" yaml:"PathPrefix"` }
type FSCloudStorage ¶ added in v0.1.1
type FSCloudStorage struct { gfs.AbstractAdapter Config *Config // contains filtered or unexported fields }
func NewCloudStorage ¶ added in v0.3.2
func NewCloudStorage(config *Config) *FSCloudStorage
func (*FSCloudStorage) Copy ¶ added in v0.1.1
func (a *FSCloudStorage) Copy(source, destination string) (bool, error)
func (*FSCloudStorage) Delete ¶ added in v0.1.1
func (a *FSCloudStorage) Delete(path string) (int64, error)
func (*FSCloudStorage) DiskName ¶ added in v0.1.1
func (a *FSCloudStorage) DiskName() string
func (*FSCloudStorage) Exists ¶ added in v0.1.1
func (a *FSCloudStorage) Exists(path string) (bool, error)
func (*FSCloudStorage) GFSAdapter ¶ added in v0.3.0
func (a *FSCloudStorage) GFSAdapter() gfs.IAdapter
func (*FSCloudStorage) MimeType ¶ added in v0.1.1
func (a *FSCloudStorage) MimeType(path string) (string, error)
func (*FSCloudStorage) Move ¶ added in v0.1.1
func (a *FSCloudStorage) Move(source, destination string) (bool, error)
func (*FSCloudStorage) Read ¶ added in v0.1.1
func (a *FSCloudStorage) Read(path string) ([]byte, error)
func (*FSCloudStorage) Size ¶ added in v0.1.1
func (a *FSCloudStorage) Size(path string) (int64, error)
func (*FSCloudStorage) URL ¶ added in v0.1.2
func (a *FSCloudStorage) URL(path string) (*url.URL, error)
func (*FSCloudStorage) Update ¶ added in v0.1.1
func (a *FSCloudStorage) Update(path string, contents []byte) (string, error)
func (*FSCloudStorage) UpdateStream ¶ added in v0.1.1
func (a *FSCloudStorage) UpdateStream(path, resource string) (string, error)
func (*FSCloudStorage) Write ¶ added in v0.1.1
func (a *FSCloudStorage) Write(path string, contents []byte) (string, error)
func (*FSCloudStorage) WriteReader ¶ added in v0.1.1
func (*FSCloudStorage) WriteStream ¶ added in v0.1.1
func (a *FSCloudStorage) WriteStream(path, resource string) (string, error)
Click to show internal directories.
Click to hide internal directories.