driveapi

package
v0.0.0-...-947fae7 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: Unlicense Imports: 16 Imported by: 0

Documentation

Overview

Package driveapi provides basic functionality to work with Google Drive API.

Index

Constants

View Source
const (
	MimeTypeGoogleDoc = iota
	MimeTypeGoogleDrawing
	MimeTypeGoogleDriveFile
	MimeTypeGoogleDriveFolder
	MimeTypeGoogleForm
	MimeTypeGoogleFusionTable
	MimeTypeGoogleMyMap
	MimeTypeGoogleSlide
	MimeTypeGoogleAppsScript
	MimeTypeShortcut
	MimeTypeGoogleSite
	MimeTypeGoogleSpreadsheet
)

Variables

This section is empty.

Functions

func GoogleAppsMimeTypeText

func GoogleAppsMimeTypeText(code int) string

func InitWithConfigJSON

func InitWithConfigJSON(
	ctx context.Context, b []byte, tokenPath string) *drive.Service

Types

type File

type File interface {
	String() string
	IsDir() bool
	IsGoogleAppsFile() bool
	ListFiles(ctx context.Context) ([]File, error)
	Size() uint64
	Name() string
	MimeType() string
	ParentID() string
	ParentName() string
	Content() []byte
	Files() []File
	ID() string
	Download(ctx context.Context) (io.ReadCloser, error)
}

func RootFolder

func RootFolder(ctx context.Context, drv *drive.Service) (File, error)

Jump to

Keyboard shortcuts

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