Documentation ¶
Index ¶
- func CacheGCalToken(ctx context.Context, state, gcalAuthCode string) error
- func GetBusyCalendar(ctx context.Context, t0 time.Time, telegramUserID string) (cal []*calendar.TimePeriod, err error)
- func GetNextThreeEvenings(t time.Time, c []*calendar.TimePeriod) (free []time.Time, err error)
- func IsAuthenticated(telegramUserID string) bool
- func StartAuthFlow(telegramUserID string, baseURL *url.URL) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheGCalToken ¶
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 ¶
GetNextThreeEvenings gets a freebusy calendar and a timezone and return the next three free evenings
func IsAuthenticated ¶
IsAuthenticated checks whether a valid oauth token is available for the given Telegram user ID
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.