From b04dfae9c5f6b103ae6bf18f23c7bd2695ffddb7 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 3 Feb 2017 16:32:55 +0000 Subject: [PATCH] Add comments --- src/github.com/matrix-org/dendrite/clientapi/readers/sync.go | 2 ++ .../matrix-org/dendrite/clientapi/writers/sendmessage.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/github.com/matrix-org/dendrite/clientapi/readers/sync.go b/src/github.com/matrix-org/dendrite/clientapi/readers/sync.go index fcec593a..c5de15b0 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/readers/sync.go +++ b/src/github.com/matrix-org/dendrite/clientapi/readers/sync.go @@ -7,8 +7,10 @@ import ( "github.com/matrix-org/util" ) +// Sync handles HTTP requests to /sync type Sync struct{} +// OnIncomingRequest implements util.JSONRequestHandler func (s *Sync) OnIncomingRequest(req *http.Request) (interface{}, *util.HTTPError) { logger := req.Context().Value(util.CtxValueLogger).(*log.Entry) logger.Info("Doing stuff...") diff --git a/src/github.com/matrix-org/dendrite/clientapi/writers/sendmessage.go b/src/github.com/matrix-org/dendrite/clientapi/writers/sendmessage.go index 55cab225..dc4df2f5 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/writers/sendmessage.go +++ b/src/github.com/matrix-org/dendrite/clientapi/writers/sendmessage.go @@ -7,9 +7,11 @@ import ( "github.com/matrix-org/util" ) +// SendMessage handles HTTP requests to /rooms/$room_id/send/$event_type type SendMessage struct { } +// OnIncomingRequest implements util.JSONRequestHandler func (s *SendMessage) OnIncomingRequest(req *http.Request) (interface{}, *util.HTTPError) { logger := req.Context().Value(util.CtxValueLogger).(*log.Entry) logger.Info("Doing stuff...")