Documentation ¶
Index ¶
- func CompareFiles(t *testing.T, file1, file2 string) (bool, error)
- func CreateContainer(t *testing.T, client *gophercloud.ServiceClient) (string, error)
- func CreateRandomFile(t *testing.T, parentDir string) (string, error)
- func CreateTempDir(t *testing.T, parentDir string) (string, error)
- func CreateTempFile(t *testing.T, dir string) (*os.File, error)
- func DeleteContainer(t *testing.T, client *gophercloud.ServiceClient, cName string)
- func DeleteObject(t *testing.T, client *gophercloud.ServiceClient, cName, oName string)
- func DeleteTempDir(t *testing.T, dirName string)
- func DeleteTempFile(t *testing.T, fileName string)
- func GetObject(client *gophercloud.ServiceClient, cName, oName string) (*objects.GetHeader, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareFiles ¶
CompareFiles will compare two files
func CreateContainer ¶
func CreateContainer(t *testing.T, client *gophercloud.ServiceClient) (string, error)
CreateContainer will create a container with a random name.
func CreateRandomFile ¶
CreateRandomFile will create a file with random content.
func CreateTempDir ¶
CreateTempDir will create and return a temp directory.
func CreateTempFile ¶
CreateTempFile will create and return a temp file.
func DeleteContainer ¶
func DeleteContainer(t *testing.T, client *gophercloud.ServiceClient, cName string)
DeleteContainer will delete a container. A fatal error will occur if the container failed to be deleted. This works best when used as a deferred function.
func DeleteObject ¶
func DeleteObject(t *testing.T, client *gophercloud.ServiceClient, cName, oName string)
DeleteObject will delete an object. A fatal error will occur if the object failed to be deleted. This works best when used as a deferred function.
func DeleteTempDir ¶
DeleteTempDir will delete a temporary directory. A fatal error will occur if the directory could not be deleted. This works best when used as a deferred function.
func DeleteTempFile ¶
DeleteTempFile will delete a temporary file. A fatal error will occur if the file could not be deleted. This works best when used as a deferred function.
func GetObject ¶
func GetObject(client *gophercloud.ServiceClient, cName, oName string) (*objects.GetHeader, error)
GetObject is an alias to objects.GetObject so we don't have to import gophercloud/gophercloud into objects_test.go and make things confusing.
Types ¶
This section is empty.