types

package
v0.0.0-...-0dabf1d Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package types intends to provide all types used in storage layer.

Code generated by go generate cmd/definitions; DO NOT EDIT.

Code generated by go generate cmd/definitions; DO NOT EDIT.

Code generated by go generate cmd/definitions; DO NOT EDIT.

Code generated by go generate cmd/definitions; DO NOT EDIT.

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotImplemented will be returned while this operation is not
	// implemented by services.
	ErrNotImplemented = errorCode{"not implemented"}
)
View Source
var IterateDone error = errorCode{"iterate is done"}

IterateDone means this iterator has returned all data.

Functions

func NewOperationNotImplementedError

func NewOperationNotImplementedError(op string) error

NewOperationNotImplementedError will create a new NotImplemented error.

Types

type Appender deprecated

type Appender interface {
	// CommitAppend will commit and finish an append process.
	//
	// Deprecated: Moved to Storager.
	CommitAppend(o *Object, pairs ...Pair) (err error)
	// CommitAppendWithContext will commit and finish an append process.
	//
	// Deprecated: Moved to Storager.
	CommitAppendWithContext(ctx context.Context, o *Object, pairs ...Pair) (err error)

	// CreateAppend will create an append object.
	//
	// ## Behavior
	//
	// - CreateAppend SHOULD create an appendable object with position 0 and size 0.
	// - CreateAppend SHOULD NOT return an error as the object exist.
	//   - Service SHOULD check and delete the object if exists.
	//
	// Deprecated: Moved to Storager.
	CreateAppend(path string, pairs ...Pair) (o *Object, err error)
	// CreateAppendWithContext will create an append object.
	//
	// ## Behavior
	//
	// - CreateAppend SHOULD create an appendable object with position 0 and size 0.
	// - CreateAppend SHOULD NOT return an error as the object exist.
	//   - Service SHOULD check and delete the object if exists.
	//
	// Deprecated: Moved to Storager.
	CreateAppendWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

	// WriteAppend will append content to an append object.
	//
	// Deprecated: Moved to Storager.
	WriteAppend(o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error)
	// WriteAppendWithContext will append content to an append object.
	//
	// Deprecated: Moved to Storager.
	WriteAppendWithContext(ctx context.Context, o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error)
	// contains filtered or unexported methods
}

Appender is the interface for Append related operations.

Deprecated: Moved to Storager.

type Block

type Block struct {
	ID   string
	Size int64
}

Block is the block of Block Object.

type BlockIterator

type BlockIterator struct {
	// contains filtered or unexported fields
}

func NewBlockIterator

func NewBlockIterator(ctx context.Context, next NextBlockFunc, status Continuable) *BlockIterator

func (*BlockIterator) ContinuationToken

func (it *BlockIterator) ContinuationToken() string

func (*BlockIterator) Next

func (it *BlockIterator) Next() (object *Block, err error)

type BlockPage

type BlockPage struct {
	Status Continuable
	Data   []*Block
}

type Blocker deprecated

type Blocker interface {
	// CombineBlock will combine blocks into an object.
	//
	// Deprecated: Moved to Storager.
	CombineBlock(o *Object, bids []string, pairs ...Pair) (err error)
	// CombineBlockWithContext will combine blocks into an object.
	//
	// Deprecated: Moved to Storager.
	CombineBlockWithContext(ctx context.Context, o *Object, bids []string, pairs ...Pair) (err error)

	// CreateBlock will create a new block object.
	//
	// ## Behavior
	// - CreateBlock SHOULD NOT return an error as the object exist.
	//   - Service that has native support for `overwrite` doesn't NEED to check the object exists or not.
	//   - Service that doesn't have native support for `overwrite` SHOULD check and delete the object if
	// exists.
	//
	// Deprecated: Moved to Storager.
	CreateBlock(path string, pairs ...Pair) (o *Object, err error)
	// CreateBlockWithContext will create a new block object.
	//
	// ## Behavior
	// - CreateBlock SHOULD NOT return an error as the object exist.
	//   - Service that has native support for `overwrite` doesn't NEED to check the object exists or not.
	//   - Service that doesn't have native support for `overwrite` SHOULD check and delete the object if
	// exists.
	//
	// Deprecated: Moved to Storager.
	CreateBlockWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

	// ListBlock will list blocks belong to this object.
	//
	// Deprecated: Moved to Storager.
	ListBlock(o *Object, pairs ...Pair) (bi *BlockIterator, err error)
	// ListBlockWithContext will list blocks belong to this object.
	//
	// Deprecated: Moved to Storager.
	ListBlockWithContext(ctx context.Context, o *Object, pairs ...Pair) (bi *BlockIterator, err error)

	// WriteBlock will write content to a block.
	//
	// Deprecated: Moved to Storager.
	WriteBlock(o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error)
	// WriteBlockWithContext will write content to a block.
	//
	// Deprecated: Moved to Storager.
	WriteBlockWithContext(ctx context.Context, o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error)
	// contains filtered or unexported methods
}

Blocker is the interface for Block related operations.

Deprecated: Moved to Storager.

type Continuable

type Continuable interface {
	ContinuationToken() string
}

type Copier deprecated

type Copier interface {
	// Copy will copy an Object or multiple object in the service.
	//
	// ## Behavior
	//
	// - Copy only copy one and only one object.
	//   - Service DON'T NEED to support copy a non-empty directory or copy files recursively.
	//   - User NEED to implement copy a non-empty directory and copy recursively by themself.
	//   - Copy a file to a directory SHOULD return `ErrObjectModeInvalid`.
	// - Copy SHOULD NOT return an error as dst object exists.
	//   - Service that has native support for `overwrite` doesn't NEED to check the dst object exists or
	// not.
	//   - Service that doesn't have native support for `overwrite` SHOULD check and delete the dst object
	// if exists.
	// - A successful copy opration should be complete, which means the dst object's content and metadata
	// should be the same as src object.
	//
	// Deprecated: Moved to Storager.
	Copy(src string, dst string, pairs ...Pair) (err error)
	// CopyWithContext will copy an Object or multiple object in the service.
	//
	// ## Behavior
	//
	// - Copy only copy one and only one object.
	//   - Service DON'T NEED to support copy a non-empty directory or copy files recursively.
	//   - User NEED to implement copy a non-empty directory and copy recursively by themself.
	//   - Copy a file to a directory SHOULD return `ErrObjectModeInvalid`.
	// - Copy SHOULD NOT return an error as dst object exists.
	//   - Service that has native support for `overwrite` doesn't NEED to check the dst object exists or
	// not.
	//   - Service that doesn't have native support for `overwrite` SHOULD check and delete the dst object
	// if exists.
	// - A successful copy opration should be complete, which means the dst object's content and metadata
	// should be the same as src object.
	//
	// Deprecated: Moved to Storager.
	CopyWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error)
	// contains filtered or unexported methods
}

Copier is the interface for Copy.

Deprecated: Moved to Storager.

type DefaultServicePairs

type DefaultServicePairs struct {
	Create []Pair
	Delete []Pair
	Get    []Pair
	List   []Pair
}

DefaultServicePairs is the default pairs for Service.

type DefaultStoragePairs

type DefaultStoragePairs struct {
	CombineBlock                   []Pair
	CommitAppend                   []Pair
	CompleteMultipart              []Pair
	Copy                           []Pair
	Create                         []Pair
	CreateAppend                   []Pair
	CreateBlock                    []Pair
	CreateDir                      []Pair
	CreateLink                     []Pair
	CreateMultipart                []Pair
	CreatePage                     []Pair
	Delete                         []Pair
	Fetch                          []Pair
	List                           []Pair
	ListBlock                      []Pair
	ListMultipart                  []Pair
	Metadata                       []Pair
	Move                           []Pair
	QuerySignHTTPCompleteMultipart []Pair
	QuerySignHTTPCreateMultipart   []Pair
	QuerySignHTTPDelete            []Pair
	QuerySignHTTPListMultipart     []Pair
	QuerySignHTTPRead              []Pair
	QuerySignHTTPWrite             []Pair
	QuerySignHTTPWriteMultipart    []Pair
	Read                           []Pair
	Stat                           []Pair
	Write                          []Pair
	WriteAppend                    []Pair
	WriteBlock                     []Pair
	WriteMultipart                 []Pair
	WritePage                      []Pair
}

DefaultStoragePairs is the default pairs for Storage.

type Direr deprecated

type Direr interface {
	// CreateDir will create a new dir object.
	//
	// Deprecated: Moved to Storager.
	CreateDir(path string, pairs ...Pair) (o *Object, err error)
	// CreateDirWithContext will create a new dir object.
	//
	// Deprecated: Moved to Storager.
	CreateDirWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)
	// contains filtered or unexported methods
}

Direr is the interface for Directory.

Deprecated: Moved to Storager.

type Fetcher deprecated

type Fetcher interface {
	// Fetch will fetch from a given url to path.
	//
	// ## Behavior
	//
	// - Fetch SHOULD NOT return an error as the object exists.
	// - A successful fetch operation should be complete, which means the object's content and metadata
	// should be the same as requiring from the url.
	//
	// Deprecated: Moved to Storager.
	Fetch(path string, url string, pairs ...Pair) (err error)
	// FetchWithContext will fetch from a given url to path.
	//
	// ## Behavior
	//
	// - Fetch SHOULD NOT return an error as the object exists.
	// - A successful fetch operation should be complete, which means the object's content and metadata
	// should be the same as requiring from the url.
	//
	// Deprecated: Moved to Storager.
	FetchWithContext(ctx context.Context, path string, url string, pairs ...Pair) (err error)
	// contains filtered or unexported methods
}

