Documentation ¶
Overview ¶
Package gsheets contains the functionality necessary to interface with Google Sheets.
Index ¶
- type Config
- type GSheets
- func (g *GSheets) AppendWorker(id, sheetTitle string) (chan<- []string, error)
- func (g *GSheets) CleanupSheets(id string) error
- func (g *GSheets) CreateSpreadsheet(title string) (*sheets.Spreadsheet, error)
- func (g *GSheets) DeleteSheet(id string, sheetId int64) (*sheets.BatchUpdateSpreadsheetResponse, error)
- func (g *GSheets) GetSpreadsheet(id string) (*sheets.Spreadsheet, error)
- func (g *GSheets) MakeFileDomainReadable(id string) (*drive.Permission, error)
- func (g *GSheets) PrependSheet(id, title string) (*sheets.BatchUpdateSpreadsheetResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GSheets ¶
type GSheets struct {
// contains filtered or unexported fields
}
func (*GSheets) AppendWorker ¶
Create a goroutine which will do the work of appending rows to a sheet. Returns a channel which will receice a row at a time as a []string, or error. Closing the channel signals the worker to exit.
func (*GSheets) CleanupSheets ¶
Remove Sheet1 and trailing sheets so that the number of sheets is at most nSheets.
func (*GSheets) CreateSpreadsheet ¶
func (g *GSheets) CreateSpreadsheet(title string) (*sheets.Spreadsheet, error)
Create a spreadsheet given a title. Returns a sheets.Spreadsheet pointer or error.
func (*GSheets) DeleteSheet ¶
func (g *GSheets) DeleteSheet(id string, sheetId int64) (*sheets.BatchUpdateSpreadsheetResponse, error)
Delete a sheet from a spreadsheet.
func (*GSheets) GetSpreadsheet ¶
func (g *GSheets) GetSpreadsheet(id string) (*sheets.Spreadsheet, error)
Get a spreadsheet given its id string.
func (*GSheets) MakeFileDomainReadable ¶
func (g *GSheets) MakeFileDomainReadable(id string) (*drive.Permission, error)
Make the spreadsheet (or any file really) readable by people in the organization (domain) who have a link.
func (*GSheets) PrependSheet ¶
func (g *GSheets) PrependSheet(id, title string) (*sheets.BatchUpdateSpreadsheetResponse, error)
Prepend a sheet (tab) to spreadsheet.