Documentation
¶
Overview ¶
Package downloader Options defines downloader options
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶
type Downloader struct { Options *Options // contains filtered or unexported fields }
Downloader Struct for downloading photos into managed folders, use factory method `NewDownloader` to create
func NewDownloader ¶
func NewDownloader() *Downloader
NewDownloader factory to create a Downloader instance with defaults
func (*Downloader) DownloadAll ¶
func (d *Downloader) DownloadAll(svc *photoslibrary.Service) error
DownloadAll downloads all files
type LibraryItem ¶
type LibraryItem struct { //Google Photos item photoslibrary.MediaItem //Actual file name that was used, without a path UsedFileName string }
LibraryItem Google Photo item and meta data
func (*LibraryItem) MarshalJSON ¶
func (l *LibraryItem) MarshalJSON() ([]byte, error)
MarshalJSON marshal as json
type Options ¶
type Options struct { //BackupFolderis the backup folder BackupFolder string //FolderFormat time format used to format folder structure FolderFormat string //UseFileName use file name when uploaded to Google Photos UseFileName bool //OriginalFiles retain EXIF metadata on downloaded images. Location information is not included. IncludeEXIF bool //MaxItems how many items to download MaxItems int //number of items to download on per API call PageSize int //Throttle is time to wait between API calls Throttle int //DownloadThrottle is the rate to limit downloading of items (KB/sec) DownloadThrottle float64 //ConcurrentDownloads is the number of downloads that can happen at once ConcurrentDownloads int //Google photos AlbumID AlbumID string //CredentialsFile Google API credentials.json file CredentialsFile string //TokenFile Google oauth client token.json file TokenFile string }
Options Defines downloader various options
type Stats ¶
type Stats struct { Total int Errors int TotalSize uint64 Downloaded int Skipped int // contains filtered or unexported fields }
Stats TODO
func (*Stats) UpdateStatsDownloaded ¶
UpdateStatsDownloaded increment the downloaded items and size of items
func (*Stats) UpdateStatsError ¶
UpdateStatsError increment the items that produced errors
func (*Stats) UpdateStatsSkipped ¶
UpdateStatsError increment the skipped items
func (*Stats) UpdateStatsTotal ¶
UpdateStatsTotal increment the total items
Click to show internal directories.
Click to hide internal directories.