forked from aksdb/CalAnonSync
Added ICal template
This commit is contained in:
parent
fed3e97308
commit
e8cf553e9a
|
@ -8,6 +8,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -185,3 +186,18 @@ type PropFindResponse struct {
|
||||||
} `xml:"prop"`
|
} `xml:"prop"`
|
||||||
} `xml:"propstat"`
|
} `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`))
|
||||||
|
|
Loading…
Reference in New Issue