amigo

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: MIT Imports: 13 Imported by: 2

README

amigo

Friendly util functions for go projects

For Google apis, expect to have token.json and credentials.json in the directory where you use these apis.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToSheet added in v0.1.2

func AppendToSheet(sheetsId string, values []interface{}) error

Appends to first sheet of the spreadsheet sheetsService *sheets.Service,

func CallHttpGetEndpoint

func CallHttpGetEndpoint(apiEndpoint string, responseObject interface{}) error

CallHttpGetEndpoint calls a given apiEndpoint and deserializes the response to user provided responseObject

func GetAllSheetData added in v0.1.2

func GetAllSheetData(sheetsId string) ([][]interface{}, error)

func GetOrCreateSheetsService added in v0.1.3

func GetOrCreateSheetsService() *sheets.Service

func GetRHMobileStockQuoteUrl

func GetRHMobileStockQuoteUrl(stock string) string

func GetRHWebStockQuoteUrl

func GetRHWebStockQuoteUrl(stock string) string

func Sanitize

func Sanitize(input string) string

Strips html tags, replace common entities, and escapes <>&;'" in the result.

func SendSlackNotification

func SendSlackNotification(msg string, channel string) error

SendSlackNotification sends message to specified channel using webhookUrl Prereq: - Install "Incoming webhooks" app to your slack workplace - Provide the webhook url as environment variable

Types

This section is empty.

Jump to

Keyboard shortcuts

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