google

package
v0.0.0-...-b12c321 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

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