swiftcli

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMimeTypeAndMd5AndSize

func GetMimeTypeAndMd5AndSize(filePath string) (contentType string, md5Hash string, size int64, err error)

GetMimeTypeAndMd5AndSize returns the content type, md5 hash, size and error if an error is available...

func SwiftConnection

func SwiftConnection(
	version,
	endpoint,
	username,
	password,
	userDomainName,
	projectName,
	projectDomainName,
	region string,
) (*swift.Connection, error)

SwiftConnection connect swift con = connection params cont = container name

func SwiftDownloadFile

func SwiftDownloadFile(clientSwift *swift.Connection, file string, backupDir *string, useRealPath bool) (string, error)

SwiftDownloadFile swift download this file from container

func SwiftDownloadPrefix

func SwiftDownloadPrefix(clientSwift *swift.Connection, prefix string, backupDir *string, useRealPath bool) ([]string, error)

SwiftDownloadPrefix swift download all files from container that start with this prefix

func SwiftListFiles

func SwiftListFiles(clientSwift *swift.Connection) ([]string, error)

SwiftListFiles swift list all files in container

func SwiftListPrefixFiles

func SwiftListPrefixFiles(clientSwift *swift.Connection, prefix string) ([]string, error)

SwiftListPrefixFiles swift list all files in container with this prefix

func SwiftUploadFile

func SwiftUploadFile(clientSwift *swift.Connection, file string, expireAfter *int64, fakeObjectName *string) (done bool, err error)

SwiftUploadFile swift upload a file to the container

func UnpackFiles

func UnpackFiles(files []string, targetDir string) error

UnpackFiles Unpack files like .tar.gz and .gz

Types

This section is empty.

Jump to

Keyboard shortcuts

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