googledrive

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FOLDER_MIME_TYPE         = "application/vnd.google-apps.folder"
	QUICKBACKUPZIP_MIME_TYPE = "fsbackup/zip.file"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleDrive

type GoogleDrive struct {
	Client *drive.Service
}

func (*GoogleDrive) DownloadFile

func (gd *GoogleDrive) DownloadFile(fileId string) []byte

func (*GoogleDrive) GetEntityId

func (gd *GoogleDrive) GetEntityId(
	entityName string,
	mimeType string,
	skip_trash bool,
) string

func (*GoogleDrive) GetFileId

func (gd *GoogleDrive) GetFileId(fileName string) string

func (*GoogleDrive) GetFolderId

func (gd *GoogleDrive) GetFolderId(folderName string) string

func (*GoogleDrive) Init

func (gd *GoogleDrive) Init(jsonConfigPath string)

func (*GoogleDrive) ListEntitiesFrom

func (gd *GoogleDrive) ListEntitiesFrom(
	schemaName string,
	parentEntityId string,
	mimeType string,
	skip_trash bool,
) []*drive.File

func (*GoogleDrive) ListFilesFromFolder

func (gd *GoogleDrive) ListFilesFromFolder(schemaName string, parentFolderName string) []*drive.File

func (*GoogleDrive) UploadFile

func (gd *GoogleDrive) UploadFile(
	parentFolderName string,
	fileName string,
	fileContent io.Reader,
)

Jump to

Keyboard shortcuts

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