Documentation ¶
Index ¶
- type GoogleDrive
- func (gd *GoogleDrive) CreateDuplicate(fileId, filename, desc string, permission *drive.Permission) (fileDupId string, err error)
- func (gd *GoogleDrive) DeleteFiles(fileId ...string) (fileStatus map[string]bool, err error)
- func (gd *GoogleDrive) DownloadFile(fileId, mimeType string) (res *http.Response, err error)
- func (gd *GoogleDrive) GetThumbnailLink(fileId string) (url string, err error)
- func (gd *GoogleDrive) GetURI(fileId string) (url string, err error)
- func (gd *GoogleDrive) Service() *drive.Service
- func (gd *GoogleDrive) UploadFile(fileName, mimeType, filePath string, permission *drive.Permission, ...) (fileId string, err error)
- func (gd *GoogleDrive) UploadFileReader(fileName, mimeType string, fileReader io.ReadSeeker, ...) (fileId string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleDrive ¶ added in v0.0.4
type GoogleDrive struct {
// contains filtered or unexported fields
}
func NewGoogleDrive ¶ added in v0.0.4
func NewGoogleDrive(srvDrive *drive.Service) (res GoogleDrive)
func (*GoogleDrive) CreateDuplicate ¶ added in v0.0.4
func (gd *GoogleDrive) CreateDuplicate(fileId, filename, desc string, permission *drive.Permission) (fileDupId string, err error)
func (*GoogleDrive) DeleteFiles ¶ added in v0.0.4
func (gd *GoogleDrive) DeleteFiles(fileId ...string) (fileStatus map[string]bool, err error)
func (*GoogleDrive) DownloadFile ¶ added in v0.0.4
func (gd *GoogleDrive) DownloadFile(fileId, mimeType string) (res *http.Response, err error)
func (*GoogleDrive) GetThumbnailLink ¶ added in v0.1.9
func (gd *GoogleDrive) GetThumbnailLink(fileId string) (url string, err error)
func (*GoogleDrive) GetURI ¶ added in v0.0.6
func (gd *GoogleDrive) GetURI(fileId string) (url string, err error)
func (*GoogleDrive) Service ¶ added in v0.0.5
func (gd *GoogleDrive) Service() *drive.Service
func (*GoogleDrive) UploadFile ¶ added in v0.0.7
func (gd *GoogleDrive) UploadFile(fileName, mimeType, filePath string, permission *drive.Permission, parentFolder ...string) (fileId string, err error)
func (*GoogleDrive) UploadFileReader ¶ added in v0.0.8
func (gd *GoogleDrive) UploadFileReader(fileName, mimeType string, fileReader io.ReadSeeker, permission *drive.Permission) (fileId string, err error)
Click to show internal directories.
Click to hide internal directories.