Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptoService ¶
type CryptoService interface { IsEnabled() bool GetPassword() string SetPassword(password string) //EncryptFile(source string, target string) //DecryptFile(source string, target string) //EncryptFileName(fileName string) string //DecryptFileName(fileName string) (string, error) //JustDecryptFileName(fileName string) string //DecodeViaPipe(reader io.Reader, writer io.Writer) error //EncodeViaPipe(reader io.Reader, writer io.Writer) error DecodeViaPipe(reader io.Reader, writer io.Writer) error DecodeAndDownloadFromReader(fileName string, reader io.Reader) error EncodeAndUploadReader(fileName string, updateWriter func(writer io.Writer) io.Writer, callback func(reader io.Reader) error) error Close() EncryptFileNameWithMd5(fileName string, md5 string) string DecryptFileNameWithMd5(file *drive.File) (string, string, error) GetEncoder() string GetDecoder() string }
type DatabaseBackend ¶
type DatabaseBackendConnection ¶
type DatabaseBackendConnection interface { CreateDatabase() error FindFirstById(id string, data *models.SyncFileInfo) error Persist(data *models.SyncFileInfo) error SaveOrUpdate(data *models.SyncFileInfo) error Delete(data *models.SyncFileInfo) error ReadConfig(id string, data *models.GoogleDriveConfig) error ReadConfigByFolderId(folderId string, data *models.GoogleDriveConfig) error SaveConfig(data *models.GoogleDriveConfig) error FindAllConfig() ([]models.GoogleDriveConfig, error) Find(out interface{}, where ...interface{}) error }
type DriveAPI ¶
type DriveAPI interface { ReadTeamDrives(callback func(teamDrive *drive.TeamDrive) bool) error ChangeFolder(folderNameOrId string) FileInfo(fileNameOrId string, fileNameDecoder func(*drive.File) string) (string, *drive.File, error) List() ListFolder(folderId string) ReadFolderDetail(folderId string, allDrive bool, callback func(file *drive.File) bool) error ListWithDecoder(fileNameDecoder func(*drive.File) string) Upload(localFile string) error //Download(fileNameOrId string, localFile string) (string, error) RetrieveFile(fileNameOrId string, fileRetriever func(*drive.File, io.Reader) error) error CreateFolder(folderName string) CurrentFolder() string Delete(fileNameOrId string) DropFile(fileNameOrId string) Pushd() Popd() Dirs() Version() Duplicate(fileNameOrId string, fileName string) Rename(fileNameOrId string, fileName string) FindOrCreateTrashFolder(fileId string) (string, error) EncryptedUpload(cryptoService CryptoService, fileFullPath string, folderId string, fileName string, md5sum string) error RemovePermission(fileId string, permissionId string) error PermissionInfo(driveId string, callback func(permission *drive.Permission)) error SetDomainAdminAccess(useDomainAdminAccess bool) GetDomainAdminAccess() bool SetImpersonate(impersonate string) GetImpersonate() string GetCredentialEmail() (string, error) DownloadFile(fileNameOrId string, dir string, localFile string) error NativeDownloadFile(driveSvc *drive.Service, fileNameOrId string, dir string, localFile string) error }
Click to show internal directories.
Click to hide internal directories.