clouds_core

package
v1.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionOriginal = "1"
)

Variables

View Source
var (
	ErrExisted    = errors.New("存储对象重名或已存在")
	ErrNotExisted = errors.New("该存储对象不存在")
)

Functions

This section is empty.

Types

type Clouds

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)
}

func NewClouds

func NewClouds(addr, name string, auth coauth.Coauth, options *Options) Clouds

type CloudsAdd added in v1.0.6

type CloudsAdd interface {
	Name() string
	Size() int64
}

type CloudsStat added in v1.0.0

type CloudsStat interface {
	Name() string
	Size() int64
	ModTime() time.Time
}

type Options

type Options struct {
	Timeout time.Duration // client超时时间
	Version string        // 令牌版本
	Region  string        // 存储区域
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL