drive

package
v0.0.0-...-f8ba940 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service google drive API wrapper.

func NewService

func NewService(client *http.Client) (*Service, error)

NewService returns new service instance.

func (*Service) CreateDir

func (s *Service) CreateDir(name string, parentID string) (*drive.File, error)

CreateDir creates a directory at google drive.

func (*Service) Download

func (s *Service) Download(f *drive.File) error

Download downloads file from drive.

func (*Service) Get

func (s *Service) Get(name string) (*drive.File, error)

Get finds file with given name on drive. if there are multiple files with given name method returns latest modified.

func (*Service) List

func (s *Service) List(limit int) ([]*drive.File, error)

List returns list of files contained in drive.

func (*Service) Upload

func (s *Service) Upload(filePath string) (*drive.File, error)

Upload uploads file to google drive.

Jump to

Keyboard shortcuts

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