Documentation ¶
Index ¶
- type CoStorage
- func (tfs *CoStorage) Delete(ctx context.Context, path string) error
- func (tfs *CoStorage) PrivateUrl(ctx context.Context, path string) (string, error)
- func (tfs *CoStorage) PublicUrl(ctx context.Context, path string) (string, error)
- func (tfs *CoStorage) Read(ctx context.Context, path string) (string, error)
- func (tfs *CoStorage) ReadStream(ctx context.Context, path string) (io.Reader, error)
- func (tfs *CoStorage) Write(ctx context.Context, path string, contents string, config map[string]any) error
- func (tfs *CoStorage) WriteStream(ctx context.Context, path string, stream io.Reader, config map[string]any) error
- type LocalStorage
- func (s *LocalStorage) Delete(ctx context.Context, path string) error
- func (s *LocalStorage) PrivateUrl(ctx context.Context, path string) (string, error)
- func (s *LocalStorage) PublicUrl(ctx context.Context, path string) (string, error)
- func (s *LocalStorage) Read(ctx context.Context, path string) (string, error)
- func (s *LocalStorage) ReadStream(ctx context.Context, path string) (io.Reader, error)
- func (s *LocalStorage) Write(ctx context.Context, path string, contents string, ...) error
- func (s *LocalStorage) WriteStream(ctx context.Context, path string, stream io.Reader, ...) error
- type ObsStorage
- func (h *ObsStorage) Delete(ctx context.Context, path string) error
- func (h *ObsStorage) PrivateUrl(ctx context.Context, path string) (string, error)
- func (h *ObsStorage) PublicUrl(ctx context.Context, path string) (string, error)
- func (h *ObsStorage) Read(ctx context.Context, path string) (string, error)
- func (h *ObsStorage) ReadStream(ctx context.Context, path string) (io.Reader, error)
- func (h *ObsStorage) Write(ctx context.Context, path string, contents string, ...) error
- func (h *ObsStorage) WriteStream(ctx context.Context, path string, stream io.Reader, ...) error
- type OssStorage
- func (ofs *OssStorage) Delete(ctx context.Context, path string) error
- func (ofs *OssStorage) PrivateUrl(ctx context.Context, path string) (string, error)
- func (ofs *OssStorage) PublicUrl(ctx context.Context, path string) (string, error)
- func (ofs *OssStorage) Read(ctx context.Context, path string) (string, error)
- func (ofs *OssStorage) ReadStream(ctx context.Context, path string) (io.Reader, error)
- func (ofs *OssStorage) Write(ctx context.Context, path string, contents string, ...) error
- func (ofs *OssStorage) WriteStream(ctx context.Context, path string, stream io.Reader, ...) error
- type QiniuFileStorage
- func (qfs *QiniuFileStorage) Delete(ctx context.Context, path string) error
- func (qfs *QiniuFileStorage) PrivateUrl(ctx context.Context, path string) (string, error)
- func (qfs *QiniuFileStorage) PublicUrl(ctx context.Context, path string) (string, error)
- func (qfs *QiniuFileStorage) Read(ctx context.Context, path string) (string, error)
- func (qfs *QiniuFileStorage) ReadStream(ctx context.Context, path string) (io.Reader, error)
- func (qfs *QiniuFileStorage) Write(ctx context.Context, path string, contents string, config map[string]any) error
- func (qfs *QiniuFileStorage) WriteStream(ctx context.Context, path string, stream io.Reader, config map[string]any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoStorage ¶
func NewCoStorage ¶
func (*CoStorage) PrivateUrl ¶
func (*CoStorage) ReadStream ¶
type LocalStorage ¶
type LocalStorage struct {
// contains filtered or unexported fields
}
func NewLocalStorage ¶
func NewLocalStorage(root string, domain string) *LocalStorage
func (*LocalStorage) PrivateUrl ¶
func (*LocalStorage) ReadStream ¶
func (*LocalStorage) WriteStream ¶
type ObsStorage ¶ added in v1.0.1
type ObsStorage struct {
// contains filtered or unexported fields
}
func NewObsStorage ¶ added in v1.0.1
func (*ObsStorage) Delete ¶ added in v1.0.1
func (h *ObsStorage) Delete(ctx context.Context, path string) error
func (*ObsStorage) PrivateUrl ¶ added in v1.0.1
func (*ObsStorage) ReadStream ¶ added in v1.0.1
func (*ObsStorage) WriteStream ¶ added in v1.0.1
type OssStorage ¶
func NewOssStorage ¶
func NewOssStorage(accessKeyId, accessKeySecret, endpoint, bucketName, domain string) *OssStorage
func (*OssStorage) PrivateUrl ¶
func (*OssStorage) ReadStream ¶
func (*OssStorage) WriteStream ¶
type QiniuFileStorage ¶
func NewQiniuStorage ¶
func NewQiniuStorage(Bucket, AccessKey, SecretKey, Domain string) *QiniuFileStorage
func (*QiniuFileStorage) Delete ¶
func (qfs *QiniuFileStorage) Delete(ctx context.Context, path string) error
func (*QiniuFileStorage) PrivateUrl ¶
func (*QiniuFileStorage) ReadStream ¶
Click to show internal directories.
Click to hide internal directories.