Documentation ¶
Index ¶
- type Chudrive
- func (chudrive *Chudrive) CreateFolder(folderName, parentID string) (*drive.File, error)
- func (chudrive *Chudrive) DeleteFile(fileID string) error
- func (chudrive *Chudrive) DownloadFileLocal(filename, fileID string) error
- func (chudrive *Chudrive) ListByQuery(query string) (map[string]string, error)
- func (chudrive *Chudrive) ListFile(query string) (map[string]string, error)
- func (chudrive *Chudrive) ListFolder(query string) (map[string]string, error)
- func (chudrive *Chudrive) TransferOwnership(fileID, email string) error
- func (chudrive *Chudrive) UploadFileLocal(filename, parentID string) (*drive.File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chudrive ¶
type Chudrive struct {
Drive *drive.Service
}
Chudrive - Google drive wrapper.
func (*Chudrive) CreateFolder ¶
CreateFolder - Create a folder.
func (*Chudrive) DeleteFile ¶
DeleteFile - Delete file.
func (*Chudrive) DownloadFileLocal ¶
DownloadFileLocal - Download file to local.
func (*Chudrive) ListByQuery ¶
ListByQuery - List everything by query.
func (*Chudrive) ListFile ¶
ListFile - List file, it is super weird, google treats directory as files too.
func (*Chudrive) ListFolder ¶
ListFolder - List folder.
func (*Chudrive) TransferOwnership ¶
TransferOwnership - Transfer ownership. This is particularly useful when you are using service account to create. Please make sure you own whatever file instead of your service account!
func (*Chudrive) UploadFileLocal ¶
UploadFileLocal - Upload file to path.
Click to show internal directories.
Click to hide internal directories.