parser

package
v0.0.0-...-f542ae0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	Service gosheet.Service
}

CLI is the NewServiceWithClient instance

func NewCLI

func NewCLI(secretPath string) (*CLI, error)

NewCLI instantiates a service to connect with client secret

func (*CLI) ConvertToJSON

func (s *CLI) ConvertToJSON(data SheetData, title string) (bool, error)

ConvertToJSON takes sheetData map, outputs JSON file

func (*CLI) GetSpreadsheet

func (s *CLI) GetSpreadsheet(spreadsheetID string) (*gosheet.Spreadsheet, error)

GetSpreadsheet fetches the Google Spreadsheet with spreadsheetID

func (*CLI) ParseSpreadsheet

func (s *CLI) ParseSpreadsheet(sheet gosheet.Sheet) *SheetData

ParseSpreadsheet ...

func (*CLI) ReadSpreadsheet

func (s *CLI) ReadSpreadsheet(spreadsheetID string, outputJSON bool) (*SpreadsheetData, error)

ReadSpreadsheet wrapper

func (*CLI) UpdateSpreadsheet

func (s *CLI) UpdateSpreadsheet(spreadsheetID string, update ContentUpdate) (bool, error)

UpdateSpreadsheet wrapper

type Cell

type Cell *gosheet.Cell

Cell defines grid location and value

type ContentUpdate

type ContentUpdate struct {
	Row        int
	Column     int
	Value      string
	SheetTitle string
}

ContentUpdate represents a single cell update value

type Sheet

type Sheet *gosheet.Sheet

Sheet defines a sheet in a spreadsheet

type SheetData

type SheetData []sheetRecord

SheetData is all data structured from sheet

type SpreadsheetData

type SpreadsheetData []SheetData

SpreadsheetData is all data from spreadsheet

Jump to

Keyboard shortcuts

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