Documentation
¶
Index ¶
- Constants
- func ExtractFileID(driveLink string) (string, error)
- type GDrive
- func (gd *GDrive) DownloadFile(fileID string) ([]byte, error)
- func (gd *GDrive) FolderListShow(folderID string) (*drive.FileList, error)
- func (gd *GDrive) GetLastModified(url string) (*time.Time, error)
- func (gd *GDrive) IsWithinDownloadLimit(file *drive.File) bool
- func (gd *GDrive) IsWithinParseLimit(file *drive.File) bool
- func (gd *GDrive) ListDriveEntity(url string) (string, *drive.File, error)
Constants ¶
View Source
const ( TypeFolder = "application/vnd.google-apps.folder" TypeGoogleSheet = "application/vnd.google-apps.spreadsheet" )
View Source
const (
GoogleDriveTimeFormat = "2006-01-02T15:04:05.000Z"
)
Variables ¶
This section is empty.
Functions ¶
func ExtractFileID ¶
Types ¶
type GDrive ¶
type GDrive struct {
// contains filtered or unexported fields
}
func NewGDrives ¶
func (*GDrive) DownloadFile ¶
DownloadFile downloads a file from Google Drive
func (*GDrive) FolderListShow ¶
func (*GDrive) IsWithinDownloadLimit ¶
IsWithinDownloadLimit checks whether the given file's size is within the permissible download limit. Returns true if no limit is set or if the file size is below the configured maximum.
func (*GDrive) IsWithinParseLimit ¶
IsWithinParseLimit checks whether the given file's size is within the permissible parse limit. Returns true if no limit is set or if the file size is below the configured maximum.
Click to show internal directories.
Click to hide internal directories.