Fetcher is the interface for Fetch.

Deprecated: Moved to Storager.

type Interceptor

type Interceptor func(ctx context.Context, method string) func(error)

func ChainInterceptor

func ChainInterceptor(interceptors ...Interceptor) Interceptor

type Linker deprecated

type Linker interface {
	// CreateLink Will create a link object.
	//
	// # Behavior
	//
	// - `path` and `target` COULD be relative or absolute path.
	// - If `target` not exists, CreateLink will still create a link object to path.
	// - If `path` exists:
	//   - If `path` is a symlink object, CreateLink will remove the symlink object and create a new link object
	// to path.
	//   - If `path` is not a symlink object, CreateLink will return an ErrObjectModeInvalid error when
	// the service does not support overwrite.
	// - A link object COULD be returned in `Stat` or `List`.
	// - CreateLink COULD implement virtual_link feature when service without native support.
	//   - Users SHOULD enable this feature by themselves.
	//
	// Deprecated: Moved to Storager.
	CreateLink(path string, target string, pairs ...Pair) (o *Object, err error)
	// CreateLinkWithContext Will create a link object.
	//
	// # Behavior
	//
	// - `path` and `target` COULD be relative or absolute path.
	// - If `target` not exists, CreateLink will still create a link object to path.
	// - If `path` exists:
	//   - If `path` is a symlink object, CreateLink will remove the symlink object and create a new link object
	// to path.
	//   - If `path` is not a symlink object, CreateLink will return an ErrObjectModeInvalid error when
	// the service does not support overwrite.
	// - A link object COULD be returned in `Stat` or `List`.
	// - CreateLink COULD implement virtual_link feature when service without native support.
	//   - Users SHOULD enable this feature by themselves.
	//
	// Deprecated: Moved to Storager.
	CreateLinkWithContext(ctx context.Context, path string, target string, pairs ...Pair) (o *Object, err error)
	// contains filtered or unexported methods
}

Linker is the interface for link.

Deprecated: Moved to Storager.

type ListMode

type ListMode uint8

ListMode is the type for list, underlying type is int.

const (
	// ListModeDir means this list will use dir type.
	ListModeDir ListMode = 1 << iota
	// ListModePrefix means this list will use prefix type.
	ListModePrefix
	ListModePart
	ListModeBlock
)

func (ListMode) IsBlock

func (l ListMode) IsBlock() bool

func (ListMode) IsDir

func (l ListMode) IsDir() bool

func (ListMode) IsPart

func (l ListMode) IsPart() bool

func (ListMode) IsPrefix

func (l ListMode) IsPrefix() bool

func (ListMode) String

func (l ListMode) String() string

String implement Stringer for ListMode.

An object with Dir,Part will print like "dir|part"

type Mover deprecated

type Mover interface {
	// Move will move an object in the service.
	//
	// ## Behavior
	//
	// - Move only move one and only one object.
	//   - Service DON'T NEED to support move a non-empty directory.
	//   - User NEED to implement move a non-empty directory by themself.
	//   - Move a file to a directory SHOULD return `ErrObjectModeInvalid`.
	// - Move SHOULD NOT return an error as dst object exists.
	//   - Service that has native support for `overwrite` doesn't NEED to check the dst object exists or
	// not.
	//   - Service that doesn't have native support for `overwrite` SHOULD check and delete the dst object
	// if exists.
	// - A successful move operation SHOULD be complete, which means the dst object's content and metadata
	// should be the same as src object.
	//
	// Deprecated: Moved to Storager.
	Move(src string, dst string, pairs ...Pair) (err error)
	// MoveWithContext will move an object in the service.
	//
	// ## Behavior
	//
	// - Move only move one and only one object.
	//   - Service DON'T NEED to support move a non-empty directory.
	//   - User NEED to implement move a non-empty directory by themself.
	//   - Move a file to a directory SHOULD return `ErrObjectModeInvalid`.
	// - Move SHOULD NOT return an error as dst object exists.
	//   - Service that has native support for `overwrite` doesn't NEED to check the dst object exists or
	// not.
	//   - Service that doesn't have native support for `overwrite` SHOULD check and delete the dst object
	// if exists.
	// - A successful move operation SHOULD be complete, which means the dst object's content and metadata
	// should be the same as src object.
	//
	// Deprecated: Moved to Storager.
	MoveWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error)
	// contains filtered or unexported methods
}

Mover is the interface for Move.

Deprecated: Moved to Storager.

type MultipartHTTPSigner deprecated

type MultipartHTTPSigner interface {
	// QuerySignHTTPCompleteMultipart will complete a multipart upload and construct an Object by
	// using query parameters to authenticate requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPCompleteMultipart(o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPCompleteMultipartWithContext will complete a multipart upload and construct
	// an Object by using query parameters to authenticate requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPCompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPCreateMultipart will create a new multipart by using query parameters to authenticate
	// requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPCreateMultipart(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPCreateMultipartWithContext will create a new multipart by using query parameters
	// to authenticate requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPCreateMultipartWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPListMultipart will list parts belong to this multipart by using query parameters
	// to authenticate requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPListMultipart(o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPListMultipartWithContext will list parts belong to this multipart by using query
	// parameters to authenticate requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPListMultipartWithContext(ctx context.Context, o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPWriteMultipart will write content to a multipart by using query parameters to authenticate
	// requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPWriteMultipart(o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPWriteMultipartWithContext will write content to a multipart by using query parameters
	// to authenticate requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPWriteMultipartWithContext(ctx context.Context, o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// contains filtered or unexported methods
}

MultipartHTTPSigner is the interface for Multiparter related operations which support authentication.

Deprecated: Moved to Storager.

type Multiparter deprecated

type Multiparter interface {
	// CompleteMultipart will complete a multipart upload and construct an Object.
	//
	// Deprecated: Moved to Storager.
	CompleteMultipart(o *Object, parts []*Part, pairs ...Pair) (err error)
	// CompleteMultipartWithContext will complete a multipart upload and construct an Object.
	//
	// Deprecated: Moved to Storager.
	CompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, pairs ...Pair) (err error)

	// CreateMultipart will create a new multipart.
	//
	// ## Behavior
	//
	// - CreateMultipart SHOULD NOT return an error as the object exists.
	//
	// Deprecated: Moved to Storager.
	CreateMultipart(path string, pairs ...Pair) (o *Object, err error)
	// CreateMultipartWithContext will create a new multipart.
	//
	// ## Behavior
	//
	// - CreateMultipart SHOULD NOT return an error as the object exists.
	//
	// Deprecated: Moved to Storager.
	CreateMultipartWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

	// ListMultipart will list parts belong to this multipart.
	//
	// Deprecated: Moved to Storager.
	ListMultipart(o *Object, pairs ...Pair) (pi *PartIterator, err error)
	// ListMultipartWithContext will list parts belong to this multipart.
	//
	// Deprecated: Moved to Storager.
	ListMultipartWithContext(ctx context.Context, o *Object, pairs ...Pair) (pi *PartIterator, err error)

	// WriteMultipart will write content to a multipart.
	//
	// Deprecated: Moved to Storager.
	WriteMultipart(o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error)
	// WriteMultipartWithContext will write content to a multipart.
	//
	// Deprecated: Moved to Storager.
	WriteMultipartWithContext(ctx context.Context, o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error)
	// contains filtered or unexported methods
}

Multiparter is the interface for Multipart related operations.

Deprecated: Moved to Storager.

type NextBlockFunc

type NextBlockFunc func(ctx context.Context, page *BlockPage) error

NextBlockFunc is the func used in iterator.

Notes - ErrDone should be return while there are no items any more. - Input Block slice should be set every time.

type NextObjectFunc

type NextObjectFunc func(ctx context.Context, page *ObjectPage) error

NextObjectFunc is the func used in iterator.

Notes - ErrDone should be return while there are no items any more. - Input Object slice should be set every time.

type NextPartFunc

type NextPartFunc func(ctx context.Context, page *PartPage) error

NextPartFunc is the func used in iterator.

Notes - ErrDone should be return while there are no items any more. - Input Part slice should be set every time.

type NextStoragerFunc

type NextStoragerFunc func(ctx context.Context, page *StoragerPage) error

NextStoragerFunc is the func used in iterator.

Notes - ErrDone should be return while there are no items any more. - Input Storager slice should be set every time.

type Object

type Object struct {

	// ID is the unique key in storage.
	//
	// ID SHOULD be an absolute path compatible with the target operating system-defined file paths,
	// or a unique identifier specified by service.
	ID string

	Mode ObjectMode

	// Path is either the absolute path or the relative path towards storage's WorkDir depends on user's
	// input.
	//
	// Path SHOULD be Unix style.
	Path string
	// contains filtered or unexported fields
}

Object is the smallest unit in go-storage.

NOTES:

func NewObject

func NewObject(client Storager, done bool) *Object

NewObject will create a new object with client.

func (*Object) GetAppendOffset

func (o *Object) GetAppendOffset() (int64, bool)

GetAppendOffset will get AppendOffset from Object.

AppendOffset is the offset of the append object.

func (*Object) GetContentDisposition

func (o *Object) GetContentDisposition() (string, bool)

GetContentDisposition will get ContentDisposition from Object.

func (*Object) GetContentLength

