Documentation
¶
Index ¶
- Constants
- Variables
- type APIError
- type Address
- type Attendee
- type AttendeeAvailability
- type AvailabilityView
- type Calendar
- type Client
- type Coordinates
- type DateTime
- type EmailAddress
- type Event
- type EventResponseStatus
- 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 TimeConstraint
- type TimeSlot
- type User
- type ViewCalendarParams
- type ViewCalendarResponse
- type WorkingHours
Constants ¶
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" )
View Source
const RFC3339NanoNoTimezone = "2006-01-02T15:04:05.999999999"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Attendee ¶
type Attendee struct { Status *EventResponseStatus `json:"status,omitempty"` EmailAddress *EmailAddress `json:"emailAddress,omitempty"` Type string `json:"type,omitempty"` }
type AttendeeAvailability ¶
type AvailabilityView ¶
type AvailabilityView string
type Client ¶
type Client interface { AcceptEvent(remoteUserID, eventID string) error CallFormPost(method, path string, in url.Values, out interface{}) (responseData []byte, err error) CallJSON(method, path string, in, out interface{}) (responseData []byte, err error) CreateCalendar(remoteUserID string, calendar *Calendar) (*Calendar, error) CreateEvent(remoteUserID string, calendarEvent *Event) (*Event, error) CreateMySubscription(notificationURL string) (*Subscription, error) DeclineEvent(remoteUserID, eventID string) error DeleteCalendar(remoteUserID, calendarID string) error DeleteSubscription(subscriptionID string) error FindMeetingTimes(remoteUserID string, meetingParams *FindMeetingTimesParameters) (*MeetingTimeSuggestionResults, error) GetCalendars(remoteUserID string) ([]*Calendar, error) GetDefaultCalendarView(remoteUserID string, startTime, endTime time.Time) ([]*Event, error) DoBatchViewCalendarRequests([]*ViewCalendarParams) ([]*ViewCalendarResponse, error) GetEvent(remoteUserID, eventID string) (*Event, error) GetMailboxSettings(remoteUserID string) (*MailboxSettings, error) GetMe() (*User, error) GetNotificationData(*Notification) (*Notification, error) GetSchedule(requests []*ScheduleUserInfo, startTime, endTime *DateTime, availabilityViewInterval int) ([]*ScheduleInformation, error) ListSubscriptions() ([]*Subscription, error) RenewSubscription(subscriptionID string) (*Subscription, error) TentativelyAcceptEvent(remoteUserID, eventID string) error GetSuperuserToken() (string, error) }
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"` 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"` }
type EventResponseStatus ¶
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"` 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 TimeConstraint ¶
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.