googleapi

package
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: MIT Imports: 12 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 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
}

type GoogleClient added in v0.0.38

type GoogleClient struct {
	Context context.Context
	Config  *oauth2.Config
	Token   *oauth2.Token
}

func New added in v0.0.38

func New(ctx context.Context, googleClientSecretFilePath string, accessToken string, refreshToken string, scopes []string) (*GoogleClient, error)

func (*GoogleClient) GetToken added in v0.0.38

func (client *GoogleClient) GetToken() (*oauth2.Token, error)

func (*GoogleClient) NewHttpClient added in v0.0.38

func (client *GoogleClient) NewHttpClient() *http.Client

Jump to

Keyboard shortcuts

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