Documentation ¶
Index ¶
- Variables
- type Config
- type DOSpace
- func (do *DOSpace) Accepts(ext string) (accepts bool)
- func (do *DOSpace) AddFile(r io.Reader, p string) (string, error)
- func (do *DOSpace) Close() error
- func (do *DOSpace) DeleteContainer() (err error)
- func (do *DOSpace) EmtpyContainer() error
- func (do *DOSpace) GetFile(p string) (io.ReadCloser, error)
- func (do *DOSpace) NormalizePath(entries ...string) string
- func (do *DOSpace) Open(urlString string) (storage.Driver, error)
- func (do *DOSpace) Path() string
- func (do *DOSpace) RemoveFile(p string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrURLParse = errors.New("do: error parsing url")
)
Functions ¶
This section is empty.
Types ¶
type DOSpace ¶
type DOSpace struct {
// contains filtered or unexported fields
}
func (*DOSpace) DeleteContainer ¶
func (*DOSpace) EmtpyContainer ¶
func (*DOSpace) NormalizePath ¶
func (*DOSpace) Open ¶
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:
- accept: comma-separated list of file extensions to accept. Could be repeated. e.g. url://bucket/prefix?accept=.jpeg,.svg&accept=.png would accept .jpeg, .svg and .png files. Default .jgp,.jpeg,.png,.svg
- auto-create: will NOT create the bucket automatically if this value is any of: 0, off, disable, false.
- acl: canned ACL policy for file uploads. See https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL for details. Only "private" and "public-read" are accepted. Default "public-read".
- region: region to deploy space to. see https://developers.digitalocean.com/documentation/v2/#list-all-regions for listing. Default "nyc3"
func (*DOSpace) RemoveFile ¶
Click to show internal directories.
Click to hide internal directories.