drive

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleDrive

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

func DriveNewServices added in v0.0.3

func DriveNewServices(FileCred string, FileToken string) (driveService GoogleDrive)

func NewGoogleDrive

func NewGoogleDrive(srvDrive *drive.Service) (res GoogleDrive)

func (*GoogleDrive) CreateDuplicate

func (gd *GoogleDrive) CreateDuplicate(fileId, filename, desc string, permission *drive.Permission) (fileDupId string, err error)

func (*GoogleDrive) DeleteFiles

func (gd *GoogleDrive) DeleteFiles(fileId ...string) (fileStatus map[string]bool, err error)

func (*GoogleDrive) DownloadFile

func (gd *GoogleDrive) DownloadFile(fileId, mimeType string) (res *http.Response, err error)

func (*GoogleDrive) Service

func (gd *GoogleDrive) Service() *drive.Service

func (*GoogleDrive) UploadFile

func (gd *GoogleDrive) UploadFile(fileName, mimeType, filePath string, permission *drive.Permission) (fileId string, err error)

func (*GoogleDrive) UploadFileReader

func (gd *GoogleDrive) UploadFileReader(fileName, mimeType string, fileReader io.ReadSeeker, permission *drive.Permission) (fileId string, err error)

Jump to

Keyboard shortcuts

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