Added EventRecurs as option for backup details.
This commit is contained in:
parent
245bb6e73e
commit
068f0560e4
@ -11,9 +11,11 @@ import (
|
|||||||
|
|
||||||
// EventInfo searchable metadata for stored event objects.
|
// EventInfo searchable metadata for stored event objects.
|
||||||
func EventInfo(evt models.Eventable) *details.ExchangeInfo {
|
func EventInfo(evt models.Eventable) *details.ExchangeInfo {
|
||||||
organizer := ""
|
var (
|
||||||
subject := ""
|
organizer, subject string
|
||||||
start := time.Time{}
|
recurs bool
|
||||||
|
start = time.Time{}
|
||||||
|
)
|
||||||
|
|
||||||
if evt.GetOrganizer() != nil &&
|
if evt.GetOrganizer() != nil &&
|
||||||
evt.GetOrganizer().GetEmailAddress() != nil &&
|
evt.GetOrganizer().GetEmailAddress() != nil &&
|
||||||
@ -27,6 +29,10 @@ func EventInfo(evt models.Eventable) *details.ExchangeInfo {
|
|||||||
subject = *evt.GetSubject()
|
subject = *evt.GetSubject()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if evt.GetRecurrence() != nil {
|
||||||
|
recurs = true
|
||||||
|
}
|
||||||
|
|
||||||
if evt.GetStart() != nil &&
|
if evt.GetStart() != nil &&
|
||||||
evt.GetStart().GetDateTime() != nil {
|
evt.GetStart().GetDateTime() != nil {
|
||||||
// timeString has 'Z' literal added to ensure the stored
|
// timeString has 'Z' literal added to ensure the stored
|
||||||
@ -40,8 +46,9 @@ func EventInfo(evt models.Eventable) *details.ExchangeInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &details.ExchangeInfo{
|
return &details.ExchangeInfo{
|
||||||
Organizer: organizer,
|
Organizer: organizer,
|
||||||
Subject: subject,
|
Subject: subject,
|
||||||
EventStart: start,
|
EventStart: start,
|
||||||
|
EventRecurs: recurs,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -142,6 +142,7 @@ type ExchangeInfo struct {
|
|||||||
EventStart time.Time `json:"eventStart,omitempty"`
|
EventStart time.Time `json:"eventStart,omitempty"`
|
||||||
Organizer string `json:"organizer,omitempty"`
|
Organizer string `json:"organizer,omitempty"`
|
||||||
ContactName string `json:"contactName,omitempty"`
|
ContactName string `json:"contactName,omitempty"`
|
||||||
|
EventRecurs bool `json:"eventRecurs,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Headers returns the human-readable names of properties in an ExchangeInfo
|
// Headers returns the human-readable names of properties in an ExchangeInfo
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user