Mercurial > code > home > repos > homeauto
changeset 110:94e26e1e0668
add trig demo
Ignore-this: 68b95336f329d29618bd7647fa4f46a4
author | drewp@bigasterisk.com |
---|---|
date | Sun, 01 Sep 2013 01:43:13 -0700 |
parents | 868e759aeb74 |
children | e4a4ee70a514 |
files | service/laundry/laundry.go |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/service/laundry/laundry.go Sun Sep 01 01:35:36 2013 -0700 +++ b/service/laundry/laundry.go Sun Sep 01 01:43:13 2013 -0700 @@ -233,6 +233,18 @@ return nil }) + goweb.Map("GET", "/trig", func(c context.Context) error { + DC := namespace("http://purl.org/dc/terms/") + ROOM := namespace("http://projects.bigasterisk.com/room/") + statements := make(chan *goraptor.Statement, 100) + graph := ROOM("laundryDoor") + statements <- &(goraptor.Statement{ + graph, DC("modified"), nowLiteral(), graph}) + + close(statements) + return serializeGowebResponse(c, "trig", statements) + }) + goweb.Map("GET", "/graph", func(c context.Context) error { DC := namespace("http://purl.org/dc/terms/") ROOM := namespace("http://projects.bigasterisk.com/room/")