googleservice

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contact added in v0.2.0

type Contact struct {
	Name string
}

type GCalendarAPI added in v0.1.5

type GCalendarAPI struct {
	// contains filtered or unexported fields
}

func NewGoogleCalendarAPI

func NewGoogleCalendarAPI(credentialsPath, calendarEmail string) (*GCalendarAPI, error)

func (GCalendarAPI) ClearAllEvents added in v0.1.5

func (gcalAPI GCalendarAPI) ClearAllEvents(eventIDs []string) error

func (GCalendarAPI) CreateEvent added in v0.1.5

func (gcalAPI GCalendarAPI) CreateEvent(contact, startTime, endTime, recurrence string) (string, error)

func (GCalendarAPI) CreateEvents added in v0.1.5

func (gcalAPI GCalendarAPI) CreateEvents(
	groupContacts []Contact,
	slotStartTime,
	slotEndTime,
	eventRecurrence string) ([]string, error)

type GCalendarAPIInterface added in v0.1.5

type GCalendarAPIInterface interface {
	// CreateEvents creates google calendar events for the given contacts and returns the eventIDs and error(if any)
	CreateEvents(
		groupContacts []Contact,
		slotStartTime,
		slotEndTime,
		eventRecurrence string) ([]string, error)

	// CreateEvent creates a google calendar event and returns the event ID
	CreateEvent(contact, startTime, endTime, recurrence string) (string, error)

	// ClearAllEvents deletes all google calendar events for eventIDs
	ClearAllEvents(eventIDs []string) error
}

type GCalendarAPIStub added in v0.1.5

type GCalendarAPIStub struct {
	CreatedEventsID     []string
	CreatedEventID      string
	CreatedEventsError  error
	CreatedEventError   error
	ClearAllEventsError error
}

func (GCalendarAPIStub) ClearAllEvents added in v0.1.5

func (gcalAPI GCalendarAPIStub) ClearAllEvents(eventIDs []string) error

func (GCalendarAPIStub) CreateEvent added in v0.1.5

func (gcalAPI GCalendarAPIStub) CreateEvent(contact, startTime, endTime, recurrence string) (string, error)

func (GCalendarAPIStub) CreateEvents added in v0.1.5

func (gcalAPI GCalendarAPIStub) CreateEvents(
	groupContacts []Contact,
	slotStartTime,
	slotEndTime,
	eventRecurrence string) ([]string, error)

Jump to

Keyboard shortcuts

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