Documentation ¶
Overview ¶
Package dropbox provides support for Dropbox (https://www.dropbox.com/).
Code generated by go generate via internal/cmd/service; DO NOT EDIT.
Index ¶
- Constants
- Variables
- func NewStorager(pairs ...*types.Pair) (storage.Storager, error)
- type Storage
- func (s *Storage) Delete(path string, pairs ...*types.Pair) (err error)
- func (s *Storage) DeleteWithContext(ctx context.Context, path string, pairs ...*types.Pair) (err error)
- func (s *Storage) ListDir(dir string, pairs ...*types.Pair) (err error)
- func (s *Storage) ListDirWithContext(ctx context.Context, dir string, pairs ...*types.Pair) (err error)
- func (s *Storage) Metadata(pairs ...*types.Pair) (meta info.StorageMeta, err error)
- func (s *Storage) MetadataWithContext(ctx context.Context, pairs ...*types.Pair) (meta info.StorageMeta, err error)
- func (s *Storage) Read(path string, pairs ...*types.Pair) (rc io.ReadCloser, err error)
- func (s *Storage) ReadWithContext(ctx context.Context, path string, pairs ...*types.Pair) (rc io.ReadCloser, err error)
- func (s *Storage) Stat(path string, pairs ...*types.Pair) (o *types.Object, err error)
- func (s *Storage) StatWithContext(ctx context.Context, path string, pairs ...*types.Pair) (o *types.Object, err error)
- func (s *Storage) String() string
- func (s *Storage) Write(path string, r io.Reader, pairs ...*types.Pair) (err error)
- func (s *Storage) WriteWithContext(ctx context.Context, path string, r io.Reader, pairs ...*types.Pair) (err error)
Constants ¶
const Type = "dropbox"
Type is the type for dropbox
Variables ¶
var ( // ErrUnexpectedEntry is the error returned when Dropbox service has returned an unexpected kind of entry. ErrUnexpectedEntry = errors.New("unexpected entry") )
Functions ¶
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is the dropbox client.
func (*Storage) Delete ¶
Delete will delete an Object from service.
This function will create a context by default.
func (*Storage) DeleteWithContext ¶
func (s *Storage) DeleteWithContext(ctx context.Context, path string, pairs ...*types.Pair) (err error)
DeleteWithContext will delete an Object from service.
func (*Storage) ListDir ¶ added in v1.0.0
ListDir will return list a specific dir.
This function will create a context by default.
func (*Storage) ListDirWithContext ¶ added in v1.0.0
func (s *Storage) ListDirWithContext(ctx context.Context, dir string, pairs ...*types.Pair) (err error)
ListDirWithContext will return list a specific dir.
func (*Storage) Metadata ¶
Metadata will return current storager's metadata.
This function will create a context by default.
func (*Storage) MetadataWithContext ¶
func (s *Storage) MetadataWithContext(ctx context.Context, pairs ...*types.Pair) (meta info.StorageMeta, err error)
MetadataWithContext will return current storager's metadata.
func (*Storage) Read ¶
Read will read the file's data.
This function will create a context by default.
func (*Storage) ReadWithContext ¶
func (s *Storage) ReadWithContext(ctx context.Context, path string, pairs ...*types.Pair) (rc io.ReadCloser, err error)
ReadWithContext will read the file's data.
func (*Storage) Stat ¶
Stat will stat a path to get info of an object.
This function will create a context by default.
func (*Storage) StatWithContext ¶
func (s *Storage) StatWithContext(ctx context.Context, path string, pairs ...*types.Pair) (o *types.Object, err error)
StatWithContext will stat a path to get info of an object.