Documentation ¶
Index ¶
- func CopyObject(session *openstack.Session, srcURL, destURL string) (err error)
- func DeleteContainer(session *openstack.Session, url string) error
- func DeleteObject(session *openstack.Session, url string) (err error)
- func GetAccountMeta(session *openstack.Session, url string) (http.Header, error)
- func GetContainerMeta(session *openstack.Session, url string) (http.Header, error)
- func GetObject(session *openstack.Session, url string) (http.Header, []byte, error)
- func GetObjectMeta(session *openstack.Session, url string) (http.Header, error)
- func ListContainers(session *openstack.Session, limit int64, marker, url string) ([]byte, error)
- func ListObjects(session *openstack.Session, limit int64, ...) ([]byte, error)
- func PutContainer(session *openstack.Session, url string, headers http.Header) error
- func PutObject(session *openstack.Session, fContent *[]byte, url string, headers http.Header) (err error)
- func SetContainerMeta(session *openstack.Session, url string, headers http.Header) (err error)
- func SetObjectMeta(session *openstack.Session, url string, headers http.Header) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyObject ¶
CopyObject calls the OpenStack copy object API using previously obtained token. Note from API doc: "The destination container must exist before attempting the copy."
func DeleteContainer ¶
DeleteContainer calls the OpenStack delete container API using previously obtained token.
func DeleteObject ¶
DeleteObject calls the OpenStack delete object API using previously obtained token.
Note from API doc: "A DELETE to a versioned object removes the current version of the object and replaces it with the next-most current version, moving it from the non-current container to the current." .. "If you want to completely remove an object and you have five total versions of it, you must DELETE it five times."
func GetAccountMeta ¶
GetAccountMeta calls the OpenStack retrieve account metadata API using previously obtained token.
func GetContainerMeta ¶
GetContainerMeta calls the OpenStack retrieve object metadata API using previously obtained token. url can be regular storage or CDN-enabled storage URL.
func GetObject ¶
GetObject calls the OpenStack retrieve object API using previously obtained token. It returns http.Header, object / file content downloaded from the server, and err.
Since this implementation of GetObject retrieves header info, it effectively executes GetObjectMeta also in addition to getting the object content.
func GetObjectMeta ¶
GetObjectMeta calls the OpenStack retrieve object metadata API using previously obtained token.
func ListContainers ¶
ListContainers calls the OpenStack list containers API using previously obtained token. "limit" and "marker" corresponds to the API's "limit" and "marker". "url" can be regular storage or cdn-enabled storage URL. It returns []byte which then needs to be unmarshalled to decode the JSON.
func ListObjects ¶
func ListObjects(session *openstack.Session, limit int64, marker, prefix, path, delim, conURL string) ([]byte, error)
ListObjects calls the OpenStack list object API using previously obtained token. "Limit", "marker", "prefix", "path", "delim" corresponds to the API's "limit", "marker", "prefix", "path", and "delimiter".
func PutContainer ¶
PutContainer calls the OpenStack API to create / update container using previously obtained token.
func PutObject ¶
func PutObject(session *openstack.Session, fContent *[]byte, url string, headers http.Header) (err error)
PutObject calls the OpenStack create object API using previously obtained token. url can be regular storage or CDN-enabled storage URL.
func SetContainerMeta ¶
SetContainerMeta calls the OpenStack API to create / update meta data for container using previously obtained token. url can be regular storage or CDN-enabled storage URL.
Types ¶
This section is empty.