Documentation
¶
Index ¶
Constants ¶
View Source
const ( ColFileID = iota ColName ColFolderPath ColMimeType ColWebViewLink ColModifiedTime ColContents ColBrief ColCategory ColTags ColReorganizePath ColSyncedAt ColCount )
Column indices for Google Sheets.
View Source
const MaxCellLength = 50000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pusher ¶
type Pusher struct {
// contains filtered or unexported fields
}
Pusher handles pushing data to Google Sheets.
func NewPusher ¶
func NewPusher(client SheetsClient, sheetID string) *Pusher
NewPusher creates a new Pusher instance.
func (*Pusher) EnsureHeaders ¶
EnsureHeaders ensures that the sheet has the correct headers.
func (*Pusher) FetchEnrichment ¶
FetchEnrichment fetches all rows from the sheet to get enrichment data.
type SheetRow ¶
type SheetRow struct {
FileID string
Name string
FolderPath string
MimeType string
WebViewLink string
ModifiedTime string
Contents string
Brief string
Category string
Tags string
ReorganizePath string
SyncedAt string
}
SheetRow represents a row in the Google Sheets index.
func FromValues ¶
FromValues populates a SheetRow from a slice of strings.
type SheetsClient ¶
type SheetsClient interface {
SheetsGetValues(ctx context.Context, sheetID string, cellRange string) ([][]string, error)
SheetsUpdate(ctx context.Context, sheetID string, cellRange string, values [][]string) error
SheetsAppend(ctx context.Context, sheetID string, cellRange string, values [][]string) error
}
SheetsClient defines the interface for Google Sheets operations.
Click to show internal directories.
Click to hide internal directories.