代码拉取完成,页面将自动刷新
package clouds_core
import (
"errors"
"io"
"time"
"gitee.com/shishshinedone/coauth"
)
const (
VersionOriginal = "1"
)
var (
ErrExisted = errors.New("存储对象重名或已存在")
ErrNotExisted = errors.New("该存储对象不存在")
)
type Options struct {
Timeout time.Duration // client超时时间
Version string // 令牌版本
Region string // 存储区域
}
type Clouds interface {
Init() error
Add(objectName, subdirectory string, objectReader io.Reader) (CloudsAdd, error)
Del(objectName string) error
Get(objectName string) (io.ReadSeeker, error)
GetBytes(objectName string) ([]byte, error)
Stat(objectName string) (CloudsStat, error)
Find(objectNamePrefix string) ([]string, error)
List() ([]string, error)
Destroy() error
Tags(objectName string) (map[string]string, error)
DelTags(objectName string) error
SetTags(objectName string, tags map[string]string) (map[string]string, error)
}
type CloudsAdd interface {
Name() string
Size() int64
}
type CloudsStat interface {
Name() string
Size() int64
ModTime() time.Time
}
func NewClouds(addr, name string, auth coauth.Coauth, options *Options) Clouds {
return newClouds(addr, name, auth, options)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。