func (o *Object) GetContentLength() (int64, bool)

GetContentLength will get ContentLength from Object.

func (*Object) GetContentMd5

func (o *Object) GetContentMd5() (string, bool)

GetContentMd5 will get ContentMd5 from Object.

func (*Object) GetContentType

func (o *Object) GetContentType() (string, bool)

GetContentType will get ContentType from Object.

func (*Object) GetEtag

func (o *Object) GetEtag() (string, bool)

GetEtag will get Etag from Object.

func (*Object) GetID

func (o *Object) GetID() string

func (*Object) GetLastModified

func (o *Object) GetLastModified() (time.Time, bool)

GetLastModified will get LastModified from Object.

func (*Object) GetLinkTarget

func (o *Object) GetLinkTarget() (string, bool)

GetLinkTarget will get LinkTarget from Object.

LinkTarget is the symlink target for link object.

func (*Object) GetMode

func (o *Object) GetMode() ObjectMode

func (*Object) GetMultipartID

func (o *Object) GetMultipartID() (string, bool)

GetMultipartID will get MultipartID from Object.

MultipartID is the part id of part object.

func (*Object) GetPath

func (o *Object) GetPath() string

func (*Object) GetSystemMetadata

func (o *Object) GetSystemMetadata() (interface{}, bool)

GetSystemMetadata will get SystemMetadata from Object.

SystemMetadata stores system defined metadata.

func (*Object) GetUserMetadata

func (o *Object) GetUserMetadata() (map[string]string, bool)

GetUserMetadata will get UserMetadata from Object.

UserMetadata stores user defined metadata.

func (*Object) MustGetAppendOffset

func (o *Object) MustGetAppendOffset() int64

MustGetAppendOffset will get AppendOffset from Object.

AppendOffset is the offset of the append object.

func (*Object) MustGetContentDisposition

func (o *Object) MustGetContentDisposition() string

MustGetContentDisposition will get ContentDisposition from Object.

func (*Object) MustGetContentLength

func (o *Object) MustGetContentLength() int64

MustGetContentLength will get ContentLength from Object.

func (*Object) MustGetContentMd5

func (o *Object) MustGetContentMd5() string

MustGetContentMd5 will get ContentMd5 from Object.

func (*Object) MustGetContentType

func (o *Object) MustGetContentType() string

MustGetContentType will get ContentType from Object.

func (*Object) MustGetEtag

func (o *Object) MustGetEtag() string

MustGetEtag will get Etag from Object.

func (*Object) MustGetLastModified

func (o *Object) MustGetLastModified() time.Time

MustGetLastModified will get LastModified from Object.

func (*Object) MustGetLinkTarget

func (o *Object) MustGetLinkTarget() string

MustGetLinkTarget will get LinkTarget from Object.

LinkTarget is the symlink target for link object.

func (*Object) MustGetMultipartID

func (o *Object) MustGetMultipartID() string

MustGetMultipartID will get MultipartID from Object.

MultipartID is the part id of part object.

func (*Object) MustGetSystemMetadata

func (o *Object) MustGetSystemMetadata() interface{}

MustGetSystemMetadata will get SystemMetadata from Object.

SystemMetadata stores system defined metadata.

func (*Object) MustGetUserMetadata

func (o *Object) MustGetUserMetadata() map[string]string

MustGetUserMetadata will get UserMetadata from Object.

UserMetadata stores user defined metadata.

func (*Object) SetAppendOffset

func (o *Object) SetAppendOffset(v int64) *Object

SetAppendOffset will get AppendOffset into Object.

AppendOffset is the offset of the append object.

func (*Object) SetContentDisposition

func (o *Object) SetContentDisposition(v string) *Object

SetContentDisposition will get ContentDisposition into Object.

func (*Object) SetContentLength

func (o *Object) SetContentLength(v int64) *Object

SetContentLength will get ContentLength into Object.

func (*Object) SetContentMd5

func (o *Object) SetContentMd5(v string) *Object

SetContentMd5 will get ContentMd5 into Object.

func (*Object) SetContentType

func (o *Object) SetContentType(v string) *Object

SetContentType will get ContentType into Object.

func (*Object) SetEtag

func (o *Object) SetEtag(v string) *Object

SetEtag will get Etag into Object.

func (*Object) SetID

func (o *Object) SetID(v string) *Object

func (*Object) SetLastModified

func (o *Object) SetLastModified(v time.Time) *Object

SetLastModified will get LastModified into Object.

func (*Object) SetLinkTarget

func (o *Object) SetLinkTarget(v string) *Object

SetLinkTarget will get LinkTarget into Object.

LinkTarget is the symlink target for link object.

func (*Object) SetMode

func (o *Object) SetMode(v ObjectMode) *Object

func (*Object) SetMultipartID

func (o *Object) SetMultipartID(v string) *Object

SetMultipartID will get MultipartID into Object.

MultipartID is the part id of part object.

func (*Object) SetPath

func (o *Object) SetPath(v string) *Object

func (*Object) SetSystemMetadata

func (o *Object) SetSystemMetadata(v interface{}) *Object

SetSystemMetadata will get SystemMetadata into Object.

SystemMetadata stores system defined metadata.

func (*Object) SetUserMetadata

func (o *Object) SetUserMetadata(v map[string]string) *Object

SetUserMetadata will get UserMetadata into Object.

UserMetadata stores user defined metadata.

type ObjectIterator

type ObjectIterator struct {
	// contains filtered or unexported fields
}

func NewObjectIterator

func NewObjectIterator(ctx context.Context, next NextObjectFunc, status Continuable) *ObjectIterator

func (*ObjectIterator) ContinuationToken

func (it *ObjectIterator) ContinuationToken() string

func (*ObjectIterator) Next

func (it *ObjectIterator) Next() (object *Object, err error)

type ObjectMode

type ObjectMode uint32

ObjectMode describes what users can operate on this object.

Different object modes are orthogonal, and an object could have different object modes at the same time.

For example:

- ModeDir means we can do list on this object('s path) - ModeRead means we can read it as a normal file - ModeLink means we can read this object's link target

And we can compose them together:

- ModeRead | ModeLink: Think about a symlink, we can still read it. - ModeDir | ModeLink: Think about a symlink to dir. - ModeAppend | ModeRead: file in fs could be both read and append.

Reference

- GSP-25: https://github.com/beyondstorage/specs/blob/master/rfcs/25-object-mode.md - Core Concept Object: https://beyondstorage.io/docs/go-storage/internal/core-concept#object

const (
	// ModeDir means this Object represents a dir which can be used to list with dir mode.
	ModeDir ObjectMode = 1 << iota
	// ModeRead means this Object can be used to read content.
	ModeRead
	// ModeLink means this Object is a link which targets to another Object.
	ModeLink
	// ModePart means this Object is a Multipart Object which can be used for multipart operations.
	ModePart
	// ModeBlock means this Object is a Block Object which can be used for block operations.
	ModeBlock
	// ModePage means this Object is a Page Object which can be used for random write with offset.
	ModePage
	// ModeAppend means this Object is a Append Object which can be used for append.
	ModeAppend
)

All available object mode

func (*ObjectMode) Add

func (o *ObjectMode) Add(mode ObjectMode)

Add support add ObjectMode into current one.

Example
var o ObjectMode
o.Add(ModeDir)
o.Add(ModeRead | ModeAppend)
Output:

func (*ObjectMode) Del

func (o *ObjectMode) Del(mode ObjectMode)

Del support delete ObjectMode from current one.

Example
o := ModeRead | ModeAppend
o.Del(ModeAppend)
o.Del(ModeRead | ModeAppend)
Output:

func (ObjectMode) IsAppend

func (o ObjectMode) IsAppend() bool

func (ObjectMode) IsBlock

func (o ObjectMode) IsBlock() bool

func (ObjectMode) IsDir

func (o ObjectMode) IsDir() bool
func (o ObjectMode) IsLink() bool

func (ObjectMode) IsPage

func (o ObjectMode) IsPage() bool

func (ObjectMode) IsPart

func (o ObjectMode) IsPart() bool

func (ObjectMode) IsRead

func (o ObjectMode) IsRead() bool

func (ObjectMode) String

func (o ObjectMode) String() string

String implement Stringer for ObjectMode.

An object with Read,Append will print like "read|append"

type ObjectPage

type ObjectPage struct {
	Status Continuable
	Data   []*Object
}

type OperationError

type OperationError struct {
	// contains filtered or unexported fields
}

OperationError is the error for operation related errors.

func (OperationError) Error

func (oe OperationError) Error() string

func (OperationError) IsInternalError

func (oe OperationError) IsInternalError()

func (OperationError) Unwrap

func (oe OperationError) Unwrap() error

type Pager deprecated

type Pager interface {
	// CreatePage will create a new page object.
	//
	// ## Behavior
	//
	// - CreatePage SHOULD NOT return an error as the object exists.
	//
	// Deprecated: Moved to Storager.
	CreatePage(path string, pairs ...Pair) (o *Object, err error)
	// CreatePageWithContext will create a new page object.
	//
	// ## Behavior
	//
	// - CreatePage SHOULD NOT return an error as the object exists.
	//
	// Deprecated: Moved to Storager.
	CreatePageWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

	// WritePage will write content to specific offset.
	//
	// Deprecated: Moved to Storager.
	WritePage(o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error)
	// WritePageWithContext will write content to specific offset.
	//
	// Deprecated: Moved to Storager.
	WritePageWithContext(ctx context.Context, o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error)
	// contains filtered or unexported methods
}

Pager is the interface for Page related operations which support random write.

Deprecated: Moved to Storager.

type Pair

type Pair struct {
	Key   string
	Value interface{}
}

Pair will store option for storage service.

func (Pair) String

func (p Pair) String() string

type Part

type Part struct {
	Index int
	Size  int64
	ETag  string
}

Part is the part of Multipart Object.

type PartIterator

type PartIterator struct {
	// contains filtered or unexported fields
}

func NewPartIterator

func NewPartIterator(ctx context.Context, next NextPartFunc, status Continuable) *PartIterator

func (*PartIterator) ContinuationToken

func (it *PartIterator) ContinuationToken() string

func (*PartIterator) Next

func (it *PartIterator) Next() (object *Part, err error)

type PartPage

type PartPage struct {
	Status Continuable
	Data   []*Part
}

type ServiceFeatures

type ServiceFeatures struct {
	LoosePair bool
	Create    bool
	Delete    bool
	Get       bool
	List      bool
}

ServiceFeatures indicates features supported by servicer.

func (ServiceFeatures) Has

func (s ServiceFeatures) Has(name string) bool

type Servicer

type Servicer interface {
	String() string
	Features() ServiceFeatures
	// Create will create a new storager instance.
	Create(name string, pairs ...Pair) (store Storager, err error)
	// CreateWithContext will create a new storager instance.
	CreateWithContext(ctx context.Context, name string, pairs ...Pair) (store Storager, err error)

	// Delete will delete a storager instance.
	Delete(name string, pairs ...Pair) (err error)
	// DeleteWithContext will delete a storager instance.
	DeleteWithContext(ctx context.Context, name string, pairs ...Pair) (err error)

	// Get will get a valid storager instance for service.
	Get(name string, pairs ...Pair) (store Storager, err error)
	// GetWithContext will get a valid storager instance for service.
	GetWithContext(ctx context.Context, name string, pairs ...Pair) (store Storager, err error)

	// List will list all storager instances under this service.
	List(pairs ...Pair) (sti *StoragerIterator, err error)
	// ListWithContext will list all storager instances under this service.
	ListWithContext(ctx context.Context, pairs ...Pair) (sti *StoragerIterator, err error)
	// contains filtered or unexported methods
}

type StorageFeatures

type StorageFeatures struct {
	LoosePair                      bool
	VirtualDir                     bool
	VirtualLink                    bool
	VirtualObjectMetadata          bool
	WriteEmptyObject               bool
	Create                         bool
	Delete                         bool
	Metadata                       bool
	List                           bool
	Read                           bool
	Stat                           bool
	Write                          bool
	CreateAppend                   bool
	WriteAppend                    bool
	CommitAppend                   bool
	CreateBlock                    bool
	WriteBlock                     bool
	CombineBlock                   bool
	ListBlock                      bool
	Copy                           bool
	CreateDir                      bool
	Fetch                          bool
	CreateLink                     bool
	Move                           bool
	CreateMultipart                bool
	WriteMultipart                 bool
	CompleteMultipart              bool
	ListMultipart                  bool
	CreatePage                     bool
	WritePage                      bool
	QuerySignHTTPRead              bool
	QuerySignHTTPWrite             bool
	QuerySignHTTPDelete            bool
	QuerySignHTTPCreateMultipart   bool
	QuerySignHTTPWriteMultipart    bool
	QuerySignHTTPListMultipart     bool
	QuerySignHTTPCompleteMultipart bool
}

StorageFeatures indicates features supported by servicer.

func (StorageFeatures) Has

func (s StorageFeatures) Has(name string) bool

type StorageHTTPSigner deprecated

type StorageHTTPSigner interface {
	// QuerySignHTTPDelete will delete an object from service by using query parameters to authenticate
	// requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPDelete(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPDeleteWithContext will delete an object from service by using query parameters
	// to authenticate requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPDeleteWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPRead will read data from the file by using query parameters to authenticate requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPRead(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPReadWithContext will read data from the file by using query parameters to authenticate
	// requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPReadWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPWrite will write data into a file by using query parameters to authenticate requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPWrite(path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPWriteWithContext will write data into a file by using query parameters to authenticate
	// requests.
	//
	// Deprecated: Moved to Storager.
	QuerySignHTTPWriteWithContext(ctx context.Context, path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// contains filtered or unexported methods
}

StorageHTTPSigner is the interface for Storager related operations which support authentication.

Deprecated: Moved to Storager.

type StorageMeta

type StorageMeta struct {
	Name    string
	Service string

	WorkDir string
	// contains filtered or unexported fields
}

func NewStorageMeta

func NewStorageMeta() *StorageMeta

NewStorageMeta will create a new StorageMeta.

func (*StorageMeta) GetAppendNumberMaximum

func (m *StorageMeta) GetAppendNumberMaximum() (int, bool)

func (*StorageMeta) GetAppendSizeMaximum

func (m *StorageMeta) GetAppendSizeMaximum() (int64, bool)

func (*StorageMeta) GetAppendTotalSizeMaximum

func (m *StorageMeta) GetAppendTotalSizeMaximum() (int64, bool)

func (*StorageMeta) GetCopySizeMaximum

func (m *StorageMeta) GetCopySizeMaximum() (int64, bool)

func (*StorageMeta) GetFetchSizeMaximum

func (m *StorageMeta) GetFetchSizeMaximum() (int64, bool)

func (*StorageMeta) GetLocation

func (m *StorageMeta) GetLocation() (string, bool)

func (*StorageMeta) GetMoveSizeMaximum

func (m *StorageMeta) GetMoveSizeMaximum() (int64, bool)

func (*StorageMeta) GetMultipartNumberMaximum

func (m *StorageMeta) GetMultipartNumberMaximum() (int, bool)

func (*StorageMeta) GetMultipartSizeMaximum

func (m *StorageMeta) GetMultipartSizeMaximum() (int64, bool)

func (*StorageMeta) GetMultipartSizeMinimum

func (m *StorageMeta) GetMultipartSizeMinimum() (int64, bool)

func (*StorageMeta) GetName

func (m *StorageMeta) GetName() string

func (*StorageMeta) GetService

func (m *StorageMeta) GetService() string

func (*StorageMeta) GetSystemMetadata

func (m *StorageMeta) GetSystemMetadata() (interface{}, bool)

func (*StorageMeta) GetWorkDir

func (m *StorageMeta) GetWorkDir() string

func (*StorageMeta) GetWriteSizeMaximum

func (m *StorageMeta) GetWriteSizeMaximum() (int64, bool)

func (*StorageMeta) MustGetAppendNumberMaximum

func (m *StorageMeta) MustGetAppendNumberMaximum() int

func (*StorageMeta) MustGetAppendSizeMaximum

func (m *StorageMeta) MustGetAppendSizeMaximum() int64

func (*StorageMeta) MustGetAppendTotalSizeMaximum

func (m *StorageMeta) MustGetAppendTotalSizeMaximum() int64

func (*StorageMeta) MustGetCopySizeMaximum

func (m *StorageMeta) MustGetCopySizeMaximum() int64

func (*StorageMeta) MustGetFetchSizeMaximum

func (m *StorageMeta) MustGetFetchSizeMaximum() int64

func (*StorageMeta) MustGetLocation

func (m *StorageMeta) MustGetLocation() string

func (*StorageMeta) MustGetMoveSizeMaximum

func (m *StorageMeta) MustGetMoveSizeMaximum() int64

func (*StorageMeta) MustGetMultipartNumberMaximum

func (m *StorageMeta) MustGetMultipartNumberMaximum() int

func (*StorageMeta) MustGetMultipartSizeMaximum

func (m *StorageMeta) MustGetMultipartSizeMaximum() int64

func (*StorageMeta) MustGetMultipartSizeMinimum

func (m *StorageMeta) MustGetMultipartSizeMinimum() int64

func (*StorageMeta) MustGetSystemMetadata

func (m *StorageMeta) MustGetSystemMetadata() interface{}

func (*StorageMeta) MustGetWriteSizeMaximum

func (m *StorageMeta) MustGetWriteSizeMaximum() int64

func (*StorageMeta) SetAppendNumberMaximum

func (m *StorageMeta) SetAppendNumberMaximum(v int) *StorageMeta

func (*StorageMeta) SetAppendSizeMaximum

func (m *StorageMeta) SetAppendSizeMaximum(v int64) *StorageMeta

func (*StorageMeta) SetAppendTotalSizeMaximum

func (m *StorageMeta) SetAppendTotalSizeMaximum(v int64) *StorageMeta

func (*StorageMeta) SetCopySizeMaximum

func (m *StorageMeta) SetCopySizeMaximum(v int64) *StorageMeta

func (*StorageMeta) SetFetchSizeMaximum

func (m *StorageMeta) SetFetchSizeMaximum(v int64) *StorageMeta

func (*StorageMeta) SetLocation

func (m *StorageMeta) SetLocation(v string) *StorageMeta

func (*StorageMeta) SetMoveSizeMaximum

func (m *StorageMeta) SetMoveSizeMaximum(v int64) *StorageMeta

func (*StorageMeta) SetMultipartNumberMaximum

func (m *StorageMeta) SetMultipartNumberMaximum(v int) *StorageMeta

func (*StorageMeta) SetMultipartSizeMaximum

func (m *StorageMeta) SetMultipartSizeMaximum(v int64) *StorageMeta

func (*StorageMeta) SetMultipartSizeMinimum

func (m *StorageMeta) SetMultipartSizeMinimum(v int64) *StorageMeta

func (*StorageMeta) SetName

func (m *StorageMeta) SetName(v string) *StorageMeta

func (*StorageMeta) SetService

func (m *StorageMeta) SetService(v string) *StorageMeta

func (*StorageMeta) SetSystemMetadata

func (m *StorageMeta) SetSystemMetadata(v interface{}) *StorageMeta

func (*StorageMeta) SetWorkDir

func (m *StorageMeta) SetWorkDir(v string) *StorageMeta

func (*StorageMeta) SetWriteSizeMaximum

func (m *StorageMeta) SetWriteSizeMaximum(v int64) *StorageMeta

type Storager

type Storager interface {
	String() string
	Features() StorageFeatures
	// CombineBlock will combine blocks into an object.
	CombineBlock(o *Object, bids []string, pairs ...Pair) (err error)
	// CombineBlockWithContext will combine blocks into an object.
	CombineBlockWithContext(ctx context.Context, o *Object, bids []string, pairs ...Pair) (err error)

	// CommitAppend will commit and finish an append process.
	CommitAppend(o *Object, pairs ...Pair) (err error)
	// CommitAppendWithContext will commit and finish an append process.
	CommitAppendWithContext(ctx context.Context, o *Object, pairs ...Pair) (err error)

	// CompleteMultipart will complete a multipart upload and construct an Object.
	CompleteMultipart(o *Object, parts []*Part, pairs ...Pair) (err error)
	// CompleteMultipartWithContext will complete a multipart upload and construct an Object.
	CompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, pairs ...Pair) (err error)

	// Copy will copy an Object or multiple object in the service.
	//
	// ## Behavior
	//
	// - Copy only copy one and only one object.
	//   - Service DON'T NEED to support copy a non-empty directory or copy files recursively.
	//   - User NEED to implement copy a non-empty directory and copy recursively by themself.
	//   - Copy a file to a directory SHOULD return ErrObjectModeInvalid.
	//
	// - Copy SHOULD NOT return an error as dst object exists.
	//   - Service that has native support for overwrite doesn't NEED to check the dst object exists or not.
	//   - Service that doesn't have native support for overwrite SHOULD check and delete the dst object
	//
	// if exists.
	// - A successful copy opration should be complete, which means the dst object's content and metadata
	// should be the same as src object.
	Copy(src string, dst string, pairs ...Pair) (err error)
	// CopyWithContext will copy an Object or multiple object in the service.
	//
	// ## Behavior
	//
	// - Copy only copy one and only one object.
	//   - Service DON'T NEED to support copy a non-empty directory or copy files recursively.
	//   - User NEED to implement copy a non-empty directory and copy recursively by themself.
	//   - Copy a file to a directory SHOULD return ErrObjectModeInvalid.
	//
	// - Copy SHOULD NOT return an error as dst object exists.
	//   - Service that has native support for overwrite doesn't NEED to check the dst object exists or not.
	//   - Service that doesn't have native support for overwrite SHOULD check and delete the dst object
	//
	// if exists.
	// - A successful copy opration should be complete, which means the dst object's content and metadata
	// should be the same as src object.
	CopyWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error)

	// Create will create a new object without any api call.
	//
	// ## Behavior
	//
	// - Create SHOULD NOT send any API call.
	// - Create SHOULD accept ObjectMode pair as object mode.
	Create(path string, pairs ...Pair) (o *Object)

	// CreateAppend will create an append object.
	//
	// ## Behavior
	//
	// - CreateAppend SHOULD create an appendable object with position 0 and size 0.
	// - CreateAppend SHOULD NOT return an error as the object exist.
	//   - Service SHOULD check and delete the object if exists.
	CreateAppend(path string, pairs ...Pair) (o *Object, err error)
	// CreateAppendWithContext will create an append object.
	//
	// ## Behavior
	//
	// - CreateAppend SHOULD create an appendable object with position 0 and size 0.
	// - CreateAppend SHOULD NOT return an error as the object exist.
	//   - Service SHOULD check and delete the object if exists.
	CreateAppendWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

	// CreateBlock will create a new block object.
	//
	// ## Behavior
	// - CreateBlock SHOULD NOT return an error as the object exist.
	//   - Service that has native support for overwrite doesn't NEED to check the object exists or not.
	//   - Service that doesn't have native support for overwrite SHOULD check and delete the object if exists.
	CreateBlock(path string, pairs ...Pair) (o *Object, err error)
	// CreateBlockWithContext will create a new block object.
	//
	// ## Behavior
	// - CreateBlock SHOULD NOT return an error as the object exist.
	//   - Service that has native support for overwrite doesn't NEED to check the object exists or not.
	//   - Service that doesn't have native support for overwrite SHOULD check and delete the object if exists.
	CreateBlockWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

	// CreateDir will create a new dir object
	CreateDir(path string, pairs ...Pair) (o *Object, err error)
	// CreateDirWithContext will create a new dir object
	CreateDirWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

	// CreateLink Will create a link object.
	//
	// # Behavior
	//
	// - path and target COULD be relative or absolute path.
	// - If target not exists, CreateLink will still create a link object to path.
	// - If path exists:
	//   - If path is a symlink object, CreateLink will remove the symlink object and create a new link object
	//
	// to path.
	//   - If path is not a symlink object, CreateLink will return an ErrObjectModeInvalid error when the
	//
	// service does not support overwrite.
	// - A link object COULD be returned in Stat or List.
	// - CreateLink COULD implement virtual_link feature when service without native support.
	//   - Users SHOULD enable this feature by themselves.
	CreateLink(path string, target string, pairs ...Pair) (o *Object, err error)
	// CreateLinkWithContext Will create a link object.
	//
	// # Behavior
	//
	// - path and target COULD be relative or absolute path.
	// - If target not exists, CreateLink will still create a link object to path.
	// - If path exists:
	//   - If path is a symlink object, CreateLink will remove the symlink object and create a new link object
	//
	// to path.
	//   - If path is not a symlink object, CreateLink will return an ErrObjectModeInvalid error when the
	//
	// service does not support overwrite.
	// - A link object COULD be returned in Stat or List.
	// - CreateLink COULD implement virtual_link feature when service without native support.
	//   - Users SHOULD enable this feature by themselves.
	CreateLinkWithContext(ctx context.Context, path string, target string, pairs ...Pair) (o *Object, err error)

	// CreateMultipart will create a new multipart.
	//
	// ## Behavior
	//
	// - CreateMultipart SHOULD NOT return an error as the object exists.
	CreateMultipart(path string, pairs ...Pair) (o *Object, err error)
	// CreateMultipartWithContext will create a new multipart.
	//
	// ## Behavior
	//
	// - CreateMultipart SHOULD NOT return an error as the object exists.
	CreateMultipartWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

	// CreatePage will create a new page object.
	//
	// ## Behavior
	//
	// - CreatePage SHOULD NOT return an error as the object exists.
	CreatePage(path string, pairs ...Pair) (o *Object, err error)
	// CreatePageWithContext will create a new page object.
	//
	// ## Behavior
	//
	// - CreatePage SHOULD NOT return an error as the object exists.
	CreatePageWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

	// Delete will delete an object from service.
	//
	// ## Behavior
	//
	// - Delete only delete one and only one object.
	//   - Service DON'T NEED to support remove all.
	//   - User NEED to implement remove_all by themself.
	//
	// - Delete is idempotent.
	//   - Successful delete always return nil error.
	//   - Delete SHOULD never return ObjectNotExist
	//   - Delete DON'T NEED to check the object exist or not.
	Delete(path string, pairs ...Pair) (err error)
	// DeleteWithContext will delete an object from service.
	//
	// ## Behavior
	//
	// - Delete only delete one and only one object.
	//   - Service DON'T NEED to support remove all.
	//   - User NEED to implement remove_all by themself.
	//
	// - Delete is idempotent.
	//   - Successful delete always return nil error.
	//   - Delete SHOULD never return ObjectNotExist
	//   - Delete DON'T NEED to check the object exist or not.
	DeleteWithContext(ctx context.Context, path string, pairs ...Pair) (err error)

	// Fetch will fetch from a given url to path.
	//
	// ## Behavior
	//
	// - Fetch SHOULD NOT return an error as the object exists.
	// - A successful fetch operation should be complete, which means the object's content and metadata
	// should be the same as requiring from the url.
	Fetch(path string, url string, pairs ...Pair) (err error)
	// FetchWithContext will fetch from a given url to path.
	//
	// ## Behavior
	//
	// - Fetch SHOULD NOT return an error as the object exists.
	// - A successful fetch operation should be complete, which means the object's content and metadata
	// should be the same as requiring from the url.
	FetchWithContext(ctx context.Context, path string, url string, pairs ...Pair) (err error)

	// List will return list a specific path.
	//
	// ## Behavior
	//
	// - Service SHOULD support default ListMode.
	// - Service SHOULD implement ListModeDir without the check for VirtualDir.
	// - Service DON'T NEED to Stat while in List.
	List(path string, pairs ...Pair) (oi *ObjectIterator, err error)
	// ListWithContext will return list a specific path.
	//
	// ## Behavior
	//
	// - Service SHOULD support default ListMode.
	// - Service SHOULD implement ListModeDir without the check for VirtualDir.
	// - Service DON'T NEED to Stat while in List.
	ListWithContext(ctx context.Context, path string, pairs ...Pair) (oi *ObjectIterator, err error)

	// ListBlock will list blocks belong to this object.
	ListBlock(o *Object, pairs ...Pair) (bi *BlockIterator, err error)
	// ListBlockWithContext will list blocks belong to this object.
	ListBlockWithContext(ctx context.Context, o *Object, pairs ...Pair) (bi *BlockIterator, err error)

	// ListMultipart will list parts belong to this multipart.
	ListMultipart(o *Object, pairs ...Pair) (pi *PartIterator, err error)
	// ListMultipartWithContext will list parts belong to this multipart.
	ListMultipartWithContext(ctx context.Context, o *Object, pairs ...Pair) (pi *PartIterator, err error)

	// Metadata will return current storager metadata.
	Metadata(pairs ...Pair) (meta *StorageMeta)

	// Move will move an object in the service.
	//
	// ## Behavior
	//
	// - Move only move one and only one object.
	//   - Service DON'T NEED to support move a non-empty directory.
	//   - User NEED to implement move a non-empty directory by themself.
	//   - Move a file to a directory SHOULD return ErrObjectModeInvalid.
	//
	// - Move SHOULD NOT return an error as dst object exists.
	//   - Service that has native support for overwrite doesn't NEED to check the dst object exists or not.
	//   - Service that doesn't have native support for overwrite SHOULD check and delete the dst object
	//
	// if exists.
	// - A successful move operation SHOULD be complete, which means the dst object's content and metadata
	// should be the same as src object.
	Move(src string, dst string, pairs ...Pair) (err error)
	// MoveWithContext will move an object in the service.
	//
	// ## Behavior
	//
	// - Move only move one and only one object.
	//   - Service DON'T NEED to support move a non-empty directory.
	//   - User NEED to implement move a non-empty directory by themself.
	//   - Move a file to a directory SHOULD return ErrObjectModeInvalid.
	//
	// - Move SHOULD NOT return an error as dst object exists.
	//   - Service that has native support for overwrite doesn't NEED to check the dst object exists or not.
	//   - Service that doesn't have native support for overwrite SHOULD check and delete the dst object
	//
	// if exists.
	// - A successful move operation SHOULD be complete, which means the dst object's content and metadata
	// should be the same as src object.
	MoveWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error)

	// QuerySignHTTPCompleteMultipart will complete a multipart upload and construct an Object by
	// using query parameters to authenticate requests.
	QuerySignHTTPCompleteMultipart(o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPCompleteMultipartWithContext will complete a multipart upload and construct
	// an Object by using query parameters to authenticate requests.
	QuerySignHTTPCompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPCreateMultipart will create a new multipart by using query parameters to authenticate
	// requests.
	QuerySignHTTPCreateMultipart(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPCreateMultipartWithContext will create a new multipart by using query parameters
	// to authenticate requests.
	QuerySignHTTPCreateMultipartWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPDelete will delete an object from service by using query parameters to authenticate
	// requests.
	QuerySignHTTPDelete(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPDeleteWithContext will delete an object from service by using query parameters
	// to authenticate requests.
	QuerySignHTTPDeleteWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPListMultipart will list parts belong to this multipart by using query parameters
	// to authenticate requests.
	QuerySignHTTPListMultipart(o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPListMultipartWithContext will list parts belong to this multipart by using query
	// parameters to authenticate requests.
	QuerySignHTTPListMultipartWithContext(ctx context.Context, o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPRead will read data from the file by using query parameters to authenticate requests.
	QuerySignHTTPRead(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPReadWithContext will read data from the file by using query parameters to authenticate
	// requests.
	QuerySignHTTPReadWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPWrite will write data into a file by using query parameters to authenticate requests.
	QuerySignHTTPWrite(path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPWriteWithContext will write data into a file by using query parameters to authenticate
	// requests.
	QuerySignHTTPWriteWithContext(ctx context.Context, path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// QuerySignHTTPWriteMultipart will write content to a multipart by using query parameters to authenticate
	// requests.
	QuerySignHTTPWriteMultipart(o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error)
	// QuerySignHTTPWriteMultipartWithContext will write content to a multipart by using query parameters
	// to authenticate requests.
	QuerySignHTTPWriteMultipartWithContext(ctx context.Context, o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

	// Read will read the file's data.
	Read(path string, w io.Writer, pairs ...Pair) (n int64, err error)
	// ReadWithContext will read the file's data.
	ReadWithContext(ctx context.Context, path string, w io.Writer, pairs ...Pair) (n int64, err error)

	// Stat will stat a path to get info of an object.
	//
	// ## Behavior
	//
	// - Stat SHOULD accept ObjectMode pair as hints.
	//   - Service COULD have different implementations for different object mode.
	//   - Service SHOULD check if returning ObjectMode is match
	Stat(path string, pairs ...Pair) (o *Object, err error)
	// StatWithContext will stat a path to get info of an object.
	//
	// ## Behavior
	//
	// - Stat SHOULD accept ObjectMode pair as hints.
	//   - Service COULD have different implementations for different object mode.
	//   - Service SHOULD check if returning ObjectMode is match
	StatWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

	// Write will write data into a file.
	//
	// ## Behavior
	//
	// - Write SHOULD support users pass nil io.Reader.
	//   - Service that has native support for pass nil io.Reader doesn't NEED to check the io.Reader is nil
	//
	// or not.
	//   - Service that doesn't have native support for pass nil io.Reader SHOULD check and create an empty
	//
	// io.Reader if it is nil.
	// - Write SHOULD NOT return an error as the object exist.
	//   - Service that has native support for overwrite doesn't NEED to check the object exists or not.
	//   - Service that doesn't have native support for overwrite SHOULD check and delete the object if exists.
	//
	// - A successful write operation SHOULD be complete, which means the object's content and metadata
	// should be the same as specified in write request.
	Write(path string, r io.Reader, size int64, pairs ...Pair) (n int64, err error)
	// WriteWithContext will write data into a file.
	//
	// ## Behavior
	//
	// - Write SHOULD support users pass nil io.Reader.
	//   - Service that has native support for pass nil io.Reader doesn't NEED to check the io.Reader is nil
	//
	// or not.
	//   - Service that doesn't have native support for pass nil io.Reader SHOULD check and create an empty
	//
	// io.Reader if it is nil.
	// - Write SHOULD NOT return an error as the object exist.
	//   - Service that has native support for overwrite doesn't NEED to check the object exists or not.
	//   - Service that doesn't have native support for overwrite SHOULD check and delete the object if exists.
	//
	// - A successful write operation SHOULD be complete, which means the object's content and metadata
	// should be the same as specified in write request.
	WriteWithContext(ctx context.Context, path string, r io.Reader, size int64, pairs ...Pair) (n int64, err error)

	// WriteAppend will append content to an append object.
	WriteAppend(o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error)
	// WriteAppendWithContext will append content to an append object.
	WriteAppendWithContext(ctx context.Context, o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error)

	// WriteBlock will write content to a block.
	WriteBlock(o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error)
	// WriteBlockWithContext will write content to a block.
	WriteBlockWithContext(ctx context.Context, o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error)

	// WriteMultipart will write content to a multipart.
	WriteMultipart(o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error)
	// WriteMultipartWithContext will write content to a multipart.
	WriteMultipartWithContext(ctx context.Context, o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error)

	// WritePage will write content to specific offset.
	WritePage(o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error)
	// WritePageWithContext will write content to specific offset.
	WritePageWithContext(ctx context.Context, o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error)
	// contains filtered or unexported methods
}

type StoragerIterator

type StoragerIterator struct {
	// contains filtered or unexported fields
}

func NewStoragerIterator

func NewStoragerIterator(ctx context.Context, next NextStoragerFunc, status Continuable) *StoragerIterator

func (*StoragerIterator) ContinuationToken

func (it *StoragerIterator) ContinuationToken() string

func (*StoragerIterator) Next

func (it *StoragerIterator) Next() (object Storager, err error)

type StoragerPage

type StoragerPage struct {
	Status Continuable
	Data   []Storager
}

type UnimplementedAppender deprecated

type UnimplementedAppender struct {
}

UnimplementedAppender must be embedded to have forward compatible implementations.

Appender is the interface for Append related operations.

Deprecated: Moved to Storager.

func (UnimplementedAppender) CommitAppend

func (s UnimplementedAppender) CommitAppend(o *Object, pairs ...Pair) (err error)

func (UnimplementedAppender) CommitAppendWithContext

func (s UnimplementedAppender) CommitAppendWithContext(ctx context.Context, o *Object, pairs ...Pair) (err error)

func (UnimplementedAppender) CreateAppend

func (s UnimplementedAppender) CreateAppend(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedAppender) CreateAppendWithContext

func (s UnimplementedAppender) CreateAppendWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedAppender) String

func (s UnimplementedAppender) String() string

func (UnimplementedAppender) WriteAppend

func (s UnimplementedAppender) WriteAppend(o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error)

func (UnimplementedAppender) WriteAppendWithContext

func (s UnimplementedAppender) WriteAppendWithContext(ctx context.Context, o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error)

type UnimplementedBlocker deprecated

type UnimplementedBlocker struct {
}

UnimplementedBlocker must be embedded to have forward compatible implementations.

Blocker is the interface for Block related operations.

Deprecated: Moved to Storager.

func (UnimplementedBlocker) CombineBlock

func (s UnimplementedBlocker) CombineBlock(o *Object, bids []string, pairs ...Pair) (err error)

func (UnimplementedBlocker) CombineBlockWithContext

func (s UnimplementedBlocker) CombineBlockWithContext(ctx context.Context, o *Object, bids []string, pairs ...Pair) (err error)

func (UnimplementedBlocker) CreateBlock

func (s UnimplementedBlocker) CreateBlock(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedBlocker) CreateBlockWithContext

func (s UnimplementedBlocker) CreateBlockWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedBlocker) ListBlock

func (s UnimplementedBlocker) ListBlock(o *Object, pairs ...Pair) (bi *BlockIterator, err error)

func (UnimplementedBlocker) ListBlockWithContext

func (s UnimplementedBlocker) ListBlockWithContext(ctx context.Context, o *Object, pairs ...Pair) (bi *BlockIterator, err error)

func (UnimplementedBlocker) String

func (s UnimplementedBlocker) String() string

func (UnimplementedBlocker) WriteBlock

func (s UnimplementedBlocker) WriteBlock(o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error)

func (UnimplementedBlocker) WriteBlockWithContext

func (s UnimplementedBlocker) WriteBlockWithContext(ctx context.Context, o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error)

type UnimplementedCopier deprecated

type UnimplementedCopier struct {
}

UnimplementedCopier must be embedded to have forward compatible implementations.

Copier is the interface for Copy.

Deprecated: Moved to Storager.

func (UnimplementedCopier) Copy

func (s UnimplementedCopier) Copy(src string, dst string, pairs ...Pair) (err error)

func (UnimplementedCopier) CopyWithContext

func (s UnimplementedCopier) CopyWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error)

func (UnimplementedCopier) String

func (s UnimplementedCopier) String() string

type UnimplementedDirer deprecated

type UnimplementedDirer struct {
}

UnimplementedDirer must be embedded to have forward compatible implementations.

Direr is the interface for Directory.

Deprecated: Moved to Storager.

func (UnimplementedDirer) CreateDir

func (s UnimplementedDirer) CreateDir(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedDirer) CreateDirWithContext

func (s UnimplementedDirer) CreateDirWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedDirer) String

func (s UnimplementedDirer) String() string

type UnimplementedFetcher deprecated

type UnimplementedFetcher struct {
}

UnimplementedFetcher must be embedded to have forward compatible implementations.

Fetcher is the interface for Fetch.

Deprecated: Moved to Storager.

func (UnimplementedFetcher) Fetch

func (s UnimplementedFetcher) Fetch(path string, url string, pairs ...Pair) (err error)

func (UnimplementedFetcher) FetchWithContext

func (s UnimplementedFetcher) FetchWithContext(ctx context.Context, path string, url string, pairs ...Pair) (err error)

func (UnimplementedFetcher) String

func (s UnimplementedFetcher) String() string

type UnimplementedLinker deprecated

type UnimplementedLinker struct {
}

UnimplementedLinker must be embedded to have forward compatible implementations.

Linker is the interface for link.

Deprecated: Moved to Storager.

func (s UnimplementedLinker) CreateLink(path string, target string, pairs ...Pair) (o *Object, err error)

func (UnimplementedLinker) CreateLinkWithContext

func (s UnimplementedLinker) CreateLinkWithContext(ctx context.Context, path string, target string, pairs ...Pair) (o *Object, err error)

func (UnimplementedLinker) String

func (s UnimplementedLinker) String() string

type UnimplementedMover deprecated

type UnimplementedMover struct {
}

UnimplementedMover must be embedded to have forward compatible implementations.

Mover is the interface for Move.

Deprecated: Moved to Storager.

func (UnimplementedMover) Move

func (s UnimplementedMover) Move(src string, dst string, pairs ...Pair) (err error)

func (UnimplementedMover) MoveWithContext

func (s UnimplementedMover) MoveWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error)

func (UnimplementedMover) String

func (s UnimplementedMover) String() string

type UnimplementedMultipartHTTPSigner deprecated

type UnimplementedMultipartHTTPSigner struct {
}

UnimplementedMultipartHTTPSigner must be embedded to have forward compatible implementations.

MultipartHTTPSigner is the interface for Multiparter related operations which support authentication.

Deprecated: Moved to Storager.

func (UnimplementedMultipartHTTPSigner) QuerySignHTTPCompleteMultipart

func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPCompleteMultipart(o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedMultipartHTTPSigner) QuerySignHTTPCompleteMultipartWithContext

func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPCompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedMultipartHTTPSigner) QuerySignHTTPCreateMultipart

func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPCreateMultipart(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedMultipartHTTPSigner) QuerySignHTTPCreateMultipartWithContext

func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPCreateMultipartWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedMultipartHTTPSigner) QuerySignHTTPListMultipart

func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPListMultipart(o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedMultipartHTTPSigner) QuerySignHTTPListMultipartWithContext

func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPListMultipartWithContext(ctx context.Context, o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedMultipartHTTPSigner) QuerySignHTTPWriteMultipart

func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPWriteMultipart(o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedMultipartHTTPSigner) QuerySignHTTPWriteMultipartWithContext

func (s UnimplementedMultipartHTTPSigner) QuerySignHTTPWriteMultipartWithContext(ctx context.Context, o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedMultipartHTTPSigner) String

type UnimplementedMultiparter deprecated

type UnimplementedMultiparter struct {
}

UnimplementedMultiparter must be embedded to have forward compatible implementations.

Multiparter is the interface for Multipart related operations.

Deprecated: Moved to Storager.

func (UnimplementedMultiparter) CompleteMultipart

func (s UnimplementedMultiparter) CompleteMultipart(o *Object, parts []*Part, pairs ...Pair) (err error)

func (UnimplementedMultiparter) CompleteMultipartWithContext

func (s UnimplementedMultiparter) CompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, pairs ...Pair) (err error)

func (UnimplementedMultiparter) CreateMultipart

func (s UnimplementedMultiparter) CreateMultipart(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedMultiparter) CreateMultipartWithContext

func (s UnimplementedMultiparter) CreateMultipartWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedMultiparter) ListMultipart

func (s UnimplementedMultiparter) ListMultipart(o *Object, pairs ...Pair) (pi *PartIterator, err error)

func (UnimplementedMultiparter) ListMultipartWithContext

func (s UnimplementedMultiparter) ListMultipartWithContext(ctx context.Context, o *Object, pairs ...Pair) (pi *PartIterator, err error)

func (UnimplementedMultiparter) String

func (s UnimplementedMultiparter) String() string

func (UnimplementedMultiparter) WriteMultipart

func (s UnimplementedMultiparter) WriteMultipart(o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error)

func (UnimplementedMultiparter) WriteMultipartWithContext

func (s UnimplementedMultiparter) WriteMultipartWithContext(ctx context.Context, o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error)

type UnimplementedPager deprecated

type UnimplementedPager struct {
}

UnimplementedPager must be embedded to have forward compatible implementations.

Pager is the interface for Page related operations which support random write.

Deprecated: Moved to Storager.

func (UnimplementedPager) CreatePage

func (s UnimplementedPager) CreatePage(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedPager) CreatePageWithContext

func (s UnimplementedPager) CreatePageWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedPager) String

func (s UnimplementedPager) String() string

func (UnimplementedPager) WritePage

func (s UnimplementedPager) WritePage(o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error)

func (UnimplementedPager) WritePageWithContext

func (s UnimplementedPager) WritePageWithContext(ctx context.Context, o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error)

type UnimplementedServicer

type UnimplementedServicer struct {
}

UnimplementedServicer must be embedded to have forward compatible implementations.

func (UnimplementedServicer) Create

func (s UnimplementedServicer) Create(name string, pairs ...Pair) (store Storager, err error)

func (UnimplementedServicer) CreateWithContext

func (s UnimplementedServicer) CreateWithContext(ctx context.Context, name string, pairs ...Pair) (store Storager, err error)

func (UnimplementedServicer) Delete

func (s UnimplementedServicer) Delete(name string, pairs ...Pair) (err error)

func (UnimplementedServicer) DeleteWithContext

func (s UnimplementedServicer) DeleteWithContext(ctx context.Context, name string, pairs ...Pair) (err error)

func (UnimplementedServicer) Features

func (s UnimplementedServicer) Features() (fe ServiceFeatures)

func (UnimplementedServicer) Get

func (s UnimplementedServicer) Get(name string, pairs ...Pair) (store Storager, err error)

func (UnimplementedServicer) GetWithContext

func (s UnimplementedServicer) GetWithContext(ctx context.Context, name string, pairs ...Pair) (store Storager, err error)

func (UnimplementedServicer) List

func (s UnimplementedServicer) List(pairs ...Pair) (sti *StoragerIterator, err error)

func (UnimplementedServicer) ListWithContext

func (s UnimplementedServicer) ListWithContext(ctx context.Context, pairs ...Pair) (sti *StoragerIterator, err error)

func (UnimplementedServicer) String

func (s UnimplementedServicer) String() string

type UnimplementedStorageHTTPSigner deprecated

type UnimplementedStorageHTTPSigner struct {
}

UnimplementedStorageHTTPSigner must be embedded to have forward compatible implementations.

StorageHTTPSigner is the interface for Storager related operations which support authentication.

Deprecated: Moved to Storager.

func (UnimplementedStorageHTTPSigner) QuerySignHTTPDelete

func (s UnimplementedStorageHTTPSigner) QuerySignHTTPDelete(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorageHTTPSigner) QuerySignHTTPDeleteWithContext

func (s UnimplementedStorageHTTPSigner) QuerySignHTTPDeleteWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorageHTTPSigner) QuerySignHTTPRead

func (s UnimplementedStorageHTTPSigner) QuerySignHTTPRead(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorageHTTPSigner) QuerySignHTTPReadWithContext

func (s UnimplementedStorageHTTPSigner) QuerySignHTTPReadWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorageHTTPSigner) QuerySignHTTPWrite

func (s UnimplementedStorageHTTPSigner) QuerySignHTTPWrite(path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorageHTTPSigner) QuerySignHTTPWriteWithContext

func (s UnimplementedStorageHTTPSigner) QuerySignHTTPWriteWithContext(ctx context.Context, path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorageHTTPSigner) String

type UnimplementedStorager

type UnimplementedStorager struct {
}

UnimplementedStorager must be embedded to have forward compatible implementations.

func (UnimplementedStorager) CombineBlock

func (s UnimplementedStorager) CombineBlock(o *Object, bids []string, pairs ...Pair) (err error)

func (UnimplementedStorager) CombineBlockWithContext

func (s UnimplementedStorager) CombineBlockWithContext(ctx context.Context, o *Object, bids []string, pairs ...Pair) (err error)

func (UnimplementedStorager) CommitAppend

func (s UnimplementedStorager) CommitAppend(o *Object, pairs ...Pair) (err error)

func (UnimplementedStorager) CommitAppendWithContext

func (s UnimplementedStorager) CommitAppendWithContext(ctx context.Context, o *Object, pairs ...Pair) (err error)

func (UnimplementedStorager) CompleteMultipart

func (s UnimplementedStorager) CompleteMultipart(o *Object, parts []*Part, pairs ...Pair) (err error)

func (UnimplementedStorager) CompleteMultipartWithContext

func (s UnimplementedStorager) CompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, pairs ...Pair) (err error)

func (UnimplementedStorager) Copy

func (s UnimplementedStorager) Copy(src string, dst string, pairs ...Pair) (err error)

func (UnimplementedStorager) CopyWithContext

func (s UnimplementedStorager) CopyWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error)

func (UnimplementedStorager) Create

func (s UnimplementedStorager) Create(path string, pairs ...Pair) (o *Object)

func (UnimplementedStorager) CreateAppend

func (s UnimplementedStorager) CreateAppend(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) CreateAppendWithContext

func (s UnimplementedStorager) CreateAppendWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) CreateBlock

func (s UnimplementedStorager) CreateBlock(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) CreateBlockWithContext

func (s UnimplementedStorager) CreateBlockWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) CreateDir

func (s UnimplementedStorager) CreateDir(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) CreateDirWithContext

func (s UnimplementedStorager) CreateDirWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)
func (s UnimplementedStorager) CreateLink(path string, target string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) CreateLinkWithContext

func (s UnimplementedStorager) CreateLinkWithContext(ctx context.Context, path string, target string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) CreateMultipart

func (s UnimplementedStorager) CreateMultipart(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) CreateMultipartWithContext

func (s UnimplementedStorager) CreateMultipartWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) CreatePage

func (s UnimplementedStorager) CreatePage(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) CreatePageWithContext

func (s UnimplementedStorager) CreatePageWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) Delete

func (s UnimplementedStorager) Delete(path string, pairs ...Pair) (err error)

func (UnimplementedStorager) DeleteWithContext

func (s UnimplementedStorager) DeleteWithContext(ctx context.Context, path string, pairs ...Pair) (err error)

func (UnimplementedStorager) Features

func (s UnimplementedStorager) Features() (fe StorageFeatures)

func (UnimplementedStorager) Fetch

func (s UnimplementedStorager) Fetch(path string, url string, pairs ...Pair) (err error)

func (UnimplementedStorager) FetchWithContext

func (s UnimplementedStorager) FetchWithContext(ctx context.Context, path string, url string, pairs ...Pair) (err error)

func (UnimplementedStorager) List

func (s UnimplementedStorager) List(path string, pairs ...Pair) (oi *ObjectIterator, err error)

func (UnimplementedStorager) ListBlock

func (s UnimplementedStorager) ListBlock(o *Object, pairs ...Pair) (bi *BlockIterator, err error)

func (UnimplementedStorager) ListBlockWithContext

func (s UnimplementedStorager) ListBlockWithContext(ctx context.Context, o *Object, pairs ...Pair) (bi *BlockIterator, err error)

func (UnimplementedStorager) ListMultipart

func (s UnimplementedStorager) ListMultipart(o *Object, pairs ...Pair) (pi *PartIterator, err error)

func (UnimplementedStorager) ListMultipartWithContext

func (s UnimplementedStorager) ListMultipartWithContext(ctx context.Context, o *Object, pairs ...Pair) (pi *PartIterator, err error)

func (UnimplementedStorager) ListWithContext

func (s UnimplementedStorager) ListWithContext(ctx context.Context, path string, pairs ...Pair) (oi *ObjectIterator, err error)

func (UnimplementedStorager) Metadata

func (s UnimplementedStorager) Metadata(pairs ...Pair) (meta *StorageMeta)

func (UnimplementedStorager) Move

func (s UnimplementedStorager) Move(src string, dst string, pairs ...Pair) (err error)

func (UnimplementedStorager) MoveWithContext

func (s UnimplementedStorager) MoveWithContext(ctx context.Context, src string, dst string, pairs ...Pair) (err error)

func (UnimplementedStorager) QuerySignHTTPCompleteMultipart

func (s UnimplementedStorager) QuerySignHTTPCompleteMultipart(o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPCompleteMultipartWithContext

func (s UnimplementedStorager) QuerySignHTTPCompleteMultipartWithContext(ctx context.Context, o *Object, parts []*Part, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPCreateMultipart

func (s UnimplementedStorager) QuerySignHTTPCreateMultipart(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPCreateMultipartWithContext

func (s UnimplementedStorager) QuerySignHTTPCreateMultipartWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPDelete

func (s UnimplementedStorager) QuerySignHTTPDelete(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPDeleteWithContext

func (s UnimplementedStorager) QuerySignHTTPDeleteWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPListMultipart

func (s UnimplementedStorager) QuerySignHTTPListMultipart(o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPListMultipartWithContext

func (s UnimplementedStorager) QuerySignHTTPListMultipartWithContext(ctx context.Context, o *Object, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPRead

func (s UnimplementedStorager) QuerySignHTTPRead(path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPReadWithContext

func (s UnimplementedStorager) QuerySignHTTPReadWithContext(ctx context.Context, path string, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPWrite

func (s UnimplementedStorager) QuerySignHTTPWrite(path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPWriteMultipart

func (s UnimplementedStorager) QuerySignHTTPWriteMultipart(o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPWriteMultipartWithContext

func (s UnimplementedStorager) QuerySignHTTPWriteMultipartWithContext(ctx context.Context, o *Object, size int64, index int, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) QuerySignHTTPWriteWithContext

func (s UnimplementedStorager) QuerySignHTTPWriteWithContext(ctx context.Context, path string, size int64, expire time.Duration, pairs ...Pair) (req *http.Request, err error)

func (UnimplementedStorager) Read

func (s UnimplementedStorager) Read(path string, w io.Writer, pairs ...Pair) (n int64, err error)

func (UnimplementedStorager) ReadWithContext

func (s UnimplementedStorager) ReadWithContext(ctx context.Context, path string, w io.Writer, pairs ...Pair) (n int64, err error)

func (UnimplementedStorager) Stat

func (s UnimplementedStorager) Stat(path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) StatWithContext

func (s UnimplementedStorager) StatWithContext(ctx context.Context, path string, pairs ...Pair) (o *Object, err error)

func (UnimplementedStorager) String

func (s UnimplementedStorager) String() string

func (UnimplementedStorager) Write

func (s UnimplementedStorager) Write(path string, r io.Reader, size int64, pairs ...Pair) (n int64, err error)

func (UnimplementedStorager) WriteAppend

func (s UnimplementedStorager) WriteAppend(o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error)

func (UnimplementedStorager) WriteAppendWithContext

func (s UnimplementedStorager) WriteAppendWithContext(ctx context.Context, o *Object, r io.Reader, size int64, pairs ...Pair) (n int64, err error)

func (UnimplementedStorager) WriteBlock

func (s UnimplementedStorager) WriteBlock(o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error)

func (UnimplementedStorager) WriteBlockWithContext

func (s UnimplementedStorager) WriteBlockWithContext(ctx context.Context, o *Object, r io.Reader, size int64, bid string, pairs ...Pair) (n int64, err error)

func (UnimplementedStorager) WriteMultipart

func (s UnimplementedStorager) WriteMultipart(o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error)

func (UnimplementedStorager) WriteMultipartWithContext

func (s UnimplementedStorager) WriteMultipartWithContext(ctx context.Context, o *Object, r io.Reader, size int64, index int, pairs ...Pair) (n int64, part *Part, err error)

func (UnimplementedStorager) WritePage

func (s UnimplementedStorager) WritePage(o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error)

func (UnimplementedStorager) WritePageWithContext

func (s UnimplementedStorager) WritePageWithContext(ctx context.Context, o *Object, r io.Reader, size int64, offset int64, pairs ...Pair) (n int64, err error)

func (UnimplementedStorager) WriteWithContext

func (s UnimplementedStorager) WriteWithContext(ctx context.Context, path string, r io.Reader, size int64, pairs ...Pair) (n int64, err error)

Jump to

Keyboard shortcuts

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