zboxutil

package
v1.0.84 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: MIT Imports: 25 Imported by: 6

Documentation

Index

Constants

View Source
const COMMIT_ENDPOINT = "/v1/connection/commit/"
View Source
const COMMIT_META_TXN_ENDPOINT = "/v1/file/commitmetatxn/"
View Source
const CONNECTION_ENDPOINT = "/v1/connection/details/"
View Source
const COPY_ENDPOINT = "/v1/file/copy/"
View Source
const DOWNLOAD_ENDPOINT = "/v1/file/download/"
View Source
const EncryptedFolderName = "encrypted"
View Source
const FILE_META_ENDPOINT = "/v1/file/meta/"
View Source
const FILE_STATS_ENDPOINT = "/v1/file/stats/"
View Source
const LATEST_READ_MARKER = "/v1/readmarker/latest"
View Source
const LIST_ENDPOINT = "/v1/file/list/"
View Source
const MAX_RETRIES = 5
View Source
const OBJECT_TREE_ENDPOINT = "/v1/file/objecttree/"
View Source
const REFERENCE_ENDPOINT = "/v1/file/referencepath/"
View Source
const REGISTER_CLIENT = "v1/client/put"
View Source
const RENAME_ENDPOINT = "/v1/file/rename/"
View Source
const SC_REST_API_URL = "v1/screst/"
View Source
const SLEEP_BETWEEN_RETRIES = 5
View Source
const UPLOAD_ENDPOINT = "/v1/file/upload/"

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(key, text []byte) ([]byte, error)

func Encrypt

func Encrypt(key, text []byte) ([]byte, error)

func GetFileContentType

func GetFileContentType(out *os.File) (string, error)

func GetFullRemotePath

func GetFullRemotePath(localPath, remotePath string) string

func HttpDo

func HttpDo(ctx context.Context, cncl context.CancelFunc, req *http.Request, f func(*http.Response, error) error) error

func IsRemoteAbs

func IsRemoteAbs(path string) bool

func MakeSCRestAPICall

func MakeSCRestAPICall(scAddress string, relativePath string, params map[string]string, handler SCRestAPIHandler) ([]byte, error)

func NewCommitMetaTxnRequest

func NewCommitMetaTxnRequest(baseUrl string, allocation string, body io.Reader) (*http.Request, error)

func NewCommitRequest

func NewCommitRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)

func NewConnectionId

func NewConnectionId() string

func NewCopyRequest

func NewCopyRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)

func NewDeleteRequest

func NewDeleteRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)

func NewDownloadRequest

func NewDownloadRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)

func NewFileMetaRequest

func NewFileMetaRequest(baseUrl string, allocation string, body io.Reader) (*http.Request, error)

func NewFileStatsRequest

func NewFileStatsRequest(baseUrl string, allocation string, body io.Reader) (*http.Request, error)

func NewHTTPRequest

func NewHTTPRequest(method string, url string, data []byte) (*http.Request, context.Context, context.CancelFunc, error)

func NewListRequest

func NewListRequest(baseUrl, allocation string, path string, auth_token string) (*http.Request, error)

func NewObjectTreeRequest

func NewObjectTreeRequest(baseUrl, allocation string, path string) (*http.Request, error)

func NewReferencePathRequest

func NewReferencePathRequest(baseUrl, allocation string, paths []string) (*http.Request, error)

func NewRenameRequest

func NewRenameRequest(baseUrl, allocation string, body io.Reader) (*http.Request, error)

func NewUploadRequest

func NewUploadRequest(baseUrl, allocation string, body io.Reader, update bool) (*http.Request, error)

func RemoteClean

func RemoteClean(path string) string

Types

type SCRestAPIHandler

type SCRestAPIHandler func(response map[string][]byte, numSharders int, err error)

Jump to

Keyboard shortcuts

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