gophercloud: github.com/rackspace/gophercloud/rackspace/objectstorage/v1/containers Index | Files

package containers

import "github.com/rackspace/gophercloud/rackspace/objectstorage/v1/containers"

Package containers provides information and interaction with the Container API resource for the Rackspace Cloud Files service.

Index

Package Files

delegate.go doc.go

func Create Uses

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

Create is a function that creates a new container.

func Delete Uses

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

Delete is a function that deletes a container.

func ExtractInfo Uses

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

ExtractInfo interprets a page of List results when full container info is requested.

func ExtractNames Uses

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

ExtractNames interprets a page of List results when just the container names are requested.

func Get Uses

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

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

func List Uses

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

List is a function that retrieves containers associated with the account as well as account metadata. It returns a pager which can be iterated with the EachPage function.

func Update Uses

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

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

type CreateOpts Uses

type CreateOpts struct {
    Metadata         map[string]string
    ContainerRead    string `h:"X-Container-Read"`
    ContainerWrite   string `h:"X-Container-Write"`
    VersionsLocation string `h:"X-Versions-Location"`
}

CreateOpts is a structure that holds parameters for creating a container.

func (CreateOpts) ToContainerCreateMap Uses

func (opts CreateOpts) ToContainerCreateMap() (map[string]string, error)

ToContainerCreateMap formats a CreateOpts into a map of headers.

type UpdateOpts Uses

type UpdateOpts struct {
    Metadata               map[string]string
    ContainerRead          string `h:"X-Container-Read"`
    ContainerWrite         string `h:"X-Container-Write"`
    ContentType            string `h:"Content-Type"`
    DetectContentType      bool   `h:"X-Detect-Content-Type"`
    RemoveVersionsLocation string `h:"X-Remove-Versions-Location"`
    VersionsLocation       string `h:"X-Versions-Location"`
}

UpdateOpts is a structure that holds parameters for updating or creating a container's metadata.

func (UpdateOpts) ToContainerUpdateMap Uses

func (opts UpdateOpts) ToContainerUpdateMap() (map[string]string, error)

ToContainerUpdateMap formats a CreateOpts into a map of headers.

Package containers imports 3 packages (graph) and is imported by 3 packages. Updated 2016-07-19. Refresh now. Tools for package owners.