dospace

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrURLParse = errors.New("do: error parsing url")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	AutoSpaceCreate bool
	Region          string
	Space           string
	Prefix          string
	FileACL         string
	// contains filtered or unexported fields
}

type DOSpace

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

func (*DOSpace) Accepts

func (do *DOSpace) Accepts(ext string) (accepts bool)

func (*DOSpace) AddFile

func (do *DOSpace) AddFile(r io.Reader, p string) (string, error)

func (*DOSpace) Close

func (do *DOSpace) Close() error

func (*DOSpace) DeleteContainer

func (do *DOSpace) DeleteContainer() (err error)

func (*DOSpace) EmtpyContainer

func (do *DOSpace) EmtpyContainer() error

func (*DOSpace) GetFile

func (do *DOSpace) GetFile(p string) (io.ReadCloser, error)

func (*DOSpace) NormalizePath

func (do *DOSpace) NormalizePath(entries ...string) string

func (*DOSpace) Open

func (do *DOSpace) Open(urlString string) (storage.Driver, error)

Open creates a *DOSpace. The urlString should be in the form do://key:secret@bucket/prefix?region=&accept=&auto-create=false&acl=public-read The URL parameters accepted are as follows:

func (*DOSpace) Path

func (do *DOSpace) Path() string

func (*DOSpace) RemoveFile

func (do *DOSpace) RemoveFile(p string) error

Jump to

Keyboard shortcuts

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