Documentation ¶
Index ¶
Constants ¶
View Source
const ( KindLocal = "file" KindNFS = "nfs" KindCFS = "cfs" KindGlusterFS = "glusterfs" KindS3 = "s3" )
View Source
const ( ConfigHost = "host" ConfigAk = "ak" ConfigSk = "sk" ConfigToken = "token" ConfigRegion = "region" ConfigDisableSSL = "disableSSL" ConfigDisplayHost = "displayHost" )
View Source
const ( MaxKeys = 1000 Delimiter = "/" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlobMeta ¶
type BlobMeta struct { // Name represents last level path Name string `json:"name"` // ContentType only provides in GetMeta when using s3, since only s3.HeadObject provides this field ContentType string `json:"contentType"` // Size use byte as unit Size int64 `json:"size"` // URLPath an accessible url using Path-style access URLPath string `json:"urlPath"` // LastModified last modified time the object. LastModified time.Time `json:"lastModified"` }
type BlobStore ¶
type BlobStore interface { // ListMeta recursively list all object metas ListMeta(path string, option ListMetaOption) ([]*BlobMeta, error) // GetMeta get meta from path GetMeta(path string) (*BlobMeta, error) // ReadRaw retrieves a byte stream from the blob store or an error ReadRaw(path string) (io.ReadCloser, error) // WriteRaw stores a raw byte stream WriteRaw(path string, in io.Reader) error // DeleteRaw delete the path DeleteRaw(path string) error GetSignedURL(path string, expire time.Duration) (string, error) BuildURL(path string) (string, error) }
type ListMetaOption ¶
Click to show internal directories.
Click to hide internal directories.