gophercloud: Index | Files

package objects

import ""

Package objects provides information and interaction with the Object API resource for the Rackspace Cloud Files service.


Package Files

delegate.go doc.go

func Copy Uses

func Copy(c *gophercloud.ServiceClient, containerName, objectName string, opts os.CopyOptsBuilder) os.CopyResult

Copy is a function that copies one object to another.

func Create Uses

func Create(c *gophercloud.ServiceClient, containerName, objectName string, content io.ReadSeeker, opts os.CreateOptsBuilder) os.CreateResult

Create is a function that creates a new object or replaces an existing object.

func CreateTempURL Uses

func CreateTempURL(c *gophercloud.ServiceClient, containerName, objectName string, opts os.CreateTempURLOpts) (string, error)

func Delete Uses

func Delete(c *gophercloud.ServiceClient, containerName, objectName string, opts os.DeleteOptsBuilder) os.DeleteResult

Delete is a function that deletes an object.

func Download Uses

func Download(c *gophercloud.ServiceClient, containerName, objectName string, opts os.DownloadOptsBuilder) os.DownloadResult

Download is a function that retrieves the content and metadata for an object. To extract just the content, pass the DownloadResult response to the ExtractContent function.

func ExtractInfo Uses

func ExtractInfo(page pagination.Page) ([]os.Object, error)

ExtractInfo is a function that takes a page of objects and returns their full information.

func ExtractNames Uses

func ExtractNames(page pagination.Page) ([]string, error)

ExtractNames is a function that takes a page of objects and returns only their names.

func Get Uses

func Get(c *gophercloud.ServiceClient, containerName, objectName string, opts os.GetOptsBuilder) os.GetResult

Get is a function that retrieves the metadata of an object. To extract just the custom metadata, pass the GetResult response to the ExtractMetadata function.

func List Uses

func List(c *gophercloud.ServiceClient, containerName string, opts os.ListOptsBuilder) pagination.Pager

List is a function that retrieves objects in the container as well as container metadata. It returns a pager which can be iterated with the EachPage function.

func Update Uses

func Update(c *gophercloud.ServiceClient, containerName, objectName string, opts os.UpdateOptsBuilder) os.UpdateResult

Update is a function that creates, updates, or deletes an object's metadata.

type CopyOpts Uses

type CopyOpts struct {
    Metadata           map[string]string
    ContentDisposition string `h:"Content-Disposition"`
    ContentEncoding    string `h:"Content-Encoding"`
    ContentLength      int    `h:"Content-Length"`
    ContentType        string `h:"Content-Type"`
    CopyFrom           string `h:"X-Copy_From"`
    Destination        string `h:"Destination"`
    DetectContentType  bool   `h:"X-Detect-Content-Type"`

CopyOpts is a structure that holds parameters for copying one object to another.

func (CopyOpts) ToObjectCopyMap Uses

func (opts CopyOpts) ToObjectCopyMap() (map[string]string, error)

ToObjectCopyMap formats a CopyOpts into a map of headers.

Package objects imports 4 packages (graph) and is imported by 4 packages. Updated 2016-07-27. Refresh now. Tools for package owners.