Documentation ¶
Index ¶
- Constants
- type GoogleDrive
- func (gd *GoogleDrive) DownloadFile(fileId string) []byte
- func (gd *GoogleDrive) GetEntityId(entityName string, mimeType string, skip_trash bool) string
- func (gd *GoogleDrive) GetFileId(fileName string) string
- func (gd *GoogleDrive) GetFolderId(folderName string) string
- func (gd *GoogleDrive) Init(jsonConfigPath string)
- func (gd *GoogleDrive) ListEntitiesFrom(schemaName string, parentEntityId string, mimeType string, skip_trash bool) []*drive.File
- func (gd *GoogleDrive) ListFilesFromFolder(schemaName string, parentFolderName string) []*drive.File
- func (gd *GoogleDrive) UploadFile(parentFolderName string, fileName string, fileContent io.Reader)
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, )
Click to show internal directories.
Click to hide internal directories.