Socket
Book a DemoInstallSign in
Socket

github.com/tiagomelo/go-google-drive-client

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/tiagomelo/go-google-drive-client

v0.1.1
Source
Go
Version published
Created
Source

go-google-drive-client

logo

A simple Go client for interacting with Google Drive using the Google Drive API (v3).

available operations

  • create folder
  • upload file
  • update file
  • download file
  • get file by id
  • delete file
  • set permissions (for user, group, domain or to anyone)

It is important to mention that for GCP everything is a file, be it a regular file or a folder (which is called a drive). So whenever you see a fileId param, it can be either a regular file or a folder.

setup

Before using this client, you need to set up a Google Cloud Project and enable the Google Drive API. Follow these steps:

  • Create a new project in the Google Cloud Console.
  • Enable the Google Drive API for your project.
  • Create credentials (service account key) for your project:
    • Go to the "Credentials" page.
    • Click "Create Credentials" and select "Service account key".
    • Choose or create a new service account.
    • Set the role to Editor or another role that grants the necessary permissions.
    • Select JSON for the key type and download the file.
  • Save the downloaded JSON.

For more detailed instructions, see the Google Drive API documentation.

examples

unit tests

make test

unit tests coverage

make coverage

FAQs

Package last updated on 08 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.