Documentation
¶
Overview ¶
Package calendar implements the JMAP Calendars protocol (draft-ietf-jmap-calendars-26), providing Calendar, Event, and ParticipantIdentity data types and methods.
Index ¶
- func Register()
- type Alert
- type AlertTrigger
- type Calendar
- type CalendarsCapability
- type Changes
- type ChangesResponse
- type Event
- type EventChanges
- type EventChangesResponse
- type EventCopy
- type EventCopyResponse
- type EventFilter
- type EventGet
- type EventGetResponse
- type EventQuery
- type EventQueryChanges
- type EventQueryChangesResponse
- type EventQueryResponse
- type EventSet
- type EventSetResponse
- type EventSort
- type Get
- type GetResponse
- type Link
- type Location
- type NDay
- type Participant
- type ParticipantIdentity
- type ParticipantIdentityChanges
- type ParticipantIdentityChangesResponse
- type ParticipantIdentityGet
- type ParticipantIdentityGetResponse
- type ParticipantIdentitySet
- type ParticipantIdentitySetResponse
- type RecurrenceRule
- type Relation
- type Set
- type SetResponse
- type ShareRights
- type VirtualLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Alert ¶
type Alert struct {
// Trigger defines when the alert fires.
Trigger *AlertTrigger `json:"trigger,omitempty"`
// Action is the alert action: "display" or "email".
Action string `json:"action"`
// RelatedTo maps alert IDs to Relation objects.
RelatedTo map[string]*Relation `json:"relatedTo,omitempty"`
// Acknowledged is the date-time this alert was acknowledged (UTC).
Acknowledged *string `json:"acknowledged,omitempty"`
}
Alert represents an alert/reminder for a calendar event (draft-ietf-calext-jscalendarbis-15 Section 4.7.1).
type AlertTrigger ¶
type AlertTrigger struct {
// Type is the trigger type: "OffsetTrigger" or "AbsoluteTrigger".
Type string `json:"@type"`
// Offset is the duration offset from the event start or end.
// Used when Type is "OffsetTrigger".
Offset *string `json:"offset,omitempty"`
// RelativeTo indicates what the offset is relative to:
// "start" or "end". Used when Type is "OffsetTrigger".
RelativeTo *string `json:"relativeTo,omitempty"`
// When is the absolute date-time for the trigger.
// Used when Type is "AbsoluteTrigger".
When *string `json:"when,omitempty"`
}
AlertTrigger defines when an alert fires (draft-ietf-calext-jscalendarbis-15 Section 4.7.2).
type Calendar ¶
type Calendar struct {
// ID is the server-assigned identifier for this calendar.
ID jmap.ID `json:"id,omitempty"`
// Name is the display name of the calendar.
Name string `json:"name"`
// Description is an optional longer description of the calendar.
Description *string `json:"description,omitempty"`
// Color is a CSS color value for the calendar.
Color *string `json:"color,omitempty"`
// SortOrder determines the display order of the calendar.
SortOrder uint32 `json:"sortOrder,omitempty"`
// IsDefault indicates whether this is the default calendar.
IsDefault bool `json:"isDefault,omitempty"`
// IsSubscribed indicates whether the user has subscribed to this calendar.
IsSubscribed bool `json:"isSubscribed,omitempty"`
// IncludeInAvailability controls free/busy inclusion:
// "all", "attending", or "none".
IncludeInAvailability *string `json:"includeInAvailability,omitempty"`
// DefaultAlertsWithTime maps alert IDs to Alert objects for
// timed events.
DefaultAlertsWithTime map[string]*Alert `json:"defaultAlertsWithTime,omitempty"`
// DefaultAlertsWithoutTime maps alert IDs to Alert objects for
// all-day events.
DefaultAlertsWithoutTime map[string]*Alert `json:"defaultAlertsWithoutTime,omitempty"`
// TimeZone is the IANA time zone identifier for this calendar.
TimeZone *string `json:"timeZone,omitempty"`
ShareWith map[jmap.ID]*ShareRights `json:"shareWith,omitempty"`
// MyRights is the current user's rights on this calendar.
MyRights *ShareRights `json:"myRights,omitempty"`
}
Calendar represents a JMAP Calendar object (draft-ietf-jmap-calendars-26 Section 3).
type CalendarsCapability ¶
type CalendarsCapability struct {
// MaxCalendarsPerEvent is the maximum number of calendars an event
// may belong to. 0 means no limit.
MaxCalendarsPerEvent uint64 `json:"maxCalendarsPerEvent,omitempty"`
// MinDateTime is the earliest date-time the server supports.
MinDateTime *string `json:"minDateTime,omitempty"`
// MaxDateTime is the latest date-time the server supports.
MaxDateTime *string `json:"maxDateTime,omitempty"`
// MaxExpandedQueryDuration is the maximum duration for expanded queries.
MaxExpandedQueryDuration *string `json:"maxExpandedQueryDuration,omitempty"`
// MaxParticipantsPerEvent is the maximum number of participants per event.
MaxParticipantsPerEvent *uint64 `json:"maxParticipantsPerEvent,omitempty"`
// MayCreateCalendar indicates whether the user may create calendars.
MayCreateCalendar bool `json:"mayCreateCalendar,omitempty"`
}
CalendarsCapability represents the urn:ietf:params:jmap:calendars capability (draft-ietf-jmap-calendars-26 Section 2).
func (*CalendarsCapability) New ¶
func (c *CalendarsCapability) New() jmap.Capability
New implements jmap.Capability.
func (*CalendarsCapability) URI ¶
func (c *CalendarsCapability) URI() jmap.URI
URI implements jmap.Capability.
type Changes ¶
type Changes struct {
// AccountID is the account to query.
AccountID jmap.ID `json:"accountId"`
// SinceState is the state to compare against.
SinceState string `json:"sinceState"`
// MaxChanges is the maximum number of changes to return.
MaxChanges *uint64 `json:"maxChanges,omitempty"`
}
Changes retrieves changes to Calendars since a given state (draft-ietf-jmap-calendars-26 Section 3.2).
type ChangesResponse ¶
type ChangesResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// OldState is the state before the changes.
OldState string `json:"oldState"`
// NewState is the state after the changes.
NewState string `json:"newState"`
// HasMoreChanges indicates whether there are more changes available.
HasMoreChanges bool `json:"hasMoreChanges"`
// Created contains IDs of Calendars that were created.
Created []jmap.ID `json:"created"`
// Updated contains IDs of Calendars that were updated.
Updated []jmap.ID `json:"updated"`
// Destroyed contains IDs of Calendars that were destroyed.
Destroyed []jmap.ID `json:"destroyed"`
}
ChangesResponse is the response to Calendar/changes.
func (*ChangesResponse) Name ¶
func (r *ChangesResponse) Name() string
Name implements jmap.MethodResponse.
type Event ¶
type Event struct {
// ID is the server-assigned identifier for this event.
ID jmap.ID `json:"id,omitempty"`
// CalendarIDs maps calendar IDs to boolean true for each calendar
// this event belongs to.
CalendarIDs map[jmap.ID]bool `json:"calendarIds,omitempty"`
// UID is the globally unique identifier for this event (iCalendar UID).
UID string `json:"uid,omitempty"`
// Type is the JSCalendar object type: "Event" or "Task".
Type string `json:"@type,omitempty"`
// Updated is the date-time this event was last updated (UTC).
Updated *string `json:"updated,omitempty"`
// Created is the date-time this event was created (UTC).
Created *string `json:"created,omitempty"`
// Title is the summary/title of the event.
Title *string `json:"title,omitempty"`
// Description is the free-text description of the event.
Description *string `json:"description,omitempty"`
// DescriptionContentType is the MIME type of the description.
DescriptionContentType *string `json:"descriptionContentType,omitempty"`
// Start is the date-time the event starts, e.g. "2024-01-15T10:00:00".
Start *string `json:"start,omitempty"`
// TimeZone is the IANA time zone for the start property.
TimeZone *string `json:"timeZone,omitempty"`
// Duration is the length of the event, e.g. "PT1H".
Duration *string `json:"duration,omitempty"`
// ShowWithoutTime indicates the event should be displayed as all-day.
ShowWithoutTime bool `json:"showWithoutTime,omitempty"`
// Status is the event status: "confirmed", "tentative", or "cancelled".
Status *string `json:"status,omitempty"`
// FreeBusyStatus controls how this event affects free/busy.
FreeBusyStatus *string `json:"freeBusyStatus,omitempty"`
// Priority is the event priority (0-9, 0 = undefined).
Priority *int `json:"priority,omitempty"`
// Privacy is the privacy level: "public", "private", or "secret".
Privacy *string `json:"privacy,omitempty"`
// Sequence is the revision sequence number.
Sequence *uint64 `json:"sequence,omitempty"`
// Locations maps location IDs to Location objects.
Locations map[string]*Location `json:"locations,omitempty"`
// VirtualLocations maps virtual location IDs to VirtualLocation objects.
VirtualLocations map[string]*VirtualLocation `json:"virtualLocations,omitempty"`
// Links maps link IDs to Link objects.
Links map[string]*Link `json:"links,omitempty"`
// Keywords maps keyword strings to boolean true.
Keywords map[string]bool `json:"keywords,omitempty"`
// Categories maps category names to boolean true.
Categories map[string]bool `json:"categories,omitempty"`
// Color is a CSS color value for the event.
Color *string `json:"color,omitempty"`
// RecurrenceRules defines the recurrence pattern for the event.
RecurrenceRules []*RecurrenceRule `json:"recurrenceRules,omitempty"`
// RecurrenceOverrides maps recurrence instance dates to overridden
// Event objects.
RecurrenceOverrides map[string]*Event `json:"recurrenceOverrides,omitempty"`
// ExcludedRecurrenceRules defines patterns for excluded recurrence dates.
ExcludedRecurrenceRules []*RecurrenceRule `json:"excludedRecurrenceRules,omitempty"`
// Participants maps participant IDs to Participant objects.
Participants map[string]*Participant `json:"participants,omitempty"`
// ReplyTo maps method strings (e.g. "imip") to URIs for RSVP replies.
ReplyTo map[string]string `json:"replyTo,omitempty"`
// Alerts maps alert IDs to Alert objects.
Alerts map[string]*Alert `json:"alerts,omitempty"`
// UseDefaultAlerts indicates whether to use the calendar's default alerts.
UseDefaultAlerts bool `json:"useDefaultAlerts,omitempty"`
// Method is the scheduling method (e.g. "request", "reply").
Method *string `json:"method,omitempty"`
// ProdID is the product identifier that created this event.
ProdID *string `json:"prodId,omitempty"`
}
Event represents a JSCalendar Event or Task object (draft-ietf-calext-jscalendarbis-15, draft-ietf-jmap-calendars-26 Section 4).
type EventChanges ¶
type EventChanges struct {
// AccountID is the account to query.
AccountID jmap.ID `json:"accountId"`
// SinceState is the state to compare against.
SinceState string `json:"sinceState"`
// MaxChanges is the maximum number of changes to return.
MaxChanges *uint64 `json:"maxChanges,omitempty"`
}
EventChanges retrieves changes to Events since a given state (draft-ietf-jmap-calendars-26 Section 4.2).
func (*EventChanges) Requires ¶
func (m *EventChanges) Requires() []jmap.URI
Requires implements jmap.Method.
type EventChangesResponse ¶
type EventChangesResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// OldState is the state before the changes.
OldState string `json:"oldState"`
// NewState is the state after the changes.
NewState string `json:"newState"`
// HasMoreChanges indicates whether there are more changes available.
HasMoreChanges bool `json:"hasMoreChanges"`
// Created contains IDs of Events that were created.
Created []jmap.ID `json:"created"`
// Updated contains IDs of Events that were updated.
Updated []jmap.ID `json:"updated"`
// Destroyed contains IDs of Events that were destroyed.
Destroyed []jmap.ID `json:"destroyed"`
}
EventChangesResponse is the response to CalendarEvent/changes.
func (*EventChangesResponse) Name ¶
func (r *EventChangesResponse) Name() string
Name implements jmap.MethodResponse.
type EventCopy ¶
type EventCopy struct {
// FromAccountID is the source account ID.
FromAccountID jmap.ID `json:"fromAccountId"`
// IfFromInState only copies if the source account state matches.
IfFromInState *string `json:"ifFromInState,omitempty"`
// AccountID is the destination account ID.
AccountID jmap.ID `json:"accountId"`
// IfInState only copies if the destination account state matches.
IfInState *string `json:"ifInState,omitempty"`
// Create maps creation IDs to Event objects to copy.
Create map[jmap.ID]*Event `json:"create,omitempty"`
// OnSuccessDestroyOriginal destroys the original event after
// successful copy.
OnSuccessDestroyOriginal bool `json:"onSuccessDestroyOriginal,omitempty"`
// DestroyFromIfInState only destroys originals if the source
// account state matches.
DestroyFromIfInState *string `json:"destroyFromIfInState,omitempty"`
}
EventCopy copies Events between accounts (draft-ietf-jmap-calendars-26 Section 4.6).
type EventCopyResponse ¶
type EventCopyResponse struct {
// FromAccountID is the source account ID.
FromAccountID jmap.ID `json:"fromAccountId"`
// AccountID is the destination account ID.
AccountID jmap.ID `json:"accountId"`
// OldState is the state before the changes.
OldState string `json:"oldState"`
// NewState is the state after the changes.
NewState string `json:"newState"`
// Created maps creation IDs to created Event objects.
Created map[jmap.ID]*Event `json:"created,omitempty"`
// NotCreated maps creation IDs to errors.
NotCreated map[jmap.ID]*jmap.SetError `json:"notCreated,omitempty"`
}
EventCopyResponse is the response to CalendarEvent/copy.
func (*EventCopyResponse) Name ¶
func (r *EventCopyResponse) Name() string
Name implements jmap.MethodResponse.
type EventFilter ¶
type EventFilter struct {
// InCalendar filters events by calendar ID.
InCalendar *jmap.ID `json:"inCalendar,omitempty"`
// UID filters events by UID.
UID *string `json:"uid,omitempty"`
// After filters events starting at or after this date-time.
After *string `json:"after,omitempty"`
// Before filters events starting before this date-time.
Before *string `json:"before,omitempty"`
// Text filters events containing this text in any text property.
Text *string `json:"text,omitempty"`
// Title filters events containing this text in the title.
Title *string `json:"title,omitempty"`
// Description filters events containing this text in the description.
Description *string `json:"description,omitempty"`
// Location filters events containing this text in any location.
Location *string `json:"location,omitempty"`
// Owner filters events by owner name or email.
Owner *string `json:"owner,omitempty"`
// AttendedBy filters events attended by this name or email.
AttendedBy *string `json:"attendedBy,omitempty"`
}
EventFilter defines filter criteria for CalendarEvent/query (draft-ietf-jmap-calendars-26 Section 4.4).
type EventGet ¶
type EventGet struct {
// AccountID is the account to query.
AccountID jmap.ID `json:"accountId"`
// IDs is the list of Event IDs to retrieve.
// If nil, all are returned.
IDs []jmap.ID `json:"ids,omitempty"`
// Properties lists the properties to return. If nil, all are returned.
Properties []string `json:"properties,omitempty"`
}
EventGet retrieves Event objects (draft-ietf-jmap-calendars-26 Section 4.1).
type EventGetResponse ¶
type EventGetResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// State is the current state string for this data type.
State string `json:"state"`
// List contains the requested Event objects.
List []*Event `json:"list"`
// NotFound contains IDs that were not found.
NotFound []jmap.ID `json:"notFound"`
}
EventGetResponse is the response to CalendarEvent/get.
func (*EventGetResponse) Name ¶
func (r *EventGetResponse) Name() string
Name implements jmap.MethodResponse.
type EventQuery ¶
type EventQuery struct {
// AccountID is the account to query.
AccountID jmap.ID `json:"accountId"`
// Filter specifies the criteria to filter by.
Filter *EventFilter `json:"filter,omitempty"`
// Sort specifies the sort order.
Sort []*EventSort `json:"sort,omitempty"`
// Position is the zero-based index of the first result to return.
Position int64 `json:"position,omitempty"`
// Anchor is the ID of an item to use as the position reference.
Anchor *jmap.ID `json:"anchor,omitempty"`
// AnchorOffset is the offset from the anchor to the first result.
AnchorOffset int64 `json:"anchorOffset,omitempty"`
// Limit is the maximum number of results to return.
Limit *uint64 `json:"limit,omitempty"`
// CalculateTotal requests the server include a total count.
CalculateTotal bool `json:"calculateTotal,omitempty"`
}
EventQuery searches for Event IDs matching criteria (draft-ietf-jmap-calendars-26 Section 4.4).
func (*EventQuery) Requires ¶
func (m *EventQuery) Requires() []jmap.URI
Requires implements jmap.Method.
type EventQueryChanges ¶
type EventQueryChanges struct {
// AccountID is the account to query.
AccountID jmap.ID `json:"accountId"`
// Filter specifies the criteria used in the original query.
Filter *EventFilter `json:"filter,omitempty"`
// Sort specifies the sort order used in the original query.
Sort []*EventSort `json:"sort,omitempty"`
// SinceQueryState is the query state from a previous query response.
SinceQueryState string `json:"sinceQueryState"`
// MaxChanges is the maximum number of changes to return.
MaxChanges *uint64 `json:"maxChanges,omitempty"`
// UpToID limits changes to those up to and including this ID.
UpToID *jmap.ID `json:"upToId,omitempty"`
// CalculateTotal requests the server include a total count.
CalculateTotal bool `json:"calculateTotal,omitempty"`
}
EventQueryChanges retrieves changes to a previous CalendarEvent/query result (draft-ietf-jmap-calendars-26 Section 4.5).
func (*EventQueryChanges) Name ¶
func (m *EventQueryChanges) Name() string
Name implements jmap.Method.
func (*EventQueryChanges) Requires ¶
func (m *EventQueryChanges) Requires() []jmap.URI
Requires implements jmap.Method.
type EventQueryChangesResponse ¶
type EventQueryChangesResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// OldQueryState is the query state supplied by the client.
OldQueryState string `json:"oldQueryState"`
// NewQueryState is the current query state.
NewQueryState string `json:"newQueryState"`
// Removed contains IDs removed from the query results.
Removed []jmap.ID `json:"removed"`
// Added contains items added to the query results with their positions.
Added []jmap.AddedItem `json:"added"`
// Total is the total number of matching results, if requested.
Total *uint64 `json:"total,omitempty"`
}
EventQueryChangesResponse is the response to CalendarEvent/queryChanges.
func (*EventQueryChangesResponse) Name ¶
func (r *EventQueryChangesResponse) Name() string
Name implements jmap.MethodResponse.
type EventQueryResponse ¶
type EventQueryResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// QueryState is the current state of the query.
QueryState string `json:"queryState"`
// CanCalculateChanges indicates if the server supports queryChanges.
CanCalculateChanges bool `json:"canCalculateChanges"`
// Position is the zero-based index of the first result returned.
Position uint64 `json:"position"`
// IDs contains the IDs of the matching Event objects.
IDs []jmap.ID `json:"ids"`
// Total is the total number of matching results, if requested.
Total *uint64 `json:"total,omitempty"`
// Limit is the limit that was applied to the query.
Limit *uint64 `json:"limit,omitempty"`
}
EventQueryResponse is the response to CalendarEvent/query.
func (*EventQueryResponse) Name ¶
func (r *EventQueryResponse) Name() string
Name implements jmap.MethodResponse.
type EventSet ¶
type EventSet struct {
// AccountID is the account to modify.
AccountID jmap.ID `json:"accountId"`
// IfInState only applies changes if the current state matches.
IfInState *string `json:"ifInState,omitempty"`
// Create maps creation IDs to Event objects to create.
Create map[jmap.ID]*Event `json:"create,omitempty"`
// Update maps Event IDs to patch objects.
Update map[jmap.ID]*jmap.Patch `json:"update,omitempty"`
// Destroy is a list of Event IDs to destroy.
Destroy []jmap.ID `json:"destroy,omitempty"`
}
EventSet creates, updates, or destroys Events (draft-ietf-jmap-calendars-26 Section 4.3).
type EventSetResponse ¶
type EventSetResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// OldState is the state before the changes.
OldState string `json:"oldState"`
// NewState is the state after the changes.
NewState string `json:"newState"`
// Created maps creation IDs to created Event objects.
Created map[jmap.ID]*Event `json:"created,omitempty"`
// Updated maps Event IDs to updated Event objects.
Updated map[jmap.ID]*Event `json:"updated,omitempty"`
// Destroyed contains IDs of destroyed Events.
Destroyed []jmap.ID `json:"destroyed,omitempty"`
// NotCreated maps creation IDs to errors.
NotCreated map[jmap.ID]*jmap.SetError `json:"notCreated,omitempty"`
// NotUpdated maps Event IDs to errors.
NotUpdated map[jmap.ID]*jmap.SetError `json:"notUpdated,omitempty"`
// NotDestroyed maps Event IDs to errors.
NotDestroyed map[jmap.ID]*jmap.SetError `json:"notDestroyed,omitempty"`
}
EventSetResponse is the response to CalendarEvent/set.
func (*EventSetResponse) Name ¶
func (r *EventSetResponse) Name() string
Name implements jmap.MethodResponse.
type EventSort ¶
type EventSort struct {
// Property is the Event property to sort by.
Property string `json:"property"`
// IsAscending controls sort direction. Default is true.
IsAscending *bool `json:"isAscending,omitempty"`
}
EventSort defines the sort order for CalendarEvent/query results.
type Get ¶
type Get struct {
// AccountID is the account to query.
AccountID jmap.ID `json:"accountId"`
// IDs is the list of Calendar IDs to retrieve. If nil, all are returned.
IDs []jmap.ID `json:"ids,omitempty"`
// Properties lists the properties to return. If nil, all are returned.
Properties []string `json:"properties,omitempty"`
}
Get retrieves Calendar objects (draft-ietf-jmap-calendars-26 Section 3.1).
type GetResponse ¶
type GetResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// State is the current state string for this data type.
State string `json:"state"`
// List contains the requested Calendar objects.
List []*Calendar `json:"list"`
// NotFound contains IDs that were not found.
NotFound []jmap.ID `json:"notFound"`
}
GetResponse is the response to Calendar/get.
type Link ¶
type Link struct {
// Href is the URI of the link.
Href string `json:"href"`
// ContentType is the MIME type of the linked resource.
ContentType *string `json:"contentType,omitempty"`
// Size is the size in octets of the linked resource.
Size *uint64 `json:"size,omitempty"`
// Rel is the relation type of the link (e.g. "icon", "enclosure").
Rel *string `json:"rel,omitempty"`
// Display indicates how to present the link: "badge", "graphic",
// "fullsize", or "thumbnail".
Display *string `json:"display,omitempty"`
// Title is a human-readable description of the link.
Title *string `json:"title,omitempty"`
}
Link represents a link associated with a calendar event (draft-ietf-calext-jscalendarbis-15 Section 4.5.1).
type Location ¶
type Location struct {
// Name is the human-readable name of the location.
Name *string `json:"name,omitempty"`
// Description is a longer description of the location.
Description *string `json:"description,omitempty"`
// RelativeTo defines the relation to the event start time.
RelativeTo *string `json:"relativeTo,omitempty"`
// TimeZone is the IANA time zone of the location.
TimeZone *string `json:"timeZone,omitempty"`
// Coordinates is the geographic coordinates (RFC 5870 geo: URI).
Coordinates *string `json:"coordinates,omitempty"`
// Links maps link IDs to Link objects for this location.
Links map[string]*Link `json:"links,omitempty"`
}
Location represents a physical location for a calendar event (draft-ietf-calext-jscalendarbis-15 Section 4.4.1).
type NDay ¶
type NDay struct {
// Day is the day of the week: "mo", "tu", "we", "th", "fr", "sa", "su".
Day string `json:"day"`
// NthOfPeriod restricts to the nth occurrence within the period.
NthOfPeriod *int `json:"nthOfPeriod,omitempty"`
}
NDay represents a day within a recurrence rule, optionally with an nth-of-period qualifier.
type Participant ¶
type Participant struct {
// Type is the participant type, e.g. "individual", "group".
Type string `json:"@type,omitempty"`
// Name is the display name of the participant.
Name string `json:"name"`
// Email is the email address of the participant.
Email *string `json:"email,omitempty"`
// SendTo maps delivery methods (e.g. "imip") to URIs.
SendTo map[string]string `json:"sendTo,omitempty"`
// Kind is the kind of entity: "individual", "group", "resource",
// "location", or "other".
Kind *string `json:"kind,omitempty"`
// Roles maps role names to boolean true, e.g. "attendee", "chair".
Roles map[string]bool `json:"roles,omitempty"`
// ParticipationStatus is the participation status:
// "needs-action", "accepted", "declined", "tentative", "delegated".
ParticipationStatus *string `json:"participationStatus,omitempty"`
// ParticipationComment is a comment about the participation status.
ParticipationComment *string `json:"participationComment,omitempty"`
// ExpectReply indicates whether a reply is expected from this participant.
ExpectReply bool `json:"expectReply,omitempty"`
// ScheduleSequence is the sequence number for scheduling messages.
ScheduleSequence *uint64 `json:"scheduleSequence,omitempty"`
// ScheduleUpdated is the date-time of the last scheduling update.
ScheduleUpdated *string `json:"scheduleUpdated,omitempty"`
// ScheduleAgent indicates who sends scheduling messages:
// "server", "client", or "none".
ScheduleAgent *string `json:"scheduleAgent,omitempty"`
// ScheduleForceSend forces sending a scheduling message even when
// normally not needed: "request", "reply".
ScheduleForceSend *string `json:"scheduleForceSend,omitempty"`
// InvitedBy is the participant ID of the person who invited this
// participant.
InvitedBy *string `json:"invitedBy,omitempty"`
// DelegatedTo maps participant IDs to boolean true for delegation.
DelegatedTo map[string]bool `json:"delegatedTo,omitempty"`
// DelegatedFrom maps participant IDs to boolean true for delegation.
DelegatedFrom map[string]bool `json:"delegatedFrom,omitempty"`
// MemberOf maps group participant IDs to boolean true.
MemberOf map[string]bool `json:"memberOf,omitempty"`
// Links maps link IDs to Link objects for this participant.
Links map[string]*Link `json:"links,omitempty"`
}
Participant represents a participant of a calendar event (draft-ietf-calext-jscalendarbis-15 Section 4.6.1).
type ParticipantIdentity ¶
type ParticipantIdentity struct {
// ID is the server-assigned identifier.
ID jmap.ID `json:"id,omitempty"`
// Name is the display name of this identity.
Name string `json:"name"`
// SendTo maps delivery methods (e.g. "imip") to URIs.
SendTo map[string]string `json:"sendTo"`
}
ParticipantIdentity represents a JMAP ParticipantIdentity object (draft-ietf-jmap-calendars-26 Section 5).
type ParticipantIdentityChanges ¶
type ParticipantIdentityChanges struct {
// AccountID is the account to query.
AccountID jmap.ID `json:"accountId"`
// SinceState is the state to compare against.
SinceState string `json:"sinceState"`
// MaxChanges is the maximum number of changes to return.
MaxChanges *uint64 `json:"maxChanges,omitempty"`
}
ParticipantIdentityChanges retrieves changes to ParticipantIdentities since a given state (draft-ietf-jmap-calendars-26 Section 5.2).
func (*ParticipantIdentityChanges) Name ¶
func (m *ParticipantIdentityChanges) Name() string
Name implements jmap.Method.
func (*ParticipantIdentityChanges) Requires ¶
func (m *ParticipantIdentityChanges) Requires() []jmap.URI
Requires implements jmap.Method.
type ParticipantIdentityChangesResponse ¶
type ParticipantIdentityChangesResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// OldState is the state before the changes.
OldState string `json:"oldState"`
// NewState is the state after the changes.
NewState string `json:"newState"`
// HasMoreChanges indicates whether there are more changes available.
HasMoreChanges bool `json:"hasMoreChanges"`
// Created contains IDs of ParticipantIdentities that were created.
Created []jmap.ID `json:"created"`
// Updated contains IDs of ParticipantIdentities that were updated.
Updated []jmap.ID `json:"updated"`
// Destroyed contains IDs of ParticipantIdentities that were destroyed.
Destroyed []jmap.ID `json:"destroyed"`
}
ParticipantIdentityChangesResponse is the response to ParticipantIdentity/changes.
func (*ParticipantIdentityChangesResponse) Name ¶
func (r *ParticipantIdentityChangesResponse) Name() string
Name implements jmap.MethodResponse.
type ParticipantIdentityGet ¶
type ParticipantIdentityGet struct {
// AccountID is the account to query.
AccountID jmap.ID `json:"accountId"`
// IDs is the list of ParticipantIdentity IDs to retrieve.
// If nil, all are returned.
IDs []jmap.ID `json:"ids,omitempty"`
// Properties lists the properties to return. If nil, all are returned.
Properties []string `json:"properties,omitempty"`
}
ParticipantIdentityGet retrieves ParticipantIdentity objects (draft-ietf-jmap-calendars-26 Section 5.1).
func (*ParticipantIdentityGet) Name ¶
func (m *ParticipantIdentityGet) Name() string
Name implements jmap.Method.
func (*ParticipantIdentityGet) Requires ¶
func (m *ParticipantIdentityGet) Requires() []jmap.URI
Requires implements jmap.Method.
type ParticipantIdentityGetResponse ¶
type ParticipantIdentityGetResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// State is the current state string for this data type.
State string `json:"state"`
// List contains the requested ParticipantIdentity objects.
List []*ParticipantIdentity `json:"list"`
// NotFound contains IDs that were not found.
NotFound []jmap.ID `json:"notFound"`
}
ParticipantIdentityGetResponse is the response to ParticipantIdentity/get.
func (*ParticipantIdentityGetResponse) Name ¶
func (r *ParticipantIdentityGetResponse) Name() string
Name implements jmap.MethodResponse.
type ParticipantIdentitySet ¶
type ParticipantIdentitySet struct {
// AccountID is the account to modify.
AccountID jmap.ID `json:"accountId"`
// IfInState only applies changes if the current state matches.
IfInState *string `json:"ifInState,omitempty"`
// Create maps creation IDs to ParticipantIdentity objects to create.
Create map[jmap.ID]*ParticipantIdentity `json:"create,omitempty"`
// Update maps ParticipantIdentity IDs to patch objects.
Update map[jmap.ID]*jmap.Patch `json:"update,omitempty"`
// Destroy is a list of ParticipantIdentity IDs to destroy.
Destroy []jmap.ID `json:"destroy,omitempty"`
}
ParticipantIdentitySet creates, updates, or destroys ParticipantIdentities (draft-ietf-jmap-calendars-26 Section 5.3).
func (*ParticipantIdentitySet) Name ¶
func (m *ParticipantIdentitySet) Name() string
Name implements jmap.Method.
func (*ParticipantIdentitySet) Requires ¶
func (m *ParticipantIdentitySet) Requires() []jmap.URI
Requires implements jmap.Method.
type ParticipantIdentitySetResponse ¶
type ParticipantIdentitySetResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// OldState is the state before the changes.
OldState string `json:"oldState"`
// NewState is the state after the changes.
NewState string `json:"newState"`
// Created maps creation IDs to created ParticipantIdentity objects.
Created map[jmap.ID]*ParticipantIdentity `json:"created,omitempty"`
// Updated maps ParticipantIdentity IDs to updated objects.
Updated map[jmap.ID]*ParticipantIdentity `json:"updated,omitempty"`
// Destroyed contains IDs of destroyed ParticipantIdentities.
Destroyed []jmap.ID `json:"destroyed,omitempty"`
// NotCreated maps creation IDs to errors.
NotCreated map[jmap.ID]*jmap.SetError `json:"notCreated,omitempty"`
// NotUpdated maps ParticipantIdentity IDs to errors.
NotUpdated map[jmap.ID]*jmap.SetError `json:"notUpdated,omitempty"`
// NotDestroyed maps ParticipantIdentity IDs to errors.
NotDestroyed map[jmap.ID]*jmap.SetError `json:"notDestroyed,omitempty"`
}
ParticipantIdentitySetResponse is the response to ParticipantIdentity/set.
func (*ParticipantIdentitySetResponse) Name ¶
func (r *ParticipantIdentitySetResponse) Name() string
Name implements jmap.MethodResponse.
type RecurrenceRule ¶
type RecurrenceRule struct {
// Frequency is the recurrence frequency: "yearly", "monthly",
// "weekly", "daily", "hourly", "minutely", or "secondly".
Frequency string `json:"frequency"`
// Interval is the interval between recurrences.
Interval *uint64 `json:"interval,omitempty"`
// RScale is the calendar scale to use (default "gregorian").
RScale *string `json:"rscale,omitempty"`
// Skip defines behavior when a date does not exist: "omit",
// "backward", or "forward".
Skip *string `json:"skip,omitempty"`
// FirstDayOfWeek is the first day of the week for weekly rules.
FirstDayOfWeek *string `json:"firstDayOfWeek,omitempty"`
// ByDay restricts recurrence by day of the week.
ByDay []*NDay `json:"byDay,omitempty"`
// ByMonthDay restricts recurrence by day of the month.
ByMonthDay []int `json:"byMonthDay,omitempty"`
// ByMonth restricts recurrence by month.
ByMonth []string `json:"byMonth,omitempty"`
// ByYearDay restricts recurrence by day of the year.
ByYearDay []int `json:"byYearDay,omitempty"`
// ByWeekNo restricts recurrence by week number.
ByWeekNo []int `json:"byWeekNo,omitempty"`
// ByHour restricts recurrence by hour.
ByHour []uint `json:"byHour,omitempty"`
// ByMinute restricts recurrence by minute.
ByMinute []uint `json:"byMinute,omitempty"`
// BySecond restricts recurrence by second.
BySecond []uint `json:"bySecond,omitempty"`
// BySetPosition restricts recurrence by position within the set.
BySetPosition []int `json:"bySetPosition,omitempty"`
// Count is the maximum number of occurrences.
Count *uint64 `json:"count,omitempty"`
// Until is the end date-time for the recurrence.
Until *string `json:"until,omitempty"`
}
RecurrenceRule defines a recurrence pattern (draft-ietf-calext-jscalendarbis-15 Section 4.3.1).
type Relation ¶
type Relation struct {
// Relation maps relation type strings to boolean true,
// e.g. "first", "next", "child", "parent".
Relation map[string]bool `json:"relation,omitempty"`
}
Relation represents a relationship to another object (draft-ietf-calext-jscalendarbis-15 Section 4.1.1).
type Set ¶
type Set struct {
// AccountID is the account to modify.
AccountID jmap.ID `json:"accountId"`
// IfInState only applies changes if the current state matches.
IfInState *string `json:"ifInState,omitempty"`
// Create maps creation IDs to Calendar objects to create.
Create map[jmap.ID]*Calendar `json:"create,omitempty"`
// Update maps Calendar IDs to patch objects.
Update map[jmap.ID]*jmap.Patch `json:"update,omitempty"`
// Destroy is a list of Calendar IDs to destroy.
Destroy []jmap.ID `json:"destroy,omitempty"`
}
Set creates, updates, or destroys Calendars (draft-ietf-jmap-calendars-26 Section 3.3).
type SetResponse ¶
type SetResponse struct {
// AccountID is the account this response is for.
AccountID jmap.ID `json:"accountId"`
// OldState is the state before the changes.
OldState string `json:"oldState"`
// NewState is the state after the changes.
NewState string `json:"newState"`
// Created maps creation IDs to created Calendar objects.
Created map[jmap.ID]*Calendar `json:"created,omitempty"`
// Updated maps Calendar IDs to updated Calendar objects.
Updated map[jmap.ID]*Calendar `json:"updated,omitempty"`
// Destroyed contains IDs of destroyed Calendars.
Destroyed []jmap.ID `json:"destroyed,omitempty"`
// NotCreated maps creation IDs to errors.
NotCreated map[jmap.ID]*jmap.SetError `json:"notCreated,omitempty"`
// NotUpdated maps Calendar IDs to errors.
NotUpdated map[jmap.ID]*jmap.SetError `json:"notUpdated,omitempty"`
// NotDestroyed maps Calendar IDs to errors.
NotDestroyed map[jmap.ID]*jmap.SetError `json:"notDestroyed,omitempty"`
}
SetResponse is the response to Calendar/set.
type ShareRights ¶
type ShareRights struct {
MayReadFreeBusy bool `json:"mayReadFreeBusy"`
MayReadItems bool `json:"mayReadItems"`
MayWriteAll bool `json:"mayWriteAll"`
MayWriteOwn bool `json:"mayWriteOwn"`
MayUpdatePrivate bool `json:"mayUpdatePrivate"`
MayRSVP bool `json:"mayRSVP"`
MayAdmin bool `json:"mayAdmin"`
MayDelete bool `json:"mayDelete"`
}
ShareRights defines the sharing rights for a calendar.
type VirtualLocation ¶
type VirtualLocation struct {
// Name is the human-readable name of the virtual location.
Name *string `json:"name,omitempty"`
// URI is the connection URI for the virtual location.
URI string `json:"uri"`
// Description is a longer description of the virtual location.
Description *string `json:"description,omitempty"`
// Features maps feature names to boolean true, e.g. "audio", "video".
Features map[string]bool `json:"features,omitempty"`
}
VirtualLocation represents a virtual/online location for a calendar event (draft-ietf-calext-jscalendarbis-15 Section 4.4.2).