Documentation ¶
Index ¶
- Constants
- Variables
- type VBucket
- func (vb *VBucket) Bucket() *storage.BucketHandle
- func (vb *VBucket) ID() string
- func (vb *VBucket) Name() string
- func (vb *VBucket) Put(name string, r io.Reader, size int64, metadata map[string]interface{}) (*VItem, error)
- func (vb *VBucket) RemoveItem(id string) error
- func (vb *VBucket) VItem(id string) (*VItem, error)
- type VClient
- type VItem
- func (vi *VItem) DownloadURL() *url.URL
- func (vi *VItem) ETag() (string, error)
- func (vi *VItem) ID() string
- func (vi *VItem) LastMod() (time.Time, error)
- func (vi *VItem) Metadata() (map[string]interface{}, error)
- func (vi *VItem) Name() string
- func (vi *VItem) Open() (io.ReadCloser, error)
- func (vi *VItem) OpenRange(start, end uint64) (io.ReadCloser, error)
- func (vi *VItem) Size() (int64, error)
- func (vi *VItem) StorageObject() *storage.ObjectAttrs
- func (vi *VItem) URL() *url.URL
Constants ¶
const Kind = "google"
Kind represents the name of the location/storage type.
Variables ¶
var ( // ErrNotFound ... ErrNotFound = errors.New("google storage not found") )
Functions ¶
This section is empty.
Types ¶
type VBucket ¶
type VBucket struct {
// contains filtered or unexported fields
}
VBucket is Voda Bucket which is wrapper of google cloud storage "Bucket"
func (*VBucket) Bucket ¶
func (vb *VBucket) Bucket() *storage.BucketHandle
Bucket returns the google bucket attributes
func (*VBucket) ID ¶
ID returns a string value which represents the name of the container. TODO: UUID
func (*VBucket) Put ¶
func (vb *VBucket) Put(name string, r io.Reader, size int64, metadata map[string]interface{}) (*VItem, error)
Put sends a request to upload content to the container. The arguments received are the name of the item, a reader representing the content, and the size of the file.
func (*VBucket) RemoveItem ¶
RemoveItem will delete a google storage Object
type VClient ¶
type VClient struct {
// contains filtered or unexported fields
}
VClient ...
type VItem ¶
type VItem struct {
// contains filtered or unexported fields
}
VItem is a Voda Item, which wraps Google Cloud Storage Bucket's file itself.
func (*VItem) Open ¶
func (vi *VItem) Open() (io.ReadCloser, error)
Open returns an io.ReadCloser to the object. Useful for downloading/streaming the object.
func (*VItem) OpenRange ¶
func (vi *VItem) OpenRange(start, end uint64) (io.ReadCloser, error)
OpenRange returns an io.Reader to the object for a specific byte range
func (*VItem) StorageObject ¶
func (vi *VItem) StorageObject() *storage.ObjectAttrs
StorageObject returns the Google Storage Object