s3

package
v0.0.0-...-536613a Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service s3 service

func New

func New(bucketSource, bucketDestination, owner, name string) (Service, error)

New return new service

func (Service) Checksum

func (service Service) Checksum(key string) (string, error)

Checksum compute file's MD5 digist

func (Service) CopyToDestination

func (service Service) CopyToDestination(sourceKey string, destinationKey string) error

CopyToDestination object to destinatioin

func (Service) Delete

func (service Service) Delete(key string) error

Delete specified object

func (Service) DeleteDestination

func (service Service) DeleteDestination(key string) error

DeleteDestination specified object

func (Service) DeleteFolder

func (service Service) DeleteFolder(prefix string) error

DeleteFolder delete objects by prefix

func (Service) Deletes

func (service Service) Deletes(keys []string) error

Deletes delete objects

func (Service) Download

func (service Service) Download(key string, downloadURL string) error

Download download object TODO complete method

func (Service) GetAllFiles

func (service Service) GetAllFiles(prefix string) ([]*get3w.File, error)

GetAllFiles return all files by appname and prefix

func (Service) GetDestinationKey

func (service Service) GetDestinationKey(key ...string) string

GetDestinationKey get file key by relatedURL

func (Service) GetDestinationPrefix

func (service Service) GetDestinationPrefix(prefix ...string) string

GetDestinationPrefix return app prefix

func (Service) GetFiles

func (service Service) GetFiles(prefix string) ([]*get3w.File, error)

GetFiles return all files by appname and prefix

func (Service) GetRootKey

func (service Service) GetRootKey(key ...string) string

GetRootKey get file key by relatedURL

func (Service) GetRootPrefix

func (service Service) GetRootPrefix(prefix ...string) string

GetRootPrefix return app prefix

func (Service) GetSourceKey

func (service Service) GetSourceKey(key ...string) string

GetSourceKey get file key by relatedURL

func (Service) GetSourcePrefix

func (service Service) GetSourcePrefix(prefix ...string) string

GetSourcePrefix return app prefix

func (Service) IsExist

func (service Service) IsExist(key string) bool

IsExist return true if specified key exists

func (Service) NewFolder

func (service Service) NewFolder(prefix string) error

NewFolder create folder

func (Service) Read

func (service Service) Read(key string) ([]byte, error)

Read return resource content

func (Service) Rename

func (service Service) Rename(owner, newName string, deleteAll bool) error

Rename rename the app

func (Service) Upload

func (service Service) Upload(key string, filePath string) error

Upload upload object

func (Service) Write

func (service Service) Write(key string, data []byte) error

Write write string content to specified key resource

func (Service) WriteDestination

func (service Service) WriteDestination(key string, data []byte) error

WriteDestination write string content to specified key resource

Jump to

Keyboard shortcuts

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