sheetsutil

package
v0.0.0-...-f2600a7 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TargetSheetId = "1jlQE7BQUYdImdn5sB8e1fohpPtMiOWKlH2euITlvZR8"

Functions

func CreateHeaderRowInSheet

func CreateHeaderRowInSheet(sheetsService *sheets.Service, sheetName, sheetId string) error

Create a header row in the sheet.

func CreateNewSheet

func CreateNewSheet(sheetId, sheetName string, sheetsService *sheets.Service)

Create a new sheet named sheetName in the sheetId sheet.

func GetClient

func GetClient(config *oauth2.Config) *http.Client

Retrieve a token, saves the token, then returns the generated client.

func GetHeaderRow

func GetHeaderRow() []interface{}

Create a Header Row data to be added to the sheet. Note that it should return []interface{}.

func GetOauthConfig

func GetOauthConfig(path string) *oauth2.Config

func GetService

func GetService(credentialsJsonPath string) (*sheets.Service, error)

Get Spreadsheet API Service.

func GetSheetNamesSet

func GetSheetNamesSet(srv *sheets.Service, sheetId string) map[string]bool

Get all sheet names given the sheet id.

func SaveToken

func SaveToken(path string, token *oauth2.Token)

Saves a token to a file path.

func Serialize

func Serialize(buf []slack.Message) [][]interface{}

Serializes to [][]interface{} so it can be sent over the network.

func TokenFromFile

func TokenFromFile(file string) (*oauth2.Token, error)

Retrieves a token from a local file.

func TokenFromWeb

func TokenFromWeb(config *oauth2.Config) *oauth2.Token

Request a token from the web, then returns the retrieved token.

Types

This section is empty.

Jump to

Keyboard shortcuts

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