Documentation ¶
Index ¶
- func AddPermission(svc *drive.Service, docId string, email string, role string) (string, error)
- func CopyDoc(svcDrive *drive.Service, svcDocs *docs.Service, templateDocId string, ...) (string, error)
- func DefaultClient(dir string, scopes ...string) (*http.Client, error)
- func FindParentFolderId(svc *drive.Service, configDocId string) (string, error)
- func GetFolderId(svc *drive.Service, configDocId string, p string) (string, error)
- func NewClient(dir string, config *oauth2.Config) *http.Client
- func RevokePermission(svc *drive.Service, docId string, email string) error
- type Predicate
- type SheetReader
- func NewColumnReader(srv *sheets.Service, spreadsheetId, sheetName, header string) (*SheetReader, error)
- func NewLastRowReader(srv *sheets.Service, spreadsheetId, sheetName string) (*SheetReader, error)
- func NewReader(srv *sheets.Service, spreadsheetId, sheetName string, rowStart int) (*SheetReader, error)
- func NewRowReader(srv *sheets.Service, spreadsheetId, sheetName string, predicate *Predicate) (*SheetReader, error)
- type SheetWriter
- type Spreadsheet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPermission ¶ added in v0.0.4
func FindParentFolderId ¶ added in v0.0.4
func GetFolderId ¶ added in v0.0.4
func RevokePermission ¶ added in v0.0.4
Types ¶
type SheetReader ¶
type SheetReader struct { ValueRenderOption string DateTimeRenderOption string // contains filtered or unexported fields }
func NewColumnReader ¶
func NewColumnReader(srv *sheets.Service, spreadsheetId, sheetName, header string) (*SheetReader, error)
func NewLastRowReader ¶
func NewLastRowReader(srv *sheets.Service, spreadsheetId, sheetName string) (*SheetReader, error)
func NewReader ¶
func NewReader(srv *sheets.Service, spreadsheetId, sheetName string, rowStart int) (*SheetReader, error)
func NewRowReader ¶
func NewRowReader(srv *sheets.Service, spreadsheetId, sheetName string, predicate *Predicate) (*SheetReader, error)
func (*SheetReader) Read ¶
func (r *SheetReader) Read() (record []string, err error)
Read reads one record (a slice of fields) from r. If the record has an unexpected number of fields, Read returns the record along with the error ErrFieldCount. Except for that case, Read always returns either a non-nil record or a non-nil error, but not both. If there is no data left to be read, Read returns nil, io.EOF. If ReuseRecord is true, the returned slice may be shared between multiple calls to Read.
func (*SheetReader) ReadAll ¶
func (r *SheetReader) ReadAll() (records [][]string, err error)
ReadAll reads all the remaining records from r. Each record is a slice of fields. A successful call returns err == nil, not err == io.EOF. Because ReadAll is defined to read until EOF, it does not treat end of file as an error to be reported.
type SheetWriter ¶
type SheetWriter struct { ValueRenderOption string DateTimeRenderOption string // contains filtered or unexported fields }
func NewRowWriter ¶
func NewRowWriter(srv *sheets.Service, spreadsheetId, sheetName string, predicate *Predicate) *SheetWriter
func NewWriter ¶
func NewWriter(srv *sheets.Service, spreadsheetId, sheetName string) *SheetWriter
func (*SheetWriter) Error ¶
func (w *SheetWriter) Error() error
func (*SheetWriter) Flush ¶
func (w *SheetWriter) Flush()
func (*SheetWriter) Write ¶
func (w *SheetWriter) Write(row []string) error
type Spreadsheet ¶
type Spreadsheet struct { SpreadSheetId string // contains filtered or unexported fields }
func NewSpreadsheet ¶
func NewSpreadsheet(srv *sheets.Service, spreadsheetId string) (*Spreadsheet, error)
func (*Spreadsheet) AppendRowData ¶
func (si *Spreadsheet) AppendRowData(sheetId int64, data []string, formatCell bool) error
ref: https://developers.google.com/sheets/api/guides/batchupdate
func (*Spreadsheet) EnsureSheet ¶
func (si *Spreadsheet) EnsureSheet(name string, headers []string) (int64, error)
func (*Spreadsheet) FindEmptyCell ¶
func (si *Spreadsheet) FindEmptyCell(sheetName string) (string, error)