api

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Overview

This code serves as an example and is not meant for production use.

Copyright 2020 Veeva Systems Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFolder

func CreateFolder(remotePath string, overwrite, logStatus bool)

Make the directory and ignores, dot, empty space directory

func DownloadSingleFile

func DownloadSingleFile(downloadItem *model.DownloadItem)

Download single from the file staging area

func ListExport

func ListExport(itemPath string, recursiveOpt bool) (*model.JobRestResult, error)

List items in the page, nextPageUrl is null then it will be the first page.

func ListPage

func ListPage(itemPath, nextPageURL string, limit int64, recursiveOpt, logStatus bool) (*model.ItemsRestResult, error)

List items in the page, nextPageUrl is null then it will be the first page.

func Login

func Login() error

Login with username, password with configured in the config

func MultipartList

func MultipartList(logStatus bool) (*model.UploadSessionsRestResult, error)

MultipartList - list all active multipart session

func MultipartUploadBegin

func MultipartUploadBegin(localPath, remotePath string, overwriteOpt bool) (*model.UploadSession, error)

MultipartUploadBegin - Begin multipart upload session

func MultipartUploadCommit

func MultipartUploadCommit(uploadSession *model.UploadSession) error

Commit the Multipart session

func MultipartUploadFilePart

func MultipartUploadFilePart(localPath string, session *model.UploadSession) error

MultipartUploadFilePart - Upload multipart file

func MultipartUploadSingleFile

func MultipartUploadSingleFile(localPath, remotePath string, overwriteOpt bool) error

MultipartUploadSingleFile - Upload single file using multipart

func UploadSingleFile

func UploadSingleFile(uploadItem *model.UploadItem, overwriteOpt bool)

UploadSingleFile - uploads single file using if size is less than 50MB

func WaitForJobCompletion

func WaitForJobCompletion(jobID int64, message string, timeoutSec int) (*model.Link, error)

Check for job status every 10 seconds

Types

This section is empty.

Jump to

Keyboard shortcuts

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