gdrive

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIMETypeFolder = "application/vnd.google-apps.folder"
)

Variables

This section is empty.

Functions

func NewServiceFromOauth2

func NewServiceFromOauth2(config *oauth2.Config, tokenPath string) (*drive.Service, error)

func OAuth2FromFile

func OAuth2FromFile(filename string) (*oauth2.Config, error)

Types

type GdriveStorage

type GdriveStorage struct {
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(root string, svc *drive.Service) (*GdriveStorage, error)

func (*GdriveStorage) Download

func (drive *GdriveStorage) Download(w io.Writer, path string) error

func (*GdriveStorage) IsDownloadable

func (drive *GdriveStorage) IsDownloadable(path string) (bool, error)

func (*GdriveStorage) List

func (drive *GdriveStorage) List(path string) ([]storage.StorageEntry, error)

Jump to

Keyboard shortcuts

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