objects

package
v0.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2015 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

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

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

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

func CreateTempURL added in v0.2.0

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

func Delete

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

Delete is a function that deletes an object.

func Download

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

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

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

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

func Get

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

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

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.

Types

type CopyOpts

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

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

ToObjectCopyMap formats a CopyOpts into a map of headers.

Jump to

Keyboard shortcuts

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