googleapi

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: MIT Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSheet

func CreateSheet(service *sheets.Service, document *sheets.Spreadsheet, sheetNo int, sheetName string, rows [][]interface{}, columns []string) (int64, error)

func CreateSpreadSheet

func CreateSpreadSheet(srv *sheets.Service, documentName string) (*sheets.Spreadsheet, error)

func GetCoordinatesFromStreetAddress

func GetCoordinatesFromStreetAddress(client *maps.Client, address string) (longitude float64, latitude float64, throwErr error)

func NewHttpClient

func NewHttpClient(secretFilePath string, tokenFilename string, scopes []string, port int) (*http.Client, error)

NewHttpClient returns an authenticated HTTP client which can be used by google API clients/services

func NewMapClient

func NewMapClient(apiKey string) (*maps.Client, error)

func NewSpreadsheetService

func NewSpreadsheetService(client *http.Client) (*sheets.Service, error)

func UpdateColumnHeaders

func UpdateColumnHeaders(service *sheets.Service, document *sheets.Spreadsheet, sheetName string, columns []string) error

func UpdateColumnStyles

func UpdateColumnStyles(service *sheets.Service, document *sheets.Spreadsheet, sheetId int64, columns []ColumnFormatConfig) error

func UpdateRows

func UpdateRows(service *sheets.Service, document *sheets.Spreadsheet, sheetName string, rows [][]interface{}) error

Types

type ColumnFormatConfig

type ColumnFormatConfig interface {
	ColumnIndex() int
	ColumnDataType() string
	ColumnFormat() string
}

Jump to

Keyboard shortcuts

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