# HG changeset patch # User drewp@bigasterisk.com # Date 1725668836 25200 # Node ID 1f84bd5ce8e0f9c24cb610d34174352975a1f62c # Parent 629d9ad289fe8e97188958ca1a1aee69468a3c9f comment diff -r 629d9ad289fe -r 1f84bd5ce8e0 calsync/mongoclient/mongoclient.go --- a/calsync/mongoclient/mongoclient.go Fri Sep 06 17:26:11 2024 -0700 +++ b/calsync/mongoclient/mongoclient.go Fri Sep 06 17:27:16 2024 -0700 @@ -17,37 +17,21 @@ eventsCollection *mongo.Collection } -// docs in eventsCollection +// Docs in eventsCollection (see mongoclienttypes for calendars). type MongoEvent struct { - // e.g. - // { - // "_id" : "http://bigasterisk.com/calendar/08s5m1_20140929T030000Z", - // "htmlLink" : "https://www.google.com/calendar/event?eid=MDhz", - // "title" : "meeting", - // "feedId" : "drewpca@gmail.com", - // "feedTitle" : "drewpca@gmail.com", - // "endTimeUnspecified" : false, - // "start" : "2014-09-28T20:00:00-07:00", - // "startDate" : "2014-09-28", - // "startTime" : ISODate("2014-09-29T03:00:00Z"), - // "end" : "2014-09-28T21:00:00-07:00", - // "endDate" : "2014-09-28", - // "endTime" : ISODate("2014-09-29T04:00:00Z") - // } - - Url string `bson:"_id"` - GoogleId string `bson:"googleId"` - CalendarUrl string `bson:"calendarUrl"` - HtmlLink string `bson:"htmlLink"` - Title string `bson:"title"` - EndTimeUnspecified bool `bson:"endTimeUnspecified"` - Start string `bson:"start"` - StartDate string `bson:"startDate"` - StartTime time.Time `bson:"startTime"` - End string `bson:"end"` - EndDate string `bson:"endDate"` - EndTime time.Time `bson:"endTime"` - LastUpdated time.Time `bson:"lastUpdated"` + Url string `bson:"_id"` // e.g. "http://bigasterisk.com/calendar/drew/7ipi" + GoogleId string `bson:"googleId"` // + CalendarUrl string `bson:"calendarUrl"` // + HtmlLink string `bson:"htmlLink"` // e.g. "https://www.google.com/calendar/event?eid=MDhz" + Title string `bson:"title"` // + EndTimeUnspecified bool `bson:"endTimeUnspecified"` // + Start string `bson:"start"` // e.g. "2014-09-28T20:00:00-07:00" + StartDate string `bson:"startDate"` // e.g. "2014-09-28" + StartTime time.Time `bson:"startTime"` // + End string `bson:"end"` // + EndDate string `bson:"endDate"` // + EndTime time.Time `bson:"endTime"` // + LastUpdated time.Time `bson:"lastUpdated"` // } func New(ctx context.Context) (*MongoClient, error) {