1
0
mirror of https://github.com/matrix-org/dendrite.git synced 2024-06-14 13:06:37 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
Robert Swain
d09a65abbe Add Apache Version 2.0 license and headers to all golang files 2017-04-21 00:40:52 +02:00
Kegsay
2fadb9e409 Make it possible to point Riot at Dendrite (#74) 2017-04-20 17:11:53 +01:00
Kegsay
203e706b99 Move syncserver to its own directory (#66) 2017-04-12 16:06:26 +01:00
Kegsay
da0fffcc19 Add /sync API response structs (#58) 2017-04-11 11:52:26 +01:00
Kegsay
9a266762b4 Return events based on 'since' value (#57) 2017-04-10 15:12:18 +01:00
Kegsay
de9e3e5417 Add structs for HTTP long-polling (#56) 2017-04-07 14:32:42 +01:00
Kegsay
c1c837516a Store current room state (#55) 2017-04-05 10:30:13 +01:00
Kegsay
a3c66f7fa0 Write OutputRoomEvents into the database and remember the arrival order (#54) 2017-03-30 15:29:23 +01:00
Kegsay
2d2c7e7169 sync-server config: Read from a YAML file rather than hard-coded variables (#53) 2017-03-29 14:09:27 +01:00
Kegsay
a423008987 Read roomserver output log and remember position across restarts (#52) 2017-03-29 14:05:43 +01:00
Kegsay
e347aa05fe Make a dendrite-sync-server binary (#48)
Currently the HTTP handlers are attached to an API mux which is created inside
Setup(). In the future, we'll want to split this out so a single mux can have
both sync and clientapi handlers attached to it.
2017-03-22 17:39:08 +00:00
Kegsay
83b9cfeb2b Move binaries to /cmd (#46) 2017-03-21 17:14:17 +00:00
Kegsay
346f5d6334 Use gomatrixserverlib.StateKeyTuple and helper functions for auth (#44)
* Update gomatrixserverib dep

* Use helper functions when creating rooms

* Use gomatrixserverlib.StateKeyTuple
2017-03-17 16:28:15 +00:00
Kegsay
a7390953dd Implement /state event sending (#41) 2017-03-17 11:21:52 +00:00
Kegsay
742e4aca85 Factor out writing events to the roomserver input log (#40) 2017-03-15 13:36:26 +00:00
Kegsay
6739f65752 Implement event sending part of /rooms/$roomid/send/$type/$txnid (#39)
This involves:
 - Parsing the HTTP request
 - Requesting auth events from the roomserver via the Query API
 - Building the event
 - Doing auth checks on the event
 - Sending it to the roomserver input log
2017-03-15 11:22:40 +00:00
Kegsay
b9a4551075 Create README.md 2017-03-13 15:56:26 +00:00
Kegsay
414ea314a6 Update gomatrixserverlib and use AuthEventProvider (#35) 2017-03-10 17:54:17 +00:00
Kegsay
8ccff1e40f Log fatal errors at error level and return generic 500s (#34)
Previously, the error responses:
 - were not valid matrix errors (no `errcode`)
 - returned the `err.Error()` message which may contain sensitive information.
 - did not get logged (at all, let alone set the level correctly).

Now the error responses:
 - return valid matrix errors (`M_UNKNOWN`)
 - return a generic "Internal Server Error" string
 - get logged at `ERROR` level.
2017-03-10 16:50:41 +00:00
Kegsay
2fcf6fd6eb Send /createRoom events to kafka (#33) 2017-03-10 16:19:23 +00:00
Kegsay
49ed708ca4 Create the initial set of state events for room creation (#32) 2017-03-10 11:32:53 +00:00
Kegsay
e82090e277 Update gomatrixserverlib dep and add basic /createRoom validation (#31) 2017-03-09 11:47:06 +00:00
Kegsay
8ba9d4af04 Add /createRoom endpoint and unmarshal HTTP body (#27) 2017-03-07 16:11:08 +00:00
Kegsay
5552e1f3a8 Extract access tokens from HTTP requests (#15) 2017-03-07 13:43:32 +00:00
Kegsay
45d1e61a9d Update to use util.JSONResponse (#18) 2017-02-24 12:32:27 +00:00
Kegsay
966d3b95b7 Add error package and some Matrix errors (#13)
Terse function names are used to make usage not stutter. For example:

```go
err := error.Forbidden("you shall not pass")
```

At the moment they are all the same fundamental `MatrixError` type. This will
be bad if we ever want to `switch` based on the kind of error. I'm hoping we
won't ever need to introspect into errors like this: ideally these errors would
be created purely for immediately being returned in an HTTP response.

`MatrixError` implements the `error` interface.
2017-02-20 17:20:49 +00:00
Kegsay
5c34caa1c1 Implement logging to file via dugong (#12) 2017-02-20 16:14:23 +00:00
Kegsay
f1bb59d24a Use gorilla/mux to route HTTP requests (#11)
* Add basic routing based on matched paths
* Make /sync and /send use the right API paths
2017-02-20 15:41:29 +00:00
Kegan Dougal
b04dfae9c5 Add comments 2017-02-03 16:32:55 +00:00
Kegan Dougal
225cce9c77 Prefix /api as per standards 2017-02-03 16:28:11 +00:00
Kegan Dougal
aafaf6ede6 Add stub clientapi webserver with readers/writers packages
As per RL discussion with Mjark
2017-02-03 16:05:46 +00:00