Documentation ¶
Index ¶
- func NewConnector() (*sdk.ConnectorPlugin, error)
- type CreateFolderOperation
- type CreateNewFileOperation
- type DuplicateFileOperation
- type File
- type GetFileByIDOperation
- type ListFileResponse
- type ListFilesOperation
- type ReadFileOperation
- type TriggerNewFile
- func (t TriggerNewFile) GetInfo() *sdk.TriggerInfo
- func (t TriggerNewFile) OnDisabled(ctx *sdk.RunContext) error
- func (t TriggerNewFile) OnEnabled(ctx *sdk.RunContext) error
- func (t TriggerNewFile) Run(ctx *sdk.RunContext) (sdk.JSON, error)
- func (t TriggerNewFile) Test(ctx *sdk.RunContext) (sdk.JSON, error)
- type TriggerNewFolder
- func (t *TriggerNewFolder) GetInfo() *sdk.TriggerInfo
- func (t *TriggerNewFolder) OnDisabled(ctx *sdk.RunContext) error
- func (t *TriggerNewFolder) OnEnabled(ctx *sdk.RunContext) error
- func (t *TriggerNewFolder) Run(ctx *sdk.RunContext) (sdk.JSON, error)
- func (t *TriggerNewFolder) Test(ctx *sdk.RunContext) (sdk.JSON, error)
- type UploadFileOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnector ¶
func NewConnector() (*sdk.ConnectorPlugin, error)
Types ¶
type CreateFolderOperation ¶
type CreateFolderOperation struct {
// contains filtered or unexported fields
}
func NewCreateFolderOperation ¶
func NewCreateFolderOperation() *CreateFolderOperation
func (*CreateFolderOperation) GetInfo ¶
func (c *CreateFolderOperation) GetInfo() *sdk.OperationInfo
func (*CreateFolderOperation) Run ¶
func (c *CreateFolderOperation) Run(ctx *sdk.RunContext) (sdk.JSON, error)
func (*CreateFolderOperation) Test ¶
func (c *CreateFolderOperation) Test(ctx *sdk.RunContext) (sdk.JSON, error)
type CreateNewFileOperation ¶
type CreateNewFileOperation struct {
// contains filtered or unexported fields
}
func NewCreateNewFileTrigger ¶
func NewCreateNewFileTrigger() *CreateNewFileOperation
func (*CreateNewFileOperation) GetInfo ¶
func (c *CreateNewFileOperation) GetInfo() *sdk.OperationInfo
func (*CreateNewFileOperation) Run ¶
func (c *CreateNewFileOperation) Run(ctx *sdk.RunContext) (sdk.JSON, error)
func (*CreateNewFileOperation) Test ¶
func (c *CreateNewFileOperation) Test(ctx *sdk.RunContext) (sdk.JSON, error)
type DuplicateFileOperation ¶
type DuplicateFileOperation struct {
// contains filtered or unexported fields
}
func NewDuplicateFileOperation ¶
func NewDuplicateFileOperation() *DuplicateFileOperation
func (*DuplicateFileOperation) GetInfo ¶
func (c *DuplicateFileOperation) GetInfo() *sdk.OperationInfo
func (*DuplicateFileOperation) Run ¶
func (c *DuplicateFileOperation) Run(ctx *sdk.RunContext) (sdk.JSON, error)
func (*DuplicateFileOperation) Test ¶
func (c *DuplicateFileOperation) Test(ctx *sdk.RunContext) (sdk.JSON, error)
type File ¶
type File struct { // CreatedTime: The time at which the file was created (RFC 3339 // date-time). CreatedTime string `json:"createdTime,omitempty"` // Description: A short description of the file. Description string `json:"description,omitempty"` // DriveID: Output only. ID of the shared drive the file resides in. // Only populated for items in shared drives. DriveID string `json:"driveId,omitempty"` // ExplicitlyTrashed: Output only. Whether the file has been explicitly // trashed, as opposed to recursively trashed from a parent folder. ExplicitlyTrashed bool `json:"explicitlyTrashed,omitempty"` // ExportLinks: Output only. Links for exporting Docs Editors files to // specific formats. ExportLinks map[string]string `json:"exportLinks,omitempty"` // FileExtension: Output only. The final component of // `fullFileExtension`. This is only available for files with binary // content in Google Drive. FileExtension string `json:"fileExtension,omitempty"` // FullFileExtension: Output only. The full file extension extracted // from the `name` field. May contain multiple concatenated extensions, // such as "tar.gz". This is only available for files with binary // content in Google Drive. This is automatically updated when the // `name` field changes, however it is not cleared if the new name does // not contain a valid extension. FullFileExtension string `json:"fullFileExtension,omitempty"` // HasAugmentedPermissions: Output only. Whether there are permissions // directly on this file. This field is only populated for items in // shared drives. HasAugmentedPermissions bool `json:"hasAugmentedPermissions,omitempty"` // HasThumbnail: Output only. Whether this file has a thumbnail. This // does not indicate whether the requesting app has access to the // thumbnail. To check access, look for the presence of the // thumbnailLink field. HasThumbnail bool `json:"hasThumbnail,omitempty"` // ID: The ID of the file. ID string `json:"id,omitempty"` // Kind: Output only. Identifies what kind of resource this is. Value: // the fixed string "drive#file". Kind string `json:"kind,omitempty"` // Md5Checksum: Output only. The MD5 checksum for the content of the // file. This is only applicable to files with binary content in Google // Drive. Md5Checksum string `json:"md5Checksum,omitempty"` // MimeType: The MIME type of the file. Google Drive attempts to // automatically detect an appropriate value from uploaded content, if // no value is provided. The value cannot be changed unless a new // revision is uploaded. If a file is created with a Google Doc MIME // type, the uploaded content is imported, if possible. The supported // import formats are published in the About resource. MimeType string `json:"mimeType,omitempty"` // ModifiedByMe: Output only. Whether the file has been modified by this // user. ModifiedByMe bool `json:"modifiedByMe,omitempty"` // ModifiedByMeTime: The last time the file was modified by the user // (RFC 3339 date-time). ModifiedByMeTime string `json:"modifiedByMeTime,omitempty"` // ModifiedTime: he last time the file was modified by anyone (RFC 3339 // date-time). Note that setting modifiedTime will also update // modifiedByMeTime for the user. ModifiedTime string `json:"modifiedTime,omitempty"` // Name: The name of the file. This is not necessarily unique within a // folder. Note that for immutable items such as the top level folders // of shared drives, My Drive root folder, and Application Data folder // the name is constant. Name string `json:"name,omitempty"` // OriginalFilename: The original filename of the uploaded content if // available, or else the original value of the `name` field. This is // only available for files with binary content in Google Drive. OriginalFilename string `json:"originalFilename,omitempty"` // Size: Output only. Size in bytes of blobs and first party editor // files. Won't be populated for files that have no size, like shortcuts // and folders. Size int64 `json:"size,omitempty,string"` // Spaces: Output only. The list of spaces which contain the file. The // currently supported values are 'drive', 'appDataFolder' and 'photos'. Spaces []string `json:"spaces,omitempty"` // Starred: Whether the user has starred the file. Starred bool `json:"starred,omitempty"` // TeamDriveID: Deprecated: Output only. Use `driveId` instead. TeamDriveID string `json:"teamDriveId,omitempty"` // Trashed: Whether the file has been trashed, either explicitly or from // a trashed parent folder. Only the owner may trash a file, and other // users cannot see files in the owner's trash. Trashed bool `json:"trashed,omitempty"` // TrashedTime: The time that the item was trashed (RFC 3339 date-time). // Only populated for items in shared drives. TrashedTime string `json:"trashedTime,omitempty"` // Version: Output only. A monotonically increasing version number for // the file. This reflects every change made to the file on the server, // even those not visible to the user. Version int64 `json:"version,omitempty,string"` // ViewedByMe: Output only. Whether the file has been viewed by this // user. ViewedByMe bool `json:"viewedByMe,omitempty"` // ViewedByMeTime: The last time the file was viewed by the user (RFC // 3339 date-time). ViewedByMeTime string `json:"viewedByMeTime,omitempty"` // ViewersCanCopyContent: Deprecated: Use `copyRequiresWriterPermission` // instead. ViewersCanCopyContent bool `json:"viewersCanCopyContent,omitempty"` // WebContentLink: Output only. A link for downloading the content of // the file in a browser. This is only available for files with binary // content in Google Drive. WebContentLink string `json:"webContentLink,omitempty"` // WebViewLink: Output only. A link for opening the file in a relevant // Google editor or viewer in a browser. WebViewLink string `json:"webViewLink,omitempty"` FileData *string `json:"fileData"` }
File The metadata for a file. Some resource methods (such as `files.update`) require a `fileId`. Use the `files.list` method to retrieve the ID for a file.
type GetFileByIDOperation ¶
type GetFileByIDOperation struct {
// contains filtered or unexported fields
}
func NewGetFileByIDOperation ¶
func NewGetFileByIDOperation() *GetFileByIDOperation
func (*GetFileByIDOperation) GetInfo ¶
func (c *GetFileByIDOperation) GetInfo() *sdk.OperationInfo
func (*GetFileByIDOperation) Run ¶
func (c *GetFileByIDOperation) Run(ctx *sdk.RunContext) (sdk.JSON, error)
func (*GetFileByIDOperation) Test ¶
func (c *GetFileByIDOperation) Test(ctx *sdk.RunContext) (sdk.JSON, error)
type ListFileResponse ¶
type ListFilesOperation ¶
type ListFilesOperation struct {
// contains filtered or unexported fields
}
func NewListFilesOperation ¶
func NewListFilesOperation() *ListFilesOperation
func (*ListFilesOperation) GetInfo ¶
func (c *ListFilesOperation) GetInfo() *sdk.OperationInfo
func (*ListFilesOperation) Run ¶
func (c *ListFilesOperation) Run(ctx *sdk.RunContext) (sdk.JSON, error)
func (*ListFilesOperation) Test ¶
func (c *ListFilesOperation) Test(ctx *sdk.RunContext) (sdk.JSON, error)
type ReadFileOperation ¶
type ReadFileOperation struct {
// contains filtered or unexported fields
}
func NewReadFileOperation ¶
func NewReadFileOperation() *ReadFileOperation
func (*ReadFileOperation) GetInfo ¶
func (c *ReadFileOperation) GetInfo() *sdk.OperationInfo
func (*ReadFileOperation) Run ¶
func (c *ReadFileOperation) Run(ctx *sdk.RunContext) (sdk.JSON, error)
func (*ReadFileOperation) Test ¶
func (c *ReadFileOperation) Test(ctx *sdk.RunContext) (sdk.JSON, error)
type TriggerNewFile ¶
type TriggerNewFile struct {
// contains filtered or unexported fields
}
func NewTriggerNewFile ¶
func NewTriggerNewFile() *TriggerNewFile
func (TriggerNewFile) GetInfo ¶
func (t TriggerNewFile) GetInfo() *sdk.TriggerInfo
func (TriggerNewFile) OnDisabled ¶
func (t TriggerNewFile) OnDisabled(ctx *sdk.RunContext) error
func (TriggerNewFile) OnEnabled ¶
func (t TriggerNewFile) OnEnabled(ctx *sdk.RunContext) error
func (TriggerNewFile) Run ¶
func (t TriggerNewFile) Run(ctx *sdk.RunContext) (sdk.JSON, error)
func (TriggerNewFile) Test ¶
func (t TriggerNewFile) Test(ctx *sdk.RunContext) (sdk.JSON, error)
type TriggerNewFolder ¶
type TriggerNewFolder struct {
// contains filtered or unexported fields
}
func NewTriggerNewFolder ¶
func NewTriggerNewFolder() *TriggerNewFolder
func (*TriggerNewFolder) GetInfo ¶
func (t *TriggerNewFolder) GetInfo() *sdk.TriggerInfo
func (*TriggerNewFolder) OnDisabled ¶
func (t *TriggerNewFolder) OnDisabled(ctx *sdk.RunContext) error
func (*TriggerNewFolder) OnEnabled ¶
func (t *TriggerNewFolder) OnEnabled(ctx *sdk.RunContext) error
func (*TriggerNewFolder) Run ¶
func (t *TriggerNewFolder) Run(ctx *sdk.RunContext) (sdk.JSON, error)
func (*TriggerNewFolder) Test ¶
func (t *TriggerNewFolder) Test(ctx *sdk.RunContext) (sdk.JSON, error)
type UploadFileOperation ¶
type UploadFileOperation struct {
// contains filtered or unexported fields
}
func NewUploadFileOperation ¶
func NewUploadFileOperation() *UploadFileOperation
func (*UploadFileOperation) GetInfo ¶
func (c *UploadFileOperation) GetInfo() *sdk.OperationInfo
func (*UploadFileOperation) Run ¶
func (c *UploadFileOperation) Run(ctx *sdk.RunContext) (sdk.JSON, error)
func (*UploadFileOperation) Test ¶
func (c *UploadFileOperation) Test(ctx *sdk.RunContext) (sdk.JSON, error)
Click to show internal directories.
Click to hide internal directories.