calcheck

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheGCalToken

func CacheGCalToken(ctx context.Context, state, gcalAuthCode string) error

CacheGCalToken exchanges an auth code for an access token and stores it together with the Telegram user ID

func GetBusyCalendar

func GetBusyCalendar(ctx context.Context, t0 time.Time, telegramUserID string) (cal []*calendar.TimePeriod, err error)

GetBusyCalendar retrieves a list of busy slots in the next seven days starting at t0.

func GetNextThreeEvenings

func GetNextThreeEvenings(t time.Time, c []*calendar.TimePeriod) (free []time.Time, err error)

GetNextThreeEvenings gets a freebusy calendar and a timezone and return the next three free evenings

func IsAuthenticated

func IsAuthenticated(telegramUserID string) bool

IsAuthenticated checks whether a valid oauth token is available for the given Telegram user ID

func StartAuthFlow

func StartAuthFlow(telegramUserID string, baseURL *url.URL) (string, error)

StartAuthFlow returns an oauth URL with a CSRF token and the Telegram user ID

Types

This section is empty.

Jump to

Keyboard shortcuts

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