calendar

package
v0.0.0-...-3a5b9a4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchToken

func FetchToken(jsonKey []byte) (*oauth2.Token, error)

FetchToken reaches out to Google OAuth with the clients credentials to get a valid token Interactive user action is required here

Types

type ByStart

type ByStart []TimedEvent

func (ByStart) Len

func (a ByStart) Len() int

func (ByStart) Less

func (a ByStart) Less(i, j int) bool

func (ByStart) Swap

func (a ByStart) Swap(i, j int)

type Event

type Event struct {
	Calendar string
	Summary  string
}

type NextEvents

type NextEvents struct {
	TodayEvents          *[]TimedEvent
	TomorrowEvents       *[]TimedEvent
	TomorrowAllDayEvents *[]Event
}

func GetNextEvents

func GetNextEvents(oauthToken *oauth2.Token, jsonKey []byte, todayCalendarNames []string, allDayCalendarNames []string) (*NextEvents, error)

CloseEvent fetches the events from today (or tomorrow if none are there for today)

type TimedEvent

type TimedEvent struct {
	Start *time.Time
	End   *time.Time

	Event
}

A calendar event happening today or tomorrow

Jump to

Keyboard shortcuts

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