gocast
gocast copied to clipboard
IPraktikum gocast API/v2
API/v2
Motivation and Context
This PR implements the current state of the new gocast gRPC API/v2 used by gocast mobile as part of the iPraktikum. You can find a detailled documentation of all currently implemented gRPC methods in our Postman collection.
NOTE: This PR is currently only used to deploy the API/v2 on a test-server, feel free to review it, if you want, but please don't merge it yet.
Description
- Add user endpoints
- Add notification endpoints
- Add course endpoints
- Add stream endpoints
- Add push notifications using Firebase Cloud Messaging when a VoD is uploaded
Files changed outside the api_v2 dir:
Changes related to push notifications:
For the push notifications, we went with Firebase Cloud Messaging, as it is also used by the TUM Campus APP. If you want to enable push notifications, see this setup guide (TL;DR: Add the fcmServerKey entry to the config.yaml and you're good to go).
-
api/worker_grpc.go
Expose port 12544 for gRPC API/v2:
Steps for Testing
See Postman collection for different test cases for each gRPC method.
NOTE: As of now, the API/v2 has only been tested manually with the test cases that can be found on Postman; unit tests will be added over the next couple of weeks.
Your Testserver will be ready at https://1279.test.live.mm.rbg.tum.de in a few minutes.
Logins
| Kurs1 | Kurs2 | Kurs3 | Kurs4 |
|---|---|---|---|
| public | public | loggedin | enrolled |
| prof1 | prof1 | prof2 | prof1 prof2 |
| student1 student2 student3 |
student1 student2 |
student2 student3 |
student1 student2 |