Documentation

Overview

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

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    func Create

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

      Create is a function that creates a new container.

      func Delete

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

        Delete is a function that deletes a container.

        func ExtractInfo

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

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

          func ExtractNames

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

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

            func Get

            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

                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

                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.

                  Types

                  type CreateOpts

                  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

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

                      ToContainerCreateMap formats a CreateOpts into a map of headers.

                      type UpdateOpts

                      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

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

                          ToContainerUpdateMap formats a CreateOpts into a map of headers.

                          Source Files