Denis Arh
5f7abc2187
Link services & event loop
2018-09-27 18:09:56 +02:00
Denis Arh
bf8f6f4213
Extracted payloads from websocket pkg to internal/payload
2018-09-27 15:37:11 +02:00
Tit Petric
74d9365123
upd(sam): events queue over channel
2018-09-27 11:06:43 +00:00
Denis Arh
62fde6443a
Remove redundant logging on pubsub message event
2018-09-26 21:01:33 +02:00
Denis Arh
87ba0a281d
Push list of channels and users when new ws connection opens
2018-09-26 20:54:27 +02:00
Denis Arh
9ff0de3546
Send member IDs alongside channel info
2018-09-26 20:30:28 +02:00
Denis Arh
17a3f9461e
Data structure naming clenaup
2018-09-26 16:49:51 +02:00
Denis Arh
2a357b1c93
Simplify & unify service initialization, calling, handling
2018-09-25 21:21:52 +02:00
Tit Petric
1689228e31
upd(sam) explicit db inject from service
2018-09-25 13:38:43 +00:00
Denis Arh
c781664fa6
Remove dump leftovers
2018-09-25 07:31:09 +02:00
Denis Arh
59d8856d30
Replace panic on feedSessions() error with log
2018-09-25 07:30:18 +02:00
Tit Petric
09e4e15306
upd(sam): refactory repo/svc for stateful contexts, L2
2018-09-20 17:23:09 +02:00
Tit Petric
49c4b0c434
upd(sam): refactor repository to split responsibility, L1
2018-09-20 16:39:32 +02:00
Denis Arh
e348b3e2f4
Remove User from SAM, refactor service initialization
2018-09-17 06:41:18 +02:00
Denis Arh
5bc9745106
Expanding ws payload names, some code cleanup
2018-09-14 20:16:52 +02:00
Tit Petric
7bf78fb4e0
upd(all): refactor
...
- moved rbac store and config to internal pkg,
- split auth authenticators to internal pkg,
- add rbac config object to internal/config,
- update package imports and references for auth,
- clean up main with pkg aliases
2018-09-13 12:05:06 +02:00
Tit Petric
91db6b37f7
Merge branch 'master' of ssh://github.com/crusttech/crust
2018-09-12 10:55:48 +02:00
Denis Arh
55aa5726f2
Stricter message types with MessageType* constants
2018-09-11 23:34:03 +02:00
Denis Arh
c4875688eb
Attachment serving
2018-09-11 23:34:03 +02:00
Tit Petric
48d47b95e8
upd(sam): refactor pubsub api
2018-09-11 20:35:45 +02:00
Tit Petric
cef9af9903
upd(sam): refactor pubsub, housekeeping
2018-09-11 20:17:26 +02:00
Tit Petric
33bdf429a5
upd(sam): refactor pubsub to repository
2018-09-11 18:12:41 +02:00
Tit Petric
3e3af76b65
upd(sam): configs refactor
2018-09-11 17:50:29 +02:00
Tit Petric
dfd9985552
upd(config): add pubsub and websocket, singletons
2018-09-11 17:49:56 +02:00
Denis Arh
b04a681d81
Attachment serving
2018-09-10 12:25:36 +02:00
Denis Arh
e351c73a0a
Serve attachment info alongside with message (rest & ws)
2018-09-09 13:09:56 +02:00
Denis Arh
5befc50a95
Subscribe user to the channel he just created
2018-09-03 08:27:37 +02:00
Tit Petric
16cc7a11f3
upd(all): restructure cmd, flags, startups
2018-08-23 11:15:23 +02:00
Tit Petric
a46b4fbf93
upd(sam): pubsub events with redis option
2018-08-21 13:05:08 +02:00
Tit Petric
9959ce8fba
fix(sam): go vet fix for ptr receiver
2018-08-15 18:15:12 +02:00
Denis Arh
79ca22b9a8
Use id instead of cid in JSON fields for incomming messages
2018-08-07 21:31:44 +02:00
Denis Arh
636d2c05c7
Support for channel add through WS
2018-08-07 21:11:42 +02:00
Denis Arh
f61b706559
Implements lst of users + active state
2018-08-07 19:35:14 +02:00
Denis Arh
94aed69d37
Move EventQueueItem under types package
2018-08-05 23:35:55 +02:00
Denis Arh
80f1c78eed
Rename WS session files
2018-08-05 23:32:55 +02:00
Denis Arh
baae815899
Implement event loop
2018-08-05 22:14:45 +02:00
Tit Petric
463afa77d0
upd(websocket): clean up main loop, expect encoded payloads
2018-07-30 00:38:06 +02:00
Tit Petric
0b8b11555a
rename to fit structure
2018-07-30 00:15:09 +02:00
Denis Arh
5a347dddb5
Types structs reduced & simplified
2018-07-29 16:37:41 +02:00
Denis Arh
a5df66e5e1
Setting channel topic & renaming
2018-07-29 02:05:32 +02:00
Denis Arh
99eac17751
Add created/updated fields for new & updated messages
2018-07-29 01:19:42 +02:00
Denis Arh
66d7cd7193
Add connected/disconnected messages
2018-07-29 01:06:36 +02:00
Denis Arh
34bf58d5b1
Simplify outgoing message encoding with json.Marshaler
2018-07-29 01:03:44 +02:00
Denis Arh
926005d2cc
Rework channel-related commants, sending messages
2018-07-28 17:49:41 +02:00
Denis Arh
4e215e64d3
Improve websocket request handling (value of a concret request instead of ptr to payload)
...
Each request handler (eg channelJoin()) now takes a specific params as a value (eg incoming.ChannelJoin)
2018-07-28 14:32:15 +02:00
Denis Arh
99d38e5068
Fix vet issues
2018-07-28 12:20:55 +02:00
Denis Arh
99401065a7
Add channel to delete message
2018-07-28 11:20:44 +02:00
Denis Arh
52dbc4c0c3
Fix naming (Id -> ID), add names to interface arguments
2018-07-26 20:29:09 +02:00
Denis Arh
d886a98740
Implements JWT authorization along with some refactoring
...
- introduces auth package, for common (sam, crm) auth handlers
- routes are now generated inside server package, each handler got its own MountRoutes(r chi.Router, middlewares ...func(http.Handler) http.Handler)
- there MountRoute methods are now called from non-generated code so we can inject services to (rest) controllers
2018-07-26 20:12:14 +02:00
Tit Petric
faeec5e21d
upd(websocket): implement more websocket apis, structs
2018-07-26 00:06:52 +02:00