-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtemplates.go
34 lines (31 loc) · 892 Bytes
/
templates.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package ics
const ics = `BEGIN:VCALENDAR
PRODID:{{.ProdId}}
METHOD:REQUEST
VERSION:2.0
{{range $ve := .Events}}{{$ve}}
{{end}}END:VCALENDAR`
const vevent = `BEGIN:VEVENT
ORGANIZER;CN="{{.Organizer.CommonName}}":mailto:{{.Organizer.EmailAddress}}
{{range $at := .Attendees}}ATTENDEE;CUTYPE={{$at.CuType}};ROLE={{$at.Role}};PARTSTAT={{$at.PartStatus}};CN="{{$at.CommonName}}";RSVP={{$at.Rsvp}}:mailto:{{$at.EmailAddress}}
{{end}}LOCATION:{{.Location}}
DTSTAMP:{{.DtStamp}}
DTSTART:{{.DtStart}}
DTEND:{{.DtEnd}}{{range $ru := .RRule}}
RRULE:{{$ru}}{{end}}{{range $ru := .ExRule}}
EXRULE:{{$ru}}{{end}}{{range $ru := .ExDate}}
EXDATE:{{$ru}}{{end}}
SUMMARY:{{.Summary}}
DESCRIPTION:{{.Description}}
CLASS:{{.Class}}
UID:{{.UID}}
STATUS:{{.Status}}
END:VEVENT`
type vEvent struct {
*Event
DtStamp string
DtEnd string
DtStart string
ExDate []string
Description string
}