Kegan Dougal
f0cd6be741
Remove docs from the README and link to the godoc instead
8 years ago
Kegsay
7095e234e0
Merge pull request #113 from matrix-org/kegan/service-docs
Add docs for all the remaining services and convert them to use NewDefaultService
8 years ago
Kegan Dougal
3fec1c6fa5
Add docs for all the remaining services and convert them to use NewDefaultService
My hands hurt.
8 years ago
Kegsay
5f79c046d1
Merge pull request #112 from matrix-org/kegan/shut-up-golint
Add default implementations for ServiceType(), ServiceID() and ServiceUserID()
8 years ago
Kegan Dougal
41f73214ef
Add default implementations for ServiceType(), ServiceID() and ServiceUserID()
In addition to making there be less boilerplate, this also has the nice
side-effect of shutting up golint warnings \o/
8 years ago
Kegsay
ebfe706d16
Merge pull request #111 from matrix-org/kegan/remove-plugin
Remove Plugin. Replace with Commands() and Expansions()
8 years ago
Kegan Dougal
33e15cd992
Merge branch 'master' into kegan/remove-plugin
8 years ago
Kegsay
b1332eb6c2
Merge pull request #110 from matrix-org/kegan/docs-services
Doc up Giphy service
8 years ago
Kegan Dougal
3e21e02171
Remove Plugin. Replace with Commands() and Expansions()
Also split out `types.go` into separate files by the area they cover
(services, auth, actions).
8 years ago
Kegan Dougal
6e396a95ef
Doc up Giphy service
8 years ago
Kegsay
5153857926
Merge pull request #109 from matrix-org/kegan/readme-to-docs
Delete API info from README and point to gh-page. Add gendoc script
8 years ago
Kegan Dougal
a8336cdeab
Review comments
8 years ago
Kegan Dougal
5179caceda
Add links to gh-pages in config.sample.yaml
8 years ago
Kegan Dougal
89f3776cbd
Less lying
8 years ago
Kegan Dougal
4dc1adf5e2
Allow gendoc.sh to be called multiple times
8 years ago
Kegan Dougal
579cf29231
Add a gendoc script
Dumps output to .godoc
8 years ago
Kegan Dougal
3bce58ef07
Remove some docs from README. Point to gh-pages for the docs
8 years ago
Kegsay
32553179b0
Merge pull request #108 from matrix-org/kegan/all-the-docs
Add HTTP API docs
8 years ago
Kegan Dougal
26f115d6f9
Appease golint
8 years ago
Kegan Dougal
c66fdd1bdb
Review comments
8 years ago
Kegan Dougal
81e1859cb4
Revert "Remove API docs from README which is duplicated"
This reverts commit f91f653704
.
8 years ago
Kegan Dougal
2e9eb9caa8
Revert "Make links work"
This reverts commit a4c58ae0ee
.
8 years ago
Kegsay
a4c58ae0ee
Make links work
8 years ago
Kegan Dougal
f91f653704
Remove API docs from README which is duplicated
8 years ago
Kegan Dougal
dc6d7c593a
Add lots of HTTP and API docs
This all gets formatted right by godoc so we can point the README to that
instead of having the docs so far away from the code.
8 years ago
Kegsay
a51497d36f
Merge pull request #106 from matrix-org/kegan/move-handlers
Split up the enormous handlers.go into more manageable files
8 years ago
Kegan Dougal
4ab61e4a5f
Split up the enormous handlers.go into more manageable files
Split them up based on the HTTP API they are implementing.
8 years ago
Kegan Dougal
733440cf3d
GZip logs by default
8 years ago
Kegsay
e51b3eb499
Merge pull request #104 from matrix-org/kegan/db-interface
Make ServiceDB an interface called `Storer`
8 years ago
Kegan Dougal
71e6d97f79
Remove outdated comment
8 years ago
Kegan Dougal
38ead2c174
Make ServiceDB an interface called `Storer`
Implement a nop `Storer` called `NopStorage` which tests can make use of.
This was awful to write.
8 years ago
Kegsay
2a980eee21
Merge pull request #103 from matrix-org/kegan/rss-escape-entities
RSS: HTML decode the item/description fields
8 years ago
Kegan Dougal
6fd0f20c81
Review comments
8 years ago
Kegan Dougal
fcd3befb09
HTML decode the RSS title/description fields
8 years ago
Kegan Dougal
07e93c5ba2
Add failing TestHTMLEntities test
8 years ago
Kegan Dougal
ba6e5e8862
Rotate logs on a daily basis: Fixes #97
8 years ago
Kegsay
94e2c72451
Merge pull request #102 from matrix-org/kegan/tests
Move test util functions to dedicated file to clean up test files
8 years ago
Kegan Dougal
f753e0b669
Move test util functions to dedicated file to clean up test files
Also use verbose mode on tests so you can see which test is running when things
print to stdout.
8 years ago
Kegsay
c341adaaf2
Merge pull request #101 from matrix-org/kegan/tests-prep
Make it possible to do integration tests
8 years ago
Kegan Dougal
352d741558
Review comments
8 years ago
Kegan Dougal
5c65d4cf95
Add a mock HTTP client for Matrix clients to use. Add example test.
This will need rejigging at some point to make the test easier to set up.
8 years ago
Kegan Dougal
dc2fadd450
Factor out startup process to `setup()` and add top-level test
- Pass in an `envVars` struct rather than grabbing directly from `os`.
- Accept a `ServeMux` rather than always using the default mux.
- Add a `_test.go` file to instrument Go-NEB using `TestMain` to call `setup()`
8 years ago
Kegsay
2b0e244d3f
Merge pull request #100 from matrix-org/kegan/service-isolation
Prevent panicking code from taking down the entire process
8 years ago
Kegan Dougal
236c97d279
Tests and comments
8 years ago
Kegan Dougal
92ac46e925
Factor out a Protect() function for incoming HTTP requests
8 years ago
Kegan Dougal
7ab9794623
Protect panicking poll loops from taking down the entire process
8 years ago
Kegan Dougal
ce414ea586
Prevent panicking code triggered by matrix events from taking down the entire process
Specifically, this protects panicking `!commands` and expansions.
8 years ago
Kegan Dougal
3efb632b31
Log panicking HTTP requests
Whilst Go does this by default (does not `exit`), it logs to the std logger
which isn't written to the log file. Handle all panicking `OnIncomingRequests`.
8 years ago
Kegsay
53d46a9e5d
Mention the config file
8 years ago
Kegsay
9d059d2e55
Merge pull request #98 from matrix-org/kegan/config-yaml
Support config.yaml in addition to HTTP endpoints
8 years ago