Documentation ¶
Index ¶
- Constants
- Variables
- type APIError
- type Address
- type Attendee
- type AttendeeAvailability
- type AvailabilityView
- type Calendar
- type Calendars
- type Client
- type Conference
- type Coordinates
- type Core
- type DateTime
- type EmailAddress
- type Event
- type EventResponseStatus
- type Events
- type FindMeetingTimesParameters
- type ItemBody
- type Location
- type LocationConstraint
- type LocationConstraintItem
- type MailboxSettings
- type MeetingTimeSuggestion
- type MeetingTimeSuggestionResults
- type Notification
- type Remote
- type ScheduleInformation
- type ScheduleInformationError
- type ScheduleItem
- type ScheduleUserInfo
- type Subscription
- type Subscriptions
- type TimeConstraint
- type TimeSlot
- type Unsupported
- type User
- type Utils
- type ViewCalendarParams
- type ViewCalendarResponse
- type WorkingHours
Constants ¶
View Source
const ( RFC3339NanoNoTimezone = "2006-01-02T15:04:05.999999999" UndefinedDatetime = "n/a" )
View Source
const ( EventResponseStatusNotAnswered = "not_answered" EventResponseStatusAccepted = "accepted" EventResponseStatusTentative = "tentative" EventResponseStatusDeclined = "declined" )
View Source
const ( AvailabilityViewFree = '0' AvailabilityViewTentative = '1' AvailabilityViewBusy = '2' AvailabilityViewOutOfOffice = '3' AvailabilityViewWorkingElsewhere = '4' ScheduleStatusFree = "free" ScheduleStatusTentative = "tentative" ScheduleStatusBusy = "busy" ScheduleStatusOof = "oof" ScheduleStatusWorkingElsewhere = "workingElsewhere" ScheduleStatusUnknown = "unknown" )
Variables ¶
View Source
var ( ErrSuperUserClientNotSupported = errors.New("superuser client is not supported") ErrNotImplemented = errors.New("not implemented") )
Functions ¶
This section is empty.
Types ¶
type Attendee ¶
type Attendee struct { RemoteID string `json:"remoteId,omitempty"` Status *EventResponseStatus `json:"status,omitempty"` EmailAddress *EmailAddress `json:"emailAddress,omitempty"` Type string `json:"type,omitempty"` }
type AttendeeAvailability ¶
type AvailabilityView ¶
type AvailabilityView string
type Calendars ¶
type Calendars interface { GetEvent(remoteUserID, eventID string) (*Event, error) GetCalendars(remoteUserID string) ([]*Calendar, error) GetDefaultCalendarView(remoteUserID string, startTime, endTime time.Time) ([]*Event, error) DoBatchViewCalendarRequests([]*ViewCalendarParams) ([]*ViewCalendarResponse, error) GetMailboxSettings(remoteUserID string) (*MailboxSettings, error) }
type Client ¶
type Client interface { Core Calendars Events Subscriptions Utils Unsupported }
type Conference ¶
type Coordinates ¶
type DateTime ¶
type DateTime struct { DateTime string `json:"dateTime"` TimeZone string `json:"timeZone,omitempty"` }
func NewDateTime ¶
NewDateTime creates a DateTime that is compatible with Microsoft's API.
func (DateTime) PrettyString ¶
type EmailAddress ¶
type Event ¶
type Event struct { Start *DateTime `json:"start,omitempty"` Location *Location `json:"location,omitempty"` Conference *Conference `json:"conference,omitempty"` End *DateTime `json:"end,omitempty"` Organizer *Attendee `json:"organizer,omitempty"` Body *ItemBody `json:"Body,omitempty"` ResponseStatus *EventResponseStatus `json:"responseStatus,omitempty"` Importance string `json:"importance,omitempty"` ICalUID string `json:"iCalUId,omitempty"` Subject string `json:"subject,omitempty"` BodyPreview string `json:"bodyPreview,omitempty"` ShowAs string `json:"showAs,omitempty"` Weblink string `json:"weblink,omitempty"` ID string `json:"id,omitempty"` Attendees []*Attendee `json:"attendees,omitempty"` ReminderMinutesBeforeStart int `json:"reminderMinutesBeforeStart,omitempty"` IsOrganizer bool `json:"isOrganizer,omitempty"` IsCancelled bool `json:"isCancelled,omitempty"` IsAllDay bool `json:"isAllDay,omitempty"` ResponseRequested bool `json:"responseRequested,omitempty"` }
REVIEW: we should vet exactly what fields are used from the remote package, and get rid of any "dead fields" from these structs
type EventResponseStatus ¶
type Events ¶
type Events interface { CreateEvent(remoteUserID string, calendarEvent *Event) (*Event, error) AcceptEvent(remoteUserID, eventID string) error DeclineEvent(remoteUserID, eventID string) error TentativelyAcceptEvent(remoteUserID, eventID string) error GetEventsBetweenDates(remoteUserID string, start, end time.Time) ([]*Event, error) }
type FindMeetingTimesParameters ¶
type FindMeetingTimesParameters struct { ReturnSuggestionReasons *bool `json:"returnSuggestionReasons,omitempty"` LocationConstraint *LocationConstraint `json:"locationConstraint,omitempty"` TimeConstraint *TimeConstraint `json:"timeConstraint,omitempty"` MeetingDuration *time.Duration `json:"meetingDuration,omitempty"` MaxCandidates *int `json:"maxCandidates,omitempty"` IsOrganizerOptional *bool `json:"isOrganizerOptional,omitempty"` MinimumAttendeePercentage *float64 `json:"minimumAttendeePercentage,omitempty"` Attendees []Attendee `json:"attendees,omitempty"` }
type Location ¶
type Location struct { DisplayName string `json:"displayName,omitempty"` Address *Address `json:"address"` Coordinates *Coordinates `json:"coordinates"` LocationType string `json:"locationType"` }
type LocationConstraint ¶
type LocationConstraint struct { IsRequired *bool `json:"isRequired,omitempty"` SuggestLocation *bool `json:"suggestLocation,omitempty"` Locations []LocationConstraintItem `json:"locations,omitempty"` }
type LocationConstraintItem ¶
type MailboxSettings ¶
type MailboxSettings struct { TimeZone string `json:"timeZone"` WorkingHours WorkingHours `json:"workingHours"` }
type MeetingTimeSuggestion ¶
type MeetingTimeSuggestion struct { MeetingTimeSlot *TimeSlot SuggestionReason string `json:"suggestionReason"` OrganizerAvailability string `json:"organizerAvailability"` Locations []*Location AttendeeAvailability []*AttendeeAvailability Confidence float32 `json:"confidence"` Order int32 `json:"order"` }
type MeetingTimeSuggestionResults ¶
type MeetingTimeSuggestionResults struct { EmptySuggestionReason string `json:"emptySuggestionReason"` MeetingTimeSuggestions []*MeetingTimeSuggestion `json:"meetingTimeSuggestions"` }
type Notification ¶
type Notification struct { Webhook interface{} // Notification data Subscription *Subscription SubscriptionCreator *User Event *Event // ClientState from the webhook. The handler is to validate against its own // persistent secret. ClientState string // Notification type ChangeType string // The (remote) subscription ID the notification is for SubscriptionID string // Remote-specific data: full raw JSON of the webhook, and the decoded // backend-specific struct. WebhookRawData []byte // Set if subscription renewal is recommended. The date/time logic is // internal to the remote implementation. The handler is to call // RenewSubscription() as applicable, with the appropriate user credentials. RecommendRenew bool // Set if there is no data pre-filled from processing the webhook. The // handler is to call GetNofiticationData(), with the appropriate user // credentials. IsBare bool }
type ScheduleInformation ¶
type ScheduleInformation struct { // Email of user ScheduleID string `json:"scheduleId,omitempty"` // 0= free, 1= tentative, 2= busy, 3= out of office, 4= working elsewhere. // example "0010", which means free for first and second block, tentative for third, and free for fourth AvailabilityView AvailabilityView `json:"availabilityView,omitempty"` Error *ScheduleInformationError `json:"error"` ScheduleItems []*ScheduleItem `json:"scheduleItems,omitempty"` }
ScheduleInformation undocumented
type ScheduleItem ¶
type ScheduleUserInfo ¶
type Subscription ¶
type Subscription struct { ID string `json:"id"` ResourceID string `json:"resourceId,omitempty"` Resource string `json:"resource,omitempty"` ApplicationID string `json:"applicationId,omitempty"` ChangeType string `json:"changeType,omitempty"` ClientState string `json:"clientState,omitempty"` NotificationURL string `json:"notificationUrl,omitempty"` ExpirationDateTime string `json:"expirationDateTime,omitempty"` CreatorID string `json:"creatorId,omitempty"` }
type Subscriptions ¶
type Subscriptions interface { CreateMySubscription(notificationURL, remoteUserID string) (*Subscription, error) DeleteSubscription(sub *Subscription) error GetNotificationData(*Notification) (*Notification, error) ListSubscriptions() ([]*Subscription, error) RenewSubscription(notificationURL, remoteUserID string, sub *Subscription) (*Subscription, error) }
type TimeConstraint ¶
type Unsupported ¶
type Unsupported interface { CreateCalendar(remoteUserID string, calendar *Calendar) (*Calendar, error) DeleteCalendar(remoteUserID, calendarID string) error FindMeetingTimes(remoteUserID string, meetingParams *FindMeetingTimesParameters) (*MeetingTimeSuggestionResults, error) }
type ViewCalendarParams ¶
type ViewCalendarResponse ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_remote is a generated GoMock package.
|
Package mock_remote is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.