gdrive

package
v0.0.0-...-56ee4c0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GoogleDocumentMimeType = "application/vnd.google-apps.document"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateDir(ctx context.Context, name string, parentId string) (*DriveFile, error)
	CreateFile(ctx context.Context, name string, mimeType string, content io.Reader, parentId string) (*DriveFile, error)
	CopyFile(ctx context.Context, sourceFileId string, destinationName string, parentId string) (*DriveFile, error)
	GrantWritePermission(ctx context.Context, fileId string, userEmail string) (*DrivePermission, error)
	GrantOwnerPermission(ctx context.Context, fileId string, userEmail string) (*DrivePermission, error)
	GetFile(ctx context.Context, fileId string) (*DriveFileReader, error)
	ExportFile(ctx context.Context, fileId string, mimeType string) (*DriveFileReader, error)
}

func NewClient

func NewClient() Client

type DriveFile

type DriveFile struct {
	Id string
}

type DriveFileReader

type DriveFileReader struct {
	Reader io.ReadCloser
}

type DrivePermission

type DrivePermission struct {
	Id string
}

Jump to

Keyboard shortcuts

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