drive

package
v0.0.0-...-21e646a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package drive provides methods for interacting with Google Drive

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetFile gets the file with the given id.
	// Return values are: the name of the file, the contents of the file, and any errors that occurred.
	GetFile(ctx context.Context, id string) (string, io.ReadCloser, error)

	// UploadFile uploads a file with the given name and contents to the specified folder.
	// Returns the URL of the uploaded file.
	UploadFile(ctx context.Context, name, folder string, contents io.Reader) (string, error)
}

Client provides an interface to fetch files from Google Drive

func NewClient

func NewClient(ctx context.Context) (Client, error)

NewClient creates a new DriveClient

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL