Added ICal template

This commit is contained in:
Andreas Schneider 2018-04-01 11:27:53 +02:00
parent fed3e97308
commit e8cf553e9a
1 changed files with 16 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import (
"log"
"net/http"
"strings"
"text/template"
"time"
)
@ -185,3 +186,18 @@ type PropFindResponse struct {
} `xml:"prop"`
} `xml:"propstat"`
}
var icalTemplate = template.Must(template.New("icalTemplate").Parse(`BEGIN:VCALENDAR
PRODID:-//aksdb/calanonsync//EN
VERSION:2.0
BEGIN:VEVENT
UID:{{ .UID }}
SUMMARY:{{ .Summary }}
CLASS:PUBLIC
DTSTART:{{ .Start }}Z
DTEND:{{ .End }}Z
CREATED:{{ .Now }}Z
DTSTAMP:{{ .Now }}Z
LAST-MODIFIED:{{ .Now }}Z
END:VEVENT
END:VCALENDAR`))