uss

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package uss provided support for UPYUN Storage Service (https://www.upyun.com/products/file-storage)

Code generated by go generate via internal/cmd/service; DO NOT EDIT.

Index

Constants

View Source
const Type = "uss"

Type is the type for uss

Variables

This section is empty.

Functions

func NewStorager added in v1.0.0

func NewStorager(pairs ...*types.Pair) (storage.Storager, error)

NewStorager will create Storager only.

Types

type Storage

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

Storage is the uss service.

func (*Storage) Delete

func (s *Storage) Delete(path string, pairs ...*types.Pair) (err error)

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

func (s *Storage) ListDir(dir string, pairs ...*types.Pair) (err error)

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) ListPrefix added in v1.0.0

func (s *Storage) ListPrefix(prefix string, pairs ...*types.Pair) (err error)

ListPrefix will return list a specific dir.

This function will create a context by default.

func (*Storage) ListPrefixWithContext added in v1.0.0

func (s *Storage) ListPrefixWithContext(ctx context.Context, prefix string, pairs ...*types.Pair) (err error)

ListPrefixWithContext will return list a specific dir.

func (*Storage) Metadata

func (s *Storage) Metadata(pairs ...*types.Pair) (meta info.StorageMeta, err error)

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

func (s *Storage) Read(path string, pairs ...*types.Pair) (rc io.ReadCloser, err error)

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

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

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.

func (*Storage) String

func (s *Storage) String() string

String implements Storager.String

func (*Storage) Write

func (s *Storage) Write(path string, r io.Reader, pairs ...*types.Pair) (err error)

Write will write data into a file.

This function will create a context by default.

func (*Storage) WriteWithContext

func (s *Storage) WriteWithContext(ctx context.Context, path string, r io.Reader, pairs ...*types.Pair) (err error)

WriteWithContext will write data into a file.

Jump to

Keyboard shortcuts

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