Documentation ¶
Index ¶
- Constants
- func DeleteBackup(filePath string) error
- func DownloadFile(params *DownloadHelper) (bool, error)
- type DownloadHelper
- func (dh *DownloadHelper) AddParamsCacheBurst(isCacheBurst bool) *DownloadHelper
- func (dh *DownloadHelper) AddParamsFileHashed(fileHashedValue string) *DownloadHelper
- func (dh *DownloadHelper) AddParamsJWT(jwtToken string) *DownloadHelper
- func (dh *DownloadHelper) AddRequestTimeout(requestTimeOutValue int64) *DownloadHelper
- func (dh *DownloadHelper) Run() *DownloadHelper
- type DownloadParameter
Constants ¶
View Source
const ( EMPTY_STR = "" HTTP_PROTOCOL = "http" FILE_PRESENT_CHECK_ERROR = 0 FILE_PRESENT_AT_DESTINATION = 1 FILE_NOT_PRESENT_AT_DESTINATION = 2 WAIT_TIME_DURATION = 2000 MIN_FILE_SIZE = 1 )
Constants Required
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶
func DownloadFile(params *DownloadHelper) (bool, error)
Download File From Cloud With / Without Hash Checking params : DownloadParameter, consists of different aspects of downloading
Types ¶
type DownloadHelper ¶
type DownloadHelper struct { DownloadParam DownloadParameter // contains filtered or unexported fields }
DownloadHelper - Struct
func GetDownloadHelper ¶
func GetDownloadHelper(sourceURL, destinationPath string, retryCount int) *DownloadHelper
GetDownloadHelper Gives you download helper from where you can run steps
func (*DownloadHelper) AddParamsCacheBurst ¶
func (dh *DownloadHelper) AddParamsCacheBurst(isCacheBurst bool) *DownloadHelper
AddParamsFileHashed - method to add fileHashedValue at runtime
func (*DownloadHelper) AddParamsFileHashed ¶
func (dh *DownloadHelper) AddParamsFileHashed(fileHashedValue string) *DownloadHelper
AddParamsFileHashed - method to add fileHashedValue at runtime
func (*DownloadHelper) AddParamsJWT ¶
func (dh *DownloadHelper) AddParamsJWT(jwtToken string) *DownloadHelper
AddParamsJWT - method to add jwtToken at runtime
func (*DownloadHelper) AddRequestTimeout ¶
func (dh *DownloadHelper) AddRequestTimeout(requestTimeOutValue int64) *DownloadHelper
func (*DownloadHelper) Run ¶
func (dh *DownloadHelper) Run() *DownloadHelper
Run all Steps one by one
type DownloadParameter ¶
type DownloadParameter struct { DownloadError error // contains filtered or unexported fields }
Structure DownloadParameter: with different parameters which can be received for downloading the file
Click to show internal directories.
Click to hide internal directories.