Documentation ¶
Overview ¶
Package httpclient provides basic http functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadedFile ¶
type DownloadedFile struct { RemoteFileInfo RemoteFileInfo LocalFilePath string Size int64 DownloadedAt time.Time }
DownloadedFile contains information about a file that has been downloaded to the local file system
func DownloadRemoteFile ¶
func DownloadRemoteFile(destinationFileName string, url string) (*DownloadedFile, error)
DownloadRemoteFile retrieves a file from a url to a local file destination. On success returns information about the file in DownloadedFile
type RemoteFileInfo ¶
RemoteFileInfo contains information
func GetRemoteFileInfo ¶
func GetRemoteFileInfo(url string) (RemoteFileInfo, error)
GetRemoteFileInfo retrieves ETag and last modified timestamp from url using a HEAD request
func (*RemoteFileInfo) IsDifferent ¶
func (df *RemoteFileInfo) IsDifferent(etag string, lastModifiedTimestamp int64) bool
Click to show internal directories.
Click to hide internal directories.