Documentation ¶
Index ¶
- type Service
- func (s *Service) CreateDir(name string, parentID string) (*drive.File, error)
- func (s *Service) Download(f *drive.File) error
- func (s *Service) Get(name string) (*drive.File, error)
- func (s *Service) List(limit int) ([]*drive.File, error)
- func (s *Service) Upload(filePath string) (*drive.File, error)
- type WriteCounter
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 ¶
NewService returns new service instance
func (*Service) Get ¶
Get finds file with given name on drive if there are multiple files with given name method returns latest modified
type WriteCounter ¶
type WriteCounter struct {
Total uint64
}
WriteCounter counts the number of bytes written to it. It implements to the io.Writer interface and we can pass this into io.TeeReader() which will report progress on each write cycle.
func (WriteCounter) PrintProgress ¶
func (wc WriteCounter) PrintProgress()
Click to show internal directories.
Click to hide internal directories.