gcal

package
v0.0.0-...-7072be7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package gcal handles Google Calendar integration.

Index

Constants

View Source
const (
	UserAgent  = "github.com/spinnaker/rotation-scheduler"
	DateFormat = "2006-01-02"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GCal

type GCal struct {
	CalendarID string
	// contains filtered or unexported fields
}

GCal wraps the Google Calendar service.

func NewGCal

func NewGCal(calendarID string, client *http.Client) (*GCal, error)

NewGCal wraps the calendar specified using the client. CalendarID should be a user's primary calendar (not a shared, calendar), because the Clear() method only works on primary calendars.

func (*GCal) Schedule

func (g *GCal) Schedule(sched *schedule.Schedule) error

Clears all events on the calendar and replaces them with events from Schedule sched.

Jump to

Keyboard shortcuts

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