drive

package
v0.0.0-...-42aae50 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFile

func DeleteFile(accessToken string, fileID string)

func IsCannotCreateFileError

func IsCannotCreateFileError(e error) bool

func IsMultipleFilesFoundError

func IsMultipleFilesFoundError(e error) bool

func IsSheetNotFoundError

func IsSheetNotFoundError(e error) bool

func MoveToTrash

func MoveToTrash(accessToken string, fileID string)

Types

type CannotCreateFileError

type CannotCreateFileError struct {
	// contains filtered or unexported fields
}

func NewCannotCreateFileError

func NewCannotCreateFileError(filename string, cause error) *CannotCreateFileError

type DriveSheetErrorInterpreter

type DriveSheetErrorInterpreter struct {
	ErrorReporter journalskill.ErrorReporter
}

func (*DriveSheetErrorInterpreter) Interpret

func (interpreter *DriveSheetErrorInterpreter) Interpret(e error, l journalskill.Localizer) string

type DriveSheetJournalProvider

type DriveSheetJournalProvider struct {
	Log *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewDriveSheetJournalProvider

func NewDriveSheetJournalProvider(log *zap.SugaredLogger) *DriveSheetJournalProvider

func (*DriveSheetJournalProvider) Get

func (jp *DriveSheetJournalProvider) Get(accessToken string, spreadsheetName string) (j.Journal, error)

type FileService

type FileService struct {
	FileID string
	// contains filtered or unexported fields
}

func NewFileService

func NewFileService(accessToken string, filename string, log *zap.SugaredLogger) (*FileService, error)

func (*FileService) Download

func (dfs *FileService) Download() (string, error)

func (*FileService) Upload

func (dfs *FileService) Upload(content string) error

type MultipleFilesFoundError

type MultipleFilesFoundError struct {
	// contains filtered or unexported fields
}

func NewMultipleFilesFoundError

func NewMultipleFilesFoundError(filename string) *MultipleFilesFoundError

type SheetBasedTabularData

type SheetBasedTabularData struct {
	Service       *sheets.Service
	Log           *zap.SugaredLogger
	SpreadsheetID string
	// contains filtered or unexported fields
}

func NewSheetBasedTabularData

func NewSheetBasedTabularData(accessToken string, filename string, sheetTitle string, log *zap.SugaredLogger) (*SheetBasedTabularData, error)

func (*SheetBasedTabularData) AppendRow

func (td *SheetBasedTabularData) AppendRow(row []string) error

func (*SheetBasedTabularData) DeleteRow

func (td *SheetBasedTabularData) DeleteRow(rowNum int) error

func (*SheetBasedTabularData) Empty

func (td *SheetBasedTabularData) Empty() (bool, error)

func (*SheetBasedTabularData) Rows

func (td *SheetBasedTabularData) Rows() ([][]string, error)

type SheetNotFoundError

type SheetNotFoundError struct {
	// contains filtered or unexported fields
}

func NewSheetNotFoundError

func NewSheetNotFoundError(sheetsTitle string) *SheetNotFoundError

Jump to

Keyboard shortcuts

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