changeset 67:1f84bd5ce8e0

comment
author drewp@bigasterisk.com
date Fri, 06 Sep 2024 17:27:16 -0700
parents 629d9ad289fe
children e0c969974635
files calsync/mongoclient/mongoclient.go
diffstat 1 files changed, 14 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- 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) {