Documentation
¶
Overview ¶
Google API integration
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SheetsConfig ¶
type SheetsConfig struct { CredentialsFile string `env:"GOOGLE_APPLICATION_CREDENTIALS"` // (mandatory) path to service json file (https://cloud.google.com/docs/authentication/production#creating_a_service_account) SheetId string `env:"GOOGLE_SHEET_ID"` // default spreadsheet id }
Google spread sheets config.
Don't forget to share your spreadsheet with service account email
func DefaultSheets ¶
func DefaultSheets() *SheetsConfig
Creates default sheets config
GOOGLE_APPLICATION_CREDENTIALS - (mandatory) path to service json file (https://cloud.google.com/docs/authentication/production#creating_a_service_account)
func (SheetsConfig) AppendRow ¶
func (cfg SheetsConfig) AppendRow(values ...interface{}) error
Append values as row to first empty row to default sheet
func (SheetsConfig) AppendRowContext ¶
func (cfg SheetsConfig) AppendRowContext(ctx context.Context, values ...interface{}) error
Append values as row to first empty row to default sheet
func (SheetsConfig) AppendRowToContext ¶
func (cfg SheetsConfig) AppendRowToContext(ctx context.Context, sheetID, appendRange string, values ...interface{}) error
Append row to google spread sheets
Click to show internal directories.
Click to hide internal directories.