Commit Graph
53 Commits
Author SHA1 Message Date
Claudemiro 4c5d5302ec Basic context implementation in webhooks. 2016-08-21 10:22:35 -03:00
Claudemiro 994e8e00f1 Show only a log message when could not read conf 2016-08-14 21:00:47 -03:00
ClaudemiroandGitHub 9ad14daeeb Simplified the websockets handler code (#30)
* Simplified the websockets handler code

* created function validateAuthKey

* Using go default error interface.
2016-08-13 12:25:38 -03:00
ClaudemiroandGitHub 6225d8006f Replaces gorilla mux to goji and decied to remove vendor dependencies from git (#28)
* Replaces gorilla mux to goji

Removed the applicationContext stuff. Now every handler is a struct, and each one hold its dependencies.

* handler not handle

* Ignoring vendor dir

* Hide handlers complexity instantiation.

* Websocket handler does not need common handlers

* Use maps instead of for loops to search in memdb for apps (#29)

* Use maps instead of for loops to search in memdb for apps; use mutexes more efficiently by immediately unlocking when lock is no longer needed, not just at the end of the function via defer

* Fixed assignment to entry in nil map

* Minor impovements in source code

* Replaces gorilla mux to goji

Removed the applicationContext stuff. Now every handler is a struct, and each one hold its dependencies.

* handler not handle

* Ignoring vendor dir

* Hide handlers complexity instantiation.

* Websocket handler does not need common handlers

* renamed IdMutex to IDMutex to follow go convention
2016-08-11 21:06:05 -03:00
ZoltanandClaudemiro 7a4568e92d Use maps instead of for loops to search in memdb for apps (#29)
* Use maps instead of for loops to search in memdb for apps; use mutexes more efficiently by immediately unlocking when lock is no longer needed, not just at the end of the function via defer

* Fixed assignment to entry in nil map

* Minor impovements in source code
2016-08-11 20:57:51 -03:00
claudemiro 6e46bcb2aa Moved location of mockSocket 2016-08-10 20:26:27 -03:00
claudemiro 7a794c97d7 Added util method IsClientEvent 2016-08-09 23:42:44 -03:00
ClaudemiroandGitHub a6f44d2175 Merge pull request #24 from tssajo/tssajo4
Fixed a bug in ipe/websocket.go
2016-08-07 10:11:02 -03:00
ClaudemiroandGitHub 6c479ced3c Merge pull request #22 from tssajo/tssajo3
Do not overuse defer unnecessarily
2016-08-07 10:10:18 -03:00
tssajo e9db8ea35e Fixed a bug in ipe/websocket.go (TotalConnections were growing infinitely connection was not closed when a channel listener refreshed the browser tab or simply closed the browser tab) 2016-07-23 15:20:35 +02:00
tssajo 24425a2a9a While I love defer, I think the program is better readable and maybe even a bit faster when defer is not used when Locking/Unlocking 2016-07-20 02:15:04 +02:00
tssajo 952983a0f8 Added missing defer file.Close() to func Start 2016-07-20 02:07:39 +02:00
claudemiro abf9a980eb Sending messages without a goroutine 2016-03-21 20:05:30 -03:00
claudemiro 8c54491e27 Not necessary close body at this point 2016-03-07 08:08:56 -03:00
claudemiro edabc10008 Closing request body in webhook call 2016-03-06 23:30:35 -03:00
claudemiro 5ce17c8856 Code cleanup 2016-03-06 20:21:04 -03:00
claudemiro e71294de18 Standardized error messages 2016-03-06 18:12:03 -03:00
claudemiro a7c5813501 Testing http handlers 2016-03-06 17:53:51 -03:00
claudemiro 383c02de1c Added params as a parameter for each handler. 2016-03-06 16:09:21 -03:00
claudemiro 1bae7f13ad Internal refactoring. Removing the global config. 2016-03-06 15:34:12 -03:00
claudemiro cbdd4e428a Better config example 2016-03-05 09:29:57 -03:00
claudemiro 44bbc1b1ea Renamed constants, avoid export uncessary constants 2016-03-04 08:33:18 -03:00
claudemiro 5fa621d743 Added user-agent header with the url of the project 2016-03-04 08:32:08 -03:00
claudemiro 880d7bda2a Using reader for reading config file 2016-03-04 08:31:32 -03:00
claudemiro 7dad2de275 Added SSL port 2016-03-04 08:31:03 -03:00
claudemiro f3dba811b7 Improved Handling SSL
* Panic is betten than using channels in this case
* Changed the names to a more recognized names
* Improved the README with a full config file example
2016-03-03 21:01:21 -03:00
claudemiro 55a7a0b96c Fixed SSL verification 2016-03-03 20:46:37 -03:00
Welington Sampaio 03e94887a7 Both server running. SSL and Non SSL 2016-03-03 17:12:51 -03:00
Welington Sampaio e93145efe7 Both server running. SSL and Non SSL 2016-03-03 14:54:53 -03:00
Welington Sampaio 051da185e5 SSL Implementation 2016-03-03 08:37:00 -03:00
Jonhnny Weslley a77fb791f7 sign private channels with additional user data payload
Pusher accepts js clients to use the same auth endpoint to both presence
and private channels.
2016-01-24 12:43:06 -03:00
Jonhnny Weslley ba3b699517 refactor common logic 2016-01-24 11:54:06 -03:00
claudemiro 1de947cedc The random Seed should be executed only once.
If two users connect to the system in the same second both would receive the same id. This fix this error.
2016-01-18 00:37:55 -02:00
claudemiro 45cffc17a8 Added Link to badge, fix indentation. 2016-01-17 00:32:11 -02:00
claudemiro 59abf6ac5b Added Test for newConnection. 2016-01-17 00:27:21 -02:00
claudemiro cbb34a928f Verify if the exist the channel before 2016-01-17 00:12:12 -02:00
claudemiro 3fc072373a Fix lint suggestions 2016-01-16 21:20:23 -02:00
claudemiro cad813e729 Removed unused file 2016-01-16 20:50:42 -02:00
claudemiro 341909e600 Changed the way vendor imports, using the new GO15VENDOREXPERIMENT feature 2015-08-27 23:48:05 -03:00
claudemiro f910433853 Updated config example.
Removed OnlySSL as this feature is not implemented yet and removed
username and password.
2015-06-13 11:20:12 -03:00
claudemiro 8dbd3ccbea Removing the expvar handler.
I am removing the expvar handler, this is uncessary to me. I was using
the goji/httpauth package to authenticate this handler, so, I am
removing the dependency too.
2015-06-13 09:18:40 -03:00
claudemiro 228ed284d9 Removed godep dependency.
Golang community are discuting a vendor aproach to go dependencies. This
change will come as experimental in go 1.5. For now I am removing the
godep dependency manager and using a vendor aproach.

I still have to use the full path when importing dependencies, but when
go1.5 released I just have to rename the imports and use a -vendor
prefix when building the project.
2015-06-13 09:11:55 -03:00
claudemiro e2d07e9760 Validating channel name when connecting. 2015-05-17 09:51:17 -03:00
claudemiro 485bc01abe Changed SessionID format.
Pusher libs are validating the sessionID format. So I need to conform
with its format.
2015-05-17 09:25:57 -03:00
claudemiro 7b578c4fb4 Added Created at to connection. 2015-02-02 14:12:11 -03:00
claudemiro 03607062aa Fixed a litte comment explanation 2015-02-01 23:03:55 -03:00
claudemiro 846231f5f3 Not necessary export conf. 2015-01-31 15:18:38 -03:00
claudemiro 201cba86a9 There is no reason to export this functions and this types. 2015-01-31 15:12:54 -03:00
claudemiro cd2e58d0c5 No need to export NewChannel function. 2015-01-31 09:19:00 -03:00
claudemiro eca114dcf1 Fixed tests 2015-01-31 09:16:47 -03:00