gdown

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(driveClient *drive.Service, file *File) error

Download File to default download folder path

func DownloadFilesInFolder

func DownloadFilesInFolder(driveClient *drive.Service, folder *Folder) error

Download folder to default download path

func DownloadItem

func DownloadItem(id string, alsoListDetails bool) error

func ListDetailsAndDownloadFile

func ListDetailsAndDownloadFile(driveClient *drive.Service, file *File) error

List details and Download File to default download folder path

func ListDetailsAndDownloadfilesInFolder

func ListDetailsAndDownloadfilesInFolder(driveClient *drive.Service, folder *Folder) error

List folder details and Download Folder to default download path

func ListFileDetails

func ListFileDetails(file *File)

List File Details

func ListFolderDetails

func ListFolderDetails(folder *Folder)

List Folder Details

func ListItemDetails

func ListItemDetails(id string) error

func NewDriveClientUsingOauth2

func NewDriveClientUsingOauth2()

Drive Client using Oauth2

func NewDriveClientUsingServiceAccount

func NewDriveClientUsingServiceAccount() (*drive.Service, error)

Drive Client using Service Account

func Prettify

func Prettify(data interface{}) string

func SetDownloadFolderPath

func SetDownloadFolderPath(path string)

Set download folder path

Types

type File

type File struct {
	Id       string
	Name     string
	MimeType string
	Size     int64
}

func GetFile

func GetFile(driveClient *drive.Service, fileId string) (*File, error)

Get File Details

type Folder

type Folder struct {
	Id      string
	Name    string
	Folders []Folder
	Files   []File
}

func GetFolder

func GetFolder(driveClient *drive.Service, folderId string) (*Folder, error)

Get Folder Details

Jump to

Keyboard shortcuts

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