Documentation
¶
Overview ¶
Package utl (appsscriptapi.go) : These methods are for using Apps Script API.
Package utl (convert.go) : This is a convereter to send GAS script to Google.
Package utl (dlfolders.go) : These methods are for downloading all files and folders from a folder in Google Drive.
Package utl (dlrevfile.go) : These methods are for retrieving revision ID and downloading revision files from Google Drive.
Package utl (fetcher.go) : These methods are for retrieving data from URL.
Package utl (getdriveinformation.go) : These method is for retrieving Drive Information.
Package utl (managepermissions.go) : These methods are for managing permissions of files and folders in Google Drive.
Package utl (resumableupload.go) : These methods are for Resumable Upload to Google Drive.
Package utl (searchfiles.go) : These methods are for searching files in Google Drive using search query and regex.
Package utl (transfer.go) : These methods are for downloading, uploading files and folders, and retrieving file list from or to Google Drive.
Package utl (zip.go) : These methods are for zipping files.
Index ¶
- func ChkExtention(ex string) bool
- func ConvGasToPut(c *cli.Context) string
- func ConvGasToRun(c *cli.Context) string
- func ConvGasToUpload(scriptfile string) string
- func ConvStringToRun(c *cli.Context, stringscript string) string
- func DispScopeError1()
- func DispScopeError2(body []byte)
- func ExtToType(ex string, uppercase bool) string
- type AppsScriptApiInf
- type FileInf
- func (p *FileInf) ChkBoundOrStandalone(fileId string) ([]byte, error, bool)
- func (p *FileInf) DlFolders() error
- func (p *FileInf) Downloader(c *cli.Context) *FileInf
- func (p *FileInf) GetDriveInformation() *FileInf
- func (p *FileInf) GetFileList(c *cli.Context) *FileInf
- func (p *FileInf) GetFileinf() *FileInf
- func (p *FileInf) GetListLoop(q, fields string) fileListSt
- func (p *FileInf) GetRevisionList(c *cli.Context) *FileInf
- func (p *FileInf) ManagePermissions() *FileInf
- func (p *FileInf) ProjectUpdateByAppsScriptApi(pr *ProjectForAppsScriptApi) *AppsScriptApiInf
- func (p *FileInf) ResumableUpload(metadata map[string]interface{}, fs *os.File, fstatus os.FileInfo) []byte
- func (p *FileInf) SearchFiles() *FileInf
- func (p *FileInf) Uploader(c *cli.Context) *FileInf
- type FilesForAppsScriptApi
- type ProjectForAppsScriptApi
- type RequestParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChkExtention ¶
ChkExtention : Check extension of inputted files.
func ConvGasToPut ¶
ConvGasToPut : Reads GAS source and formats it.
func ConvGasToRun ¶
ConvGasToRun : Reads GAS source and formats it.
func ConvStringToRun ¶
ConvStringToRun : Reads GAS source and formats it as a string script.
func DispScopeError1 ¶
func DispScopeError1()
DispScopeError1 : Display about new scope of 'https://www.googleapis.com/auth/script.projects'.
func DispScopeError2 ¶
func DispScopeError2(body []byte)
DispScopeError2 : Display about new scope of 'https://www.googleapis.com/auth/script.projects'.
Types ¶
type AppsScriptApiInf ¶
type AppsScriptApiInf struct { ScriptId string `json:"scriptId"` ParentId string `json:"parentId"` Title string `json:"title"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` Creator creator `json:"creator"` LastModifyUser lastmodifyuser `json:"lastModifyUser"` }
AppsScriptApiInf : Information retrieved by Apps Script API
type FileInf ¶
type FileInf struct { ProjectID string `json:"project_id,omitempty"` ParentID string `json:"parentId,omitempty"` RevisionID string `json:"revisionid,omitempty"` FileID string `json:"id,omitempty"` FileName string `json:"name,omitempty"` SaveName string `json:"saved_file_name,omitempty"` MimeType string `json:"mimeType,omitempty"` UpFilename []string `json:"upload_file_name,omitempty"` UpFileID []string `json:"uid,omitempty"` Parents []string `json:"parents,omitempty"` FileSize string `json:"size,omitempty"` WebLink string `json:"webContentLink,omitempty"` WebView string `json:"webViewLink,omitempty"` CreatedTime *time.Time `json:"createdTime,omitempty"` ModifiedTime *time.Time `json:"modifiedTime,omitempty"` UppedFiles []uploadedFile `json:"uploaded_files,omitempty"` LastModifyingUser *lastmodifieduser `json:"lastModifyingUser,omitempty"` Owners []owners `json:"owners,omitempty"` Msgar []string `json:"message,omitempty"` TotalEt float64 `json:"TotalElapsedTime,omitempty"` FolderTree *fileListDl `json:"folderTreeWithFiles,omitempty"` SearchQuery string `json:"query,omitempty"` SearchFields string `json:"fields,omitempty"` SearchRegex string `json:"regex,omitempty"` SearchedFiles []fileS `json:"searchedFiles,omitempty"` SearchedResult string `json:"searchedResult,omitempty"` InputtedMimeType []string `json:"inputtedMimeType,omitempty"` ReturnedResult interface{} `json:"returnedResult,omitempty"` Accesstoken string `json:"-"` BoundScriptName string `json:"-"` ChunkSize int64 `json:"-"` ConvertTo string `json:"-"` DlMime string `json:"-"` GoogleDocName string `json:"-"` OverWrite bool `json:"-"` PermissionInfo permissionInf `json:"-"` Progress bool `json:"-"` ProjectType string `json:"-"` PstartTime time.Time `json:"-"` RawProject bool `json:"-"` SearchByName string `json:"-"` SearchByID string `json:"-"` ShowFileInf bool `json:"-"` Size int64 `json:"-"` Skip bool `json:"-"` UseServiceAccount string `json:"-"` WantExt string `json:"-"` WantName string `json:"-"` Workdir string `json:"-"` Zip bool `json:"-"` }
FileInf : File information for downloading and uploading
func (*FileInf) ChkBoundOrStandalone ¶
ChkBoundOrStandalone : Check whether the fileId is a bound script or a standalone script.
func (*FileInf) Downloader ¶
Downloader : Download files.
func (*FileInf) GetDriveInformation ¶
GetDriveInformation : Get Drive Information.
func (*FileInf) GetFileList ¶
GetFileList : Retrieving file list on Google Drive.
func (*FileInf) GetFileinf ¶
GetFileinf : Retrieve file infomation using Drive API.
func (*FileInf) GetListLoop ¶
GetListLoop : Loop for retrieving file list.
func (*FileInf) GetRevisionList ¶
GetRevisionList : Display revision IDs.
func (*FileInf) ManagePermissions ¶
ManagePermissions : Main method of Manage Permissions.
func (*FileInf) ProjectUpdateByAppsScriptApi ¶
func (p *FileInf) ProjectUpdateByAppsScriptApi(pr *ProjectForAppsScriptApi) *AppsScriptApiInf
ProjectUpdateByAppsScriptApi : For uploading project using Apps Script API.
func (*FileInf) ResumableUpload ¶
func (p *FileInf) ResumableUpload(metadata map[string]interface{}, fs *os.File, fstatus os.FileInfo) []byte
ResumableUpload : Main method of Resumable upload.
func (*FileInf) SearchFiles ¶
SearchFiles : Searching files on Google Drive using query and regex.
type FilesForAppsScriptApi ¶
type FilesForAppsScriptApi struct { Name string `json:"name"` Type string `json:"type"` Source string `json:"source"` CreateTime time.Time `json:"createTime,omitempty"` UpdateTime time.Time `json:"updateTime,omitempty"` Creator *creator `json:"creator,omitempty"` LastModifyUser *lastmodifyuser `json:"lastModifyUser,omitempty"` }
FilesForAppsScriptApi : A file structure for Apps Script API
type ProjectForAppsScriptApi ¶
type ProjectForAppsScriptApi struct { ScriptId string `json:"scriptId,omitempty"` Files []FilesForAppsScriptApi `json:"files"` }
ProjectForAppsScriptApi : Project structure for Apps Script API
type RequestParams ¶
type RequestParams struct { Method string APIURL string Data io.Reader Contenttype string ContentLength string ContentRange string Accesstoken string Dtime int64 }
RequestParams : Parameters for FetchAPI
func (*RequestParams) FetchAPI ¶
func (r *RequestParams) FetchAPI() ([]byte, error)
FetchAPI : For fetching data to URL.
func (*RequestParams) FetchAPIRaw ¶
func (r *RequestParams) FetchAPIRaw() (*http.Response, error)
FetchAPIRaw : For fetching data to URL. Raw data (http.Response) from API is returned.
func (*RequestParams) FetchAPIres ¶
func (r *RequestParams) FetchAPIres() (*http.Response, error)
FetchAPIres : For fetching data to URL.