diff --git a/.env b/.env
index 4855d5b5..132f9c97 100644
--- a/.env
+++ b/.env
@@ -1,10 +1,17 @@
+ENVIRONMENT=dev
DB_NAME=campus_db
DB_ROOT_PASSWORD=secret_root_password
DB_PORT=3306
+
APNS_KEY_ID=
APNS_TEAM_ID=
APNS_P8_FILE_PATH=/secrets/AuthKey_XXXX.p8
-ENVIRONMENT=dev
-
SENTRY_DSN=
+
+CAMPUS_API_TOKEN=
+
+SMTP_PASSWORD=
+SMTP_URL=
+SMTP_USERNAME=
+SMTP_PORT=
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 1689fa86..d2ed4b49 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -10,7 +10,7 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
@@ -31,3 +31,6 @@ jobs:
- run: bash server/api/installBuf.bash
- name: pre-commit
uses: pre-commit/action@v3.0.0
+ - uses: ls-lint/action@v2.0.1
+ with:
+ config: .ls-lint.yaml
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 48d0b6b6..56123e25 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -8,7 +8,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
@@ -22,10 +22,10 @@ jobs:
needs: [test]
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Docker meta
id: meta
- uses: docker/metadata-action@v4
+ uses: docker/metadata-action@v5
with:
images: ghcr.io/tum-dev/campus-backend/backend-server
tags: |
@@ -38,15 +38,15 @@ jobs:
prefix=
suffix=
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
+ uses: docker/setup-buildx-action@v3
- name: Login to registry
- uses: docker/login-action@v2
+ uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
- uses: docker/build-push-action@v4
+ uses: docker/build-push-action@v5
with:
context: server
pull: true
diff --git a/.ls-lint.yaml b/.ls-lint.yaml
new file mode 100644
index 00000000..24d29197
--- /dev/null
+++ b/.ls-lint.yaml
@@ -0,0 +1,8 @@
+ls:
+ .dir: lowercase
+ .pb.gw.go: snake_case
+ .pb.go: snake_case
+ .go: snake_case
+
+ignore:
+ - swagger
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index ab232802..74504554 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -30,10 +30,10 @@ repos:
language: system
pass_filenames: false
stages: [commit]
- - id: go-mod-tidy-client
- name: Check if go.mod and go.sum are up to date for server
- files: server/
- entry: sh -c "(cd client && go mod tidy)"
- language: system
- pass_filenames: false
- stages: [commit]
+ #- id: go-mod-tidy-client
+ # name: Check if go.mod and go.sum are up to date for client
+ # files: server/
+ # entry: sh -c "(cd client && go get github.com/TUM-Dev/Campus-Backend/server && go mod tidy)"
+ # language: system
+ # pass_filenames: false
+ # stages: [commit]
diff --git a/README.md b/README.md
index 9617731c..350490e2 100644
--- a/README.md
+++ b/README.md
@@ -78,8 +78,7 @@ docker compose up -d
```
The docker compose will start the server and a mariadb instance.
The server will be available at `localhost:50051` and the mariadb instance at `localhost:3306`.
-Additionally, docker creates the volume `campus-db-data` and `campus-influxdb-data`
-to persist the data of the mariadb and influxdb instances.
+Additionally, docker creates the volume `campus-db-data` to persist the data of the mariadb instances.
### Setting up the Database
The mariadb schema can be installed by executing the following command inside the mariadb container:
@@ -93,25 +92,15 @@ The following environment variables need to be set for the server to work proper
* [REQUIRED] `DB_ROOT_PASSWORD`: The password of the root user.
* [OPTIONAL] `DB_PORT`: The port of the database server. Defaults to `3306`.
* [OPTIONAL] `SENTRY_DSN`: The Sentry [Data Source Name](https://sentry-docs-git-patch-1.sentry.dev/product/sentry-basics/dsn-explainer/) for reporting issues and crashes.
-* **[InfluxDB [OPTIONAL]](#influxdb)**:
- * [OPTIONAL] `INFLUXDB_USER`: The InfluxDB username to set for the systems initial superuser.
- * [OPTIONAL] `INFLUXDB_PASSWORD`: The InfluxDB password to set for the systems initial superuser.
- * [OPTIONAL] `INFLUXDB_ORG`: The InfluxDB organization to set for the systems initial organization.
- * [OPTIONAL] `INFLUXDB_BUCKET`: The InfluxDB bucket to set for the systems initial bucket.
- * [REQUIRED] `INFLUXDB_URL`: The InfluxDB URL to use for writing metrics.
- * [REQUIRED] `INFLUXDB_ADMIN_TOKEN`: The InfluxDB admin token to use for authenticating with the InfluxDB server. If set initially the system will associate the token with the initial superuser.
* **[iOS Push Notification Service [OPTIONAL]](#ios-push-notifications-service)**:
* [REQUIRED] `APNS_KEY_ID`: The key ID of the APNs key => APNs Key needs to be downloaded from the Apple Developer Portal the name of the file also contains the key ID.
* [REQUIRED] `APNS_TEAM_ID`: The team ID of the iOS app can be found in AppStoreConnect.
* [REQUIRED] `APNS_P8_FILE_PATH`: The path to the APNs key file (e.g. `/secrets/AuthKey_XXXX.p8`) in the docker container. The file itself needs to exist in the same directory as the `docker-compose.yml` file and called `apns_auth_key.p8`.
+ * [REQUIRED] `CAMPUS_API_TOKEN`: A token used to authenticate with TUMonline (used for example for the grades)
-## InfluxDB
-InfluxDB can be used to store metrics.
-
-If an InfluxDB instance is already set up, just the `INFLUXDB_URL` and the `INFLUXDB_ADMIN_TOKEN` environment variable needs to be set
-to enable the metrics endpoint.
-All the other environment variables are optional and only needed if the InfluxDB instance needs to be set up.
-If `INFLUXDB_URL` or `INFLUXDB_ADMIN_TOKEN` are not set, the metrics endpoint will be disabled.
+## Metrics
+Our service uses prometheus to collect metrics to display in grafana.
+To see the metrics we aggregate, head over to `http://localhost:50051/metrics`
## iOS Push Notifications Service
The iOS Push Notifications Service can be used to send push notifications to iOS devices.
diff --git a/client/README.md b/client/README.md
index 0a487f6b..4b92a571 100644
--- a/client/README.md
+++ b/client/README.md
@@ -5,5 +5,5 @@ standard system TLS CA's configured to securely connect via `api-grpc.tum.app` t
Alternatively you can also test the API using [grpcurl](https://github.com/fullstorydev/grpcurl) (also located in the `testLiveApi.sh`):
```
-grpcurl -protoset <(buf build -o -) -H "x-device-id:grpc-tests" api-grpc.tum.app:443 api.Campus/GetNewsSources
+grpcurl -protoset <(buf build -o -) -H "x-device-id:grpc-tests" api-grpc.tum.app:443 api.Campus/ListNewsSources
```
diff --git a/client/go.mod b/client/go.mod
index 2dd88216..ccac2926 100644
--- a/client/go.mod
+++ b/client/go.mod
@@ -3,19 +3,19 @@ module github.com/TUM-Dev/Campus-Backend/client
go 1.21
require (
- github.com/TUM-Dev/Campus-Backend/server v0.0.0-20230913203125-6bbe13013fa5
+ github.com/TUM-Dev/Campus-Backend/server v0.0.0-20231009133538-1a7f37e5f27c
github.com/sirupsen/logrus v1.9.3
- google.golang.org/grpc v1.58.0
- google.golang.org/protobuf v1.31.0
+ google.golang.org/grpc v1.58.2
)
require (
github.com/golang/protobuf v1.5.3 // indirect
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.1 // indirect
- golang.org/x/net v0.14.0 // indirect
- golang.org/x/sys v0.11.0 // indirect
- golang.org/x/text v0.12.0 // indirect
- google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
- google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect
+ golang.org/x/net v0.17.0 // indirect
+ golang.org/x/sys v0.13.0 // indirect
+ golang.org/x/text v0.13.0 // indirect
+ google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb // indirect
+ google.golang.org/protobuf v1.31.0 // indirect
)
diff --git a/client/go.sum b/client/go.sum
index 128161a1..446d3bea 100644
--- a/client/go.sum
+++ b/client/go.sum
@@ -1,5 +1,5 @@
-github.com/TUM-Dev/Campus-Backend/server v0.0.0-20230913203125-6bbe13013fa5 h1:/yMB5hJjFjEPB/HVP6wLTJWGqoCqQksXke+DiV2xUWY=
-github.com/TUM-Dev/Campus-Backend/server v0.0.0-20230913203125-6bbe13013fa5/go.mod h1:7XoRdXmxK852GxcyraiovgyS5z/eZ9wsofV9on7wvGQ=
+github.com/TUM-Dev/Campus-Backend/server v0.0.0-20231009133538-1a7f37e5f27c h1:mk107j91labFDRf5kN3MKJIZpw4Xn63ou27qrygAkKQ=
+github.com/TUM-Dev/Campus-Backend/server v0.0.0-20231009133538-1a7f37e5f27c/go.mod h1:wrzx8AE9r2dpCuXTcm36XIUQLBAnOH21Hsnt0mpxPbQ=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -11,8 +11,8 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.1 h1:LSsiG61v9IzzxMkqEr6nrix4miJI62xlRjwT7BYD2SM=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.1/go.mod h1:Hbb13e3/WtqQ8U5hLGkek9gJvBLasHuPFI0UEGfnQ10=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
@@ -21,22 +21,22 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
-golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
-golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
+golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
+golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
-golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc=
-golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
+golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
+golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
+golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g=
-google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8=
-google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d h1:DoPTO70H+bcDXcd39vOqb2viZxgqeBeSGtZ55yZU4/Q=
-google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
-google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o=
-google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
+google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb h1:XFBgcDwm7irdHTbz4Zk2h7Mh+eis4nfJEFQFYzJzuIA=
+google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4=
+google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI=
+google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb h1:Isk1sSH7bovx8Rti2wZK0UZF6oraBDK74uoyLEEVFN0=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
+google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I=
+google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
diff --git a/client/localServer/client.go b/client/local/client.go
similarity index 75%
rename from client/localServer/client.go
rename to client/local/client.go
index 813c8ae7..88df04ca 100644
--- a/client/localServer/client.go
+++ b/client/local/client.go
@@ -19,10 +19,10 @@ import (
const (
localAddress = "127.0.0.1:50051"
- testImage = "./localServer/images/sampleimage.jpeg"
+ testImage = "./local/images/sampleimage.jpeg"
)
-// main connects to a seperatly started local server and creates ratings for both, cafeterias and dishes.
+// main connects to a seperatly started local server and creates ratings for both, canteens and dishes.
// Afterwards, they are queried and displayed on the console
func main() {
// Set up a connection to the local server.
@@ -38,7 +38,7 @@ func main() {
canteenHeadCount(c, ctx)
- cafeteriaRatingTools(c, ctx)
+ canteenRatingTools(c, ctx)
}
@@ -54,28 +54,28 @@ func canteenHeadCount(c pb.CampusClient, ctx context.Context) {
}
}
-func cafeteriaRatingTools(c pb.CampusClient, ctx context.Context) {
+func canteenRatingTools(c pb.CampusClient, ctx context.Context) {
- currentCafeteria := "MENSA_GARCHING"
+ currentCanteen := "MENSA_GARCHING"
currentDish := "Vegane rote Grütze mit Soja-Vanillesauce" //must be in the dish table
- generateDishRating(c, ctx, currentCafeteria, currentDish, 3)
- generateCafeteriaRating(c, ctx, currentCafeteria, 2)
- queryCafeteria(currentCafeteria, c, ctx, true)
- queryDish(currentCafeteria, currentDish, c, ctx, false)
- generateCafeteriaRating(c, ctx, currentCafeteria, 2)
- generateCafeteriaRating(c, ctx, currentCafeteria, 2)
- generateDishRating(c, ctx, currentCafeteria, currentDish, 1)
+ generateDishRating(c, ctx, currentCanteen, currentDish, 3)
+ generateCanteenRating(c, ctx, currentCanteen, 2)
+ queryCanteen(currentCanteen, c, ctx, true)
+ queryDish(currentCanteen, currentDish, c, ctx, false)
+ generateCanteenRating(c, ctx, currentCanteen, 2)
+ generateCanteenRating(c, ctx, currentCanteen, 2)
+ generateDishRating(c, ctx, currentCanteen, currentDish, 1)
- queryCafeteria(currentCafeteria, c, ctx, false)
- queryDish(currentCafeteria, currentDish, c, ctx, false)
+ queryCanteen(currentCanteen, c, ctx, false)
+ queryDish(currentCanteen, currentDish, c, ctx, false)
}
-func queryDish(cafeteria string, dish string, c pb.CampusClient, ctx context.Context, imageShouldBeStored bool) {
- res, err := c.GetDishRatings(ctx, &pb.DishRatingRequest{
- Dish: dish,
- CafeteriaId: cafeteria,
- Limit: 3,
+func queryDish(canteen string, dish string, c pb.CampusClient, ctx context.Context, imageShouldBeStored bool) {
+ res, err := c.GetDishRatings(ctx, &pb.GetDishRatingsRequest{
+ Dish: dish,
+ CanteenId: canteen,
+ Limit: 3,
})
if err != nil {
@@ -129,10 +129,10 @@ func queryDish(cafeteria string, dish string, c pb.CampusClient, ctx context.Con
}
}
-func queryCafeteria(s string, c pb.CampusClient, ctx context.Context, imageShouldBeStored bool) {
- res, err := c.GetCafeteriaRatings(ctx, &pb.CafeteriaRatingRequest{
- CafeteriaId: s,
- Limit: 3,
+func queryCanteen(s string, c pb.CampusClient, ctx context.Context, imageShouldBeStored bool) {
+ res, err := c.ListCanteenRatings(ctx, &pb.ListCanteenRatingsRequest{
+ CanteenId: s,
+ Limit: 3,
// From: timestamppb.New(time.Date(2022, 7, 8, 16, 0, 0, 0, time.Local)),
// To: timestamppb.New(time.Date(2022, 7, 8, 17, 0, 0, 0, time.Local)),
})
@@ -178,7 +178,7 @@ func queryCafeteria(s string, c pb.CampusClient, ctx context.Context, imageShoul
}
}
-func generateCafeteriaRating(c pb.CampusClient, ctx context.Context, cafeteria string, rating int32) {
+func generateCanteenRating(c pb.CampusClient, ctx context.Context, canteen string, rating int32) {
y := make([]*pb.RatingTag, 2)
y[0] = &pb.RatingTag{
Points: float64(1 + rating),
@@ -189,12 +189,12 @@ func generateCafeteriaRating(c pb.CampusClient, ctx context.Context, cafeteria s
TagId: 2,
}
- _, err := c.NewCafeteriaRating(ctx, &pb.NewCafeteriaRatingRequest{
- Points: rating,
- CafeteriaId: cafeteria,
- Comment: "Alles super, 2 Sterne",
- RatingTags: y,
- Image: getImageToBytes(testImage),
+ _, err := c.CreateCanteenRating(ctx, &pb.CreateCanteenRatingRequest{
+ Points: rating,
+ CanteenId: canteen,
+ Comment: "Alles super, 2 Sterne",
+ RatingTags: y,
+ Image: getImageToBytes(testImage),
})
if err != nil {
@@ -204,7 +204,7 @@ func generateCafeteriaRating(c pb.CampusClient, ctx context.Context, cafeteria s
}
}
-func generateDishRating(c pb.CampusClient, ctx context.Context, cafeteria string, dish string, rating int32) {
+func generateDishRating(c pb.CampusClient, ctx context.Context, canteen string, dish string, rating int32) {
y := make([]*pb.RatingTag, 3)
y[0] = &pb.RatingTag{
Points: float64(1 + rating),
@@ -219,13 +219,13 @@ func generateDishRating(c pb.CampusClient, ctx context.Context, cafeteria string
TagId: 3,
}
- _, err := c.NewDishRating(ctx, &pb.NewDishRatingRequest{
- Points: rating,
- CafeteriaId: cafeteria,
- Dish: dish,
- Comment: "Alles Hähnchen",
- RatingTags: y,
- Image: getImageToBytes(testImage),
+ _, err := c.CreateDishRating(ctx, &pb.CreateDishRatingRequest{
+ Points: rating,
+ CanteenId: canteen,
+ Dish: dish,
+ Comment: "Alles Hähnchen",
+ RatingTags: y,
+ Image: getImageToBytes(testImage),
})
if err != nil {
@@ -285,17 +285,14 @@ func storeImage(path string, i []byte) (string, error) {
}
}
- out, errFile := os.Create(imgPath)
- if errFile != nil {
- log.WithError(errFile).Error("Unable to create the new testfile")
+ out, err := os.Create(imgPath)
+ if err != nil {
+ log.WithError(err).Error("Unable to create the new testfile")
}
defer func(out *os.File) {
if err := out.Close(); err != nil {
log.WithError(err).Error("File was not closed successfully")
}
}(out)
- var opts jpeg.Options
- opts.Quality = 100
- errFile = jpeg.Encode(out, img, &opts)
- return imgPath, errFile
+ return imgPath, jpeg.Encode(out, img, &jpeg.Options{Quality: 100})
}
diff --git a/client/localServer/images/sampleimage.jpeg b/client/local/images/sampleimage.jpeg
similarity index 100%
rename from client/localServer/images/sampleimage.jpeg
rename to client/local/images/sampleimage.jpeg
diff --git a/client/publicServer/client.go b/client/public/client.go
similarity index 91%
rename from client/publicServer/client.go
rename to client/public/client.go
index 24a78d75..53eaaa30 100644
--- a/client/publicServer/client.go
+++ b/client/public/client.go
@@ -10,7 +10,6 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
- "google.golang.org/protobuf/types/known/emptypb"
)
const (
@@ -43,7 +42,7 @@ func main() {
ctx = metadata.NewOutgoingContext(ctx, md)
log.Info("Trying to fetch top news")
- if r, err := c.GetTopNews(ctx, &emptypb.Empty{}); err != nil {
+ if r, err := c.ListNews(ctx, &pb.ListNewsRequest{}); err != nil {
log.WithError(err).Fatal("could not greet")
} else {
log.WithField("topNewsResponse", r.String()).Info("fetched top news successfully")
diff --git a/client/testLiveApi.sh b/client/testLiveApi.sh
index 9a798bc6..d4bcf606 100755
--- a/client/testLiveApi.sh
+++ b/client/testLiveApi.sh
@@ -1,3 +1,3 @@
#!/bin/bash
-grpcurl -protoset <(buf build -o -) -plaintext -H "x-device-id:grpc-tests" api.tum.app:50052 api.Campus/GetNewsSources
+grpcurl -protoset <(buf build -o -) -plaintext -H "x-device-id:grpc-tests" api.tum.app:50052 api.Campus/ListNewsSources
diff --git a/deployment/charts/backend/files/envoy.yaml b/deployment/charts/backend/files/envoy.yaml
new file mode 100644
index 00000000..b81cf80d
--- /dev/null
+++ b/deployment/charts/backend/files/envoy.yaml
@@ -0,0 +1,59 @@
+admin:
+ address:
+ socket_address:
+ address: 0.0.0.0
+ port_value: 9901
+static_resources:
+ listeners:
+ - name: listener_0
+ address:
+ socket_address:
+ address: 0.0.0.0
+ port_value: 8081
+ filter_chains:
+ - filters:
+ - name: envoy.http_connection_manager
+ typed_config:
+ "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
+ codec_type: auto
+ stat_prefix: ingress_http
+ route_config:
+ name: local_route
+ virtual_hosts:
+ - name: local_service
+ domains: ["*"]
+ routes:
+ - match: { prefix: "/" }
+ route: { cluster: campus_service }
+ cors:
+ allow_origin_string_match:
+ - prefix: "*"
+ allow_methods: GET, DELETE, POST
+ allow_headers: "*"
+ max_age: "86400"
+ expose_headers: custom-header-1,grpc-status,grpc-message
+ http_filters:
+ - name: envoy.grpc_web
+ typed_config:
+ "@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb
+ - name: envoy.filters.http.cors
+ typed_config:
+ "@type": type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors
+ - name: envoy.filters.http.router
+ typed_config:
+ "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
+ clusters:
+ - name: campus_service
+ connect_timeout: 0.25s
+ type: LOGICAL_DNS
+ http2_protocol_options: {}
+ lb_policy: ROUND_ROBIN
+ load_assignment:
+ cluster_name: campus_service
+ endpoints:
+ - lb_endpoints:
+ - endpoint:
+ address:
+ socket_address:
+ address: localhost
+ port_value: 50051
diff --git a/deployment/charts/backend/templates/deployments/backend-v1.yaml b/deployment/charts/backend/templates/deployments/backend-v1.yaml
index 5d572c7e..fdf2b976 100644
--- a/deployment/charts/backend/templates/deployments/backend-v1.yaml
+++ b/deployment/charts/backend/templates/deployments/backend-v1.yaml
@@ -40,18 +40,6 @@ spec:
- name: logs
emptyDir: { }
containers:
- - name: access-legacybackend
- image: busybox:1.36
- args: [/bin/sh, -c, 'tail -n+1 -F /var/log/apache2/access.log']
- volumeMounts:
- - name: logs
- mountPath: /var/log
- - name: error-legacybackend
- image: busybox:1.36
- args: [/bin/sh, -c, 'tail -n+1 -F /var/log/apache2/error.log']
- volumeMounts:
- - name: logs
- mountPath: /var/log
- name: tca-legacybackend
image: ghcr.io/kordianbruck/tca-backend/tca-server:{{ $.Values.tag }}
imagePullPolicy: Always
@@ -75,6 +63,18 @@ spec:
name: https
securityContext:
readOnlyRootFilesystem: true
+ - name: access-legacybackend
+ image: busybox:1.36
+ args: [/bin/sh, -c, 'tail -n+1 -F /var/log/apache2/access.log']
+ volumeMounts:
+ - name: logs
+ mountPath: /var/log
+ - name: error-legacybackend
+ image: busybox:1.36
+ args: [/bin/sh, -c, 'tail -n+1 -F /var/log/apache2/error.log']
+ volumeMounts:
+ - name: logs
+ mountPath: /var/log
imagePullSecrets:
- name: regcred
---
diff --git a/deployment/charts/backend/templates/deployments/backend-v2.yaml b/deployment/charts/backend/templates/deployments/backend-v2.yaml
index f037f8f9..4ff23739 100644
--- a/deployment/charts/backend/templates/deployments/backend-v2.yaml
+++ b/deployment/charts/backend/templates/deployments/backend-v2.yaml
@@ -32,6 +32,9 @@ spec:
- name: backend-api-keys
secret:
secretName: backend-api-keys
+ - name: backend-grpc-web-config
+ configMap:
+ name: backend-grpc-web-config
containers:
- name: tca-backend
image: ghcr.io/tum-dev/campus-backend/backend-server:{{ $.Values.tag }}
@@ -40,7 +43,7 @@ spec:
- name: ENVIRONMENT
value: prod
- name: MensaCronDisabled
- value: "false"
+ value: "true"
- name: APNS_P8_FILE_PATH
value: /etc/apns_auth_key.p8
- name: SENTRY_DSN
@@ -48,6 +51,11 @@ spec:
secretKeyRef:
name: backend-api-keys
key: SENTRY_DSN
+ - name: CAMPUS_API_TOKEN
+ valueFrom:
+ secretKeyRef:
+ name: backend-api-keys
+ key: CAMPUS_API_TOKEN
- name: DB_DSN
value: "{{ $db.username }}:{{ $db.password }}@tcp(tca-backend-mariadb.{{ $.Values.namespace }}.svc.cluster.local:3306)/{{ $db.database }}?charset=utf8mb4&parseTime=True&loc=Local"
- name: APNS_KEY_ID
@@ -79,20 +87,54 @@ spec:
resources:
requests:
cpu: 1000m
- memory: 50Mi
+ memory: 100Mi
limits:
- memory: 200Mi
+ memory: 500Mi
livenessProbe:
httpGet:
path: /health
port: http
- failureThreshold: 1
+ failureThreshold: 5
periodSeconds: 1
startupProbe:
httpGet:
path: /health
port: http
- failureThreshold: 20
+ failureThreshold: 60
+ periodSeconds: 1
+ - name: grpc-web-proxy
+ image: envoyproxy/envoy:v1.27-latest
+ imagePullPolicy: IfNotPresent
+ args:
+ - --config-path
+ - /etc/envoy/envoy.yaml
+ - --service-cluster
+ - backend-v2
+ - --service-node
+ - backend-v2
+ - --log-level
+ - info
+ ports:
+ - containerPort: 8081
+ name: http
+ - containerPort: 9901
+ name: admin
+ volumeMounts:
+ - mountPath: /etc/envoy/envoy.yaml
+ subPath: envoy.yaml
+ name: backend-grpc-web-config
+ readOnly: true
+ livenessProbe:
+ httpGet:
+ path: /ready
+ port: admin
+ failureThreshold: 5
+ periodSeconds: 1
+ startupProbe:
+ httpGet:
+ path: /ready
+ port: admin
+ failureThreshold: 60
periodSeconds: 1
---
apiVersion: v1
@@ -105,7 +147,20 @@ metadata:
app.kubernetes.io/part-of: tum-campus-app
app.kubernetes.io/name: backend-v2
data:
+ CAMPUS_API_TOKEN: {{ $.Values.backend.campusApiToken | b64enc }}
SENTRY_DSN: {{ $.Values.backend.sentry.dsn | b64enc }}
apns_auth_key.p8: {{ $.Values.backend.apns.auth_key }}
APNS_KEY_ID: {{ $.Values.backend.apns.key_id | b64enc }}
APNS_TEAM_ID: {{ $.Values.backend.apns.team_id | b64enc }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: backend-grpc-web-config
+ namespace: {{ $.Values.namespace }}
+ labels:
+ app.kubernetes.io/part-of: tum-campus-app
+ app.kubernetes.io/name: backend-v2
+data:
+ envoy.yaml: |-
+{{ .Files.Get "files/envoy.yaml" | indent 4 }}
diff --git a/deployment/charts/backend/templates/networking/cors-middleware.yaml b/deployment/charts/backend/templates/networking/cors-middleware.yaml
new file mode 100644
index 00000000..f42b1674
--- /dev/null
+++ b/deployment/charts/backend/templates/networking/cors-middleware.yaml
@@ -0,0 +1,19 @@
+apiVersion: traefik.containo.us/v1alpha1
+kind: Middleware
+metadata:
+ name: cors
+ labels:
+ app.kubernetes.io/part-of: tum-campus-app
+ namespace: {{ $.Values.namespace }}
+spec:
+ headers:
+ accessControlAllowMethods:
+ - GET
+ - DELETE
+ - POST
+ accessControlAllowHeaders:
+ - "*"
+ accessControlAllowOriginList:
+ - "*"
+ accessControlMaxAge: 86400
+ addVaryHeader: true
diff --git a/deployment/charts/backend/templates/networking/https-cert.yaml b/deployment/charts/backend/templates/networking/https-cert.yaml
index 23baa6d5..bb0d086c 100644
--- a/deployment/charts/backend/templates/networking/https-cert.yaml
+++ b/deployment/charts/backend/templates/networking/https-cert.yaml
@@ -12,6 +12,6 @@ spec:
name: letsencrypt-production
kind: ClusterIssuer
dnsNames:
-{{- range $host := concat $.Values.urls.v1 $.Values.urls.v2 }}
+{{- range $host := concat $.Values.urls.v1 $.Values.urls.v2 $.Values.urls.v2WebGrpc }}
- {{ $host }}
{{ end }}
diff --git a/deployment/charts/backend/templates/networking/ingress.yaml b/deployment/charts/backend/templates/networking/ingress.yaml
index cf8ca47d..0932f040 100644
--- a/deployment/charts/backend/templates/networking/ingress.yaml
+++ b/deployment/charts/backend/templates/networking/ingress.yaml
@@ -16,11 +16,22 @@ spec:
port: 80
- kind: Rule
match: Host(`{{ join "`) || Host(`" $.Values.urls.v2 }}`)
+ middlewares:
+ - name: cors
services:
- name: backend-v2-svc
port: 50051
+ - kind: Rule
+ match: Host(`{{ join "`) || Host(`" $.Values.urls.v2WebGrpc }}`)
+ middlewares:
+ - name: cors
+ services:
+ - name: backend-v2-svc
+ port: 8081
- kind: Rule
match: (Host(`{{ join "`) || Host(`" $.Values.urls.v2 }}`)) && Headers(`Content-Type`, `application/grpc`)
+ middlewares:
+ - name: cors
services:
- name: backend-v2-svc
port: 50051
@@ -40,7 +51,7 @@ spec:
- web
routes:
- kind: Rule
- match: Host(`{{ join "`) || Host(`" (concat $.Values.urls.v1 $.Values.urls.v2) }}`)
+ match: Host(`{{ join "`) || Host(`" (concat $.Values.urls.v1 $.Values.urls.v2 $.Values.urls.v2WebGrpc) }}`)
services:
- name: noop@internal
kind: TraefikService
diff --git a/deployment/charts/backend/templates/networking/service.yaml b/deployment/charts/backend/templates/networking/service.yaml
index 24828299..3c99fbbe 100644
--- a/deployment/charts/backend/templates/networking/service.yaml
+++ b/deployment/charts/backend/templates/networking/service.yaml
@@ -15,6 +15,9 @@ spec:
- name: http
port: 50051
targetPort: 50051
+ - name: grpc-web
+ port: 8081
+ targetPort: 8081
---
apiVersion: v1
kind: Service
diff --git a/deployment/charts/backend/values.yaml b/deployment/charts/backend/values.yaml
index ec5d6476..68c26483 100644
--- a/deployment/charts/backend/values.yaml
+++ b/deployment/charts/backend/values.yaml
@@ -9,8 +9,9 @@ urls:
- tumcabe.in.tum.de
v2:
- api-test-v2.tum.app
- - api-grpc.tum.app
- api.tum.app
+ v2WebGrpc:
+ - api-grpc.tum.app
# see https://github.com/bitnami/charts/tree/main/bitnami/mariadb for more options, the se are just the most important ones
mariadb:
@@ -41,6 +42,7 @@ mariadb:
backend:
+ campusApiToken: changeme-changeme-changeme
sentry:
dsn: changeme-changeme-changeme
apns:
diff --git a/docker-compose.yaml b/docker-compose.yaml
index a7d45018..9bc5cc4a 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -1,6 +1,5 @@
services:
backend:
- container_name: campus-backend
image: ghcr.io/tum-dev/campus-backend/backend-server:latest
restart: always
build:
@@ -16,7 +15,13 @@ services:
- APNS_KEY_ID=${APNS_KEY_ID}
- APNS_TEAM_ID=${APNS_TEAM_ID}
- APNS_P8_FILE_PATH=${APNS_P8_FILE_PATH}
- - MensaCronDisabled=false
+ - MensaCronDisabled=true
+ - OMDB_API_KEY=${OMDB_API_KEY}
+ - CAMPUS_API_TOKEN=${CAMPUS_API_TOKEN}
+ - SMTP_PASSWORD=${SMTP_PASSWORD}
+ - SMTP_URL=${SMTP_URL:-postout.lrz.de}
+ - SMTP_USERNAME=${SMTP_USERNAME:-tca-support.os.in@tum.de}
+ - SMTP_PORT=${SMTP_PORT:-587}
volumes:
- backend-storage:/Storage
- ./apns_auth_key.p8:${APNS_P8_FILE_PATH}
@@ -26,7 +31,6 @@ services:
condition: service_healthy
db:
- container_name: campus-db
image: bitnami/mariadb:latest
ports:
- ${DB_PORT:-3306}:3306
@@ -41,6 +45,35 @@ services:
interval: 15s
timeout: 5s
retries: 6
+ # The following code can be used to test the envoy proxy locally
+ # The reason why this is commented out is that this working requires the following change:
+ #
+ # ./deployment/charts/backend/files/envoy.yaml
+ # socket_address:
+ # - address: localhost
+ # + address: backend
+ # port_value: 50051
+ #
+ #grpc-web:
+ # image: envoyproxy/envoy:v1.27-latest
+ # restart: always
+ # command:
+ # - /docker-entrypoint.sh
+ # - --config-path
+ # - /etc/envoy/envoy.yaml
+ # - --service-cluster
+ # - backend-v2
+ # - --service-node
+ # - backend-v2
+ # - --log-level
+ # - info
+ # ports:
+ # - 8081:8081
+ # - 9901:9901
+ # volumes:
+ # - ./deployment/charts/backend/files/envoy.yaml:/etc/envoy/envoy.yaml
+ # depends_on:
+ # - backend
volumes:
campus-db-data:
diff --git a/server/api/generate.bash b/server/api/generate.bash
index 1e0c93e7..3877b37e 100755
--- a/server/api/generate.bash
+++ b/server/api/generate.bash
@@ -6,6 +6,7 @@ echo making sure that this script is run from $BASEDIR
pushd $BASEDIR > /dev/null
echo updating the generated files
+export PATH="$PATH:$(go env GOPATH)/bin"
buf mod update || exit 1
buf generate || exit 1
@@ -17,8 +18,9 @@ rm -f google/api/*.go
rm -f google/api/*.swagger.json
echo maing sure that the generated files are formatted
-go fmt tumdev/*.go
-goimports -w tumdev/*.go
+go fmt tumdev/*.go || exit 1
+goimports -w tumdev/*.go || exit 1
+buf format -w --path tumdev || exit 1
# clean up the stack
popd > /dev/null
diff --git a/server/api/tumdev/campus_backend.pb.go b/server/api/tumdev/campus_backend.pb.go
index bad3746d..db845a21 100644
--- a/server/api/tumdev/campus_backend.pb.go
+++ b/server/api/tumdev/campus_backend.pb.go
@@ -13,7 +13,6 @@ import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- emptypb "google.golang.org/protobuf/types/known/emptypb"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
@@ -73,18 +72,66 @@ func (DeviceType) EnumDescriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{0}
}
-type RegisterDeviceRequest struct {
+type CreateFeedbackRequest_Recipient int32
+
+const (
+ // Feedback for the TUM Dev Team
+ CreateFeedbackRequest_TUM_DEV CreateFeedbackRequest_Recipient = 0
+ // Feedback for the general TUM Contact Form
+ CreateFeedbackRequest_TUM_CONTACT CreateFeedbackRequest_Recipient = 1
+)
+
+// Enum value maps for CreateFeedbackRequest_Recipient.
+var (
+ CreateFeedbackRequest_Recipient_name = map[int32]string{
+ 0: "TUM_DEV",
+ 1: "TUM_CONTACT",
+ }
+ CreateFeedbackRequest_Recipient_value = map[string]int32{
+ "TUM_DEV": 0,
+ "TUM_CONTACT": 1,
+ }
+)
+
+func (x CreateFeedbackRequest_Recipient) Enum() *CreateFeedbackRequest_Recipient {
+ p := new(CreateFeedbackRequest_Recipient)
+ *p = x
+ return p
+}
+
+func (x CreateFeedbackRequest_Recipient) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CreateFeedbackRequest_Recipient) Descriptor() protoreflect.EnumDescriptor {
+ return file_tumdev_campus_backend_proto_enumTypes[1].Descriptor()
+}
+
+func (CreateFeedbackRequest_Recipient) Type() protoreflect.EnumType {
+ return &file_tumdev_campus_backend_proto_enumTypes[1]
+}
+
+func (x CreateFeedbackRequest_Recipient) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use CreateFeedbackRequest_Recipient.Descriptor instead.
+func (CreateFeedbackRequest_Recipient) EnumDescriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{60, 0}
+}
+
+type CreateDeviceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"`
- PublicKey *string `protobuf:"bytes,2,opt,name=publicKey,proto3,oneof" json:"publicKey,omitempty"`
- DeviceType DeviceType `protobuf:"varint,3,opt,name=deviceType,proto3,enum=api.DeviceType" json:"deviceType,omitempty"`
+ DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+ PublicKey *string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3,oneof" json:"public_key,omitempty"`
+ DeviceType DeviceType `protobuf:"varint,3,opt,name=device_type,json=deviceType,proto3,enum=api.DeviceType" json:"device_type,omitempty"`
}
-func (x *RegisterDeviceRequest) Reset() {
- *x = RegisterDeviceRequest{}
+func (x *CreateDeviceRequest) Reset() {
+ *x = CreateDeviceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -92,13 +139,13 @@ func (x *RegisterDeviceRequest) Reset() {
}
}
-func (x *RegisterDeviceRequest) String() string {
+func (x *CreateDeviceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*RegisterDeviceRequest) ProtoMessage() {}
+func (*CreateDeviceRequest) ProtoMessage() {}
-func (x *RegisterDeviceRequest) ProtoReflect() protoreflect.Message {
+func (x *CreateDeviceRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -110,42 +157,42 @@ func (x *RegisterDeviceRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use RegisterDeviceRequest.ProtoReflect.Descriptor instead.
-func (*RegisterDeviceRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use CreateDeviceRequest.ProtoReflect.Descriptor instead.
+func (*CreateDeviceRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{0}
}
-func (x *RegisterDeviceRequest) GetDeviceId() string {
+func (x *CreateDeviceRequest) GetDeviceId() string {
if x != nil {
return x.DeviceId
}
return ""
}
-func (x *RegisterDeviceRequest) GetPublicKey() string {
+func (x *CreateDeviceRequest) GetPublicKey() string {
if x != nil && x.PublicKey != nil {
return *x.PublicKey
}
return ""
}
-func (x *RegisterDeviceRequest) GetDeviceType() DeviceType {
+func (x *CreateDeviceRequest) GetDeviceType() DeviceType {
if x != nil {
return x.DeviceType
}
return DeviceType_IOS
}
-type RegisterDeviceReply struct {
+type CreateDeviceReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"`
+ DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
}
-func (x *RegisterDeviceReply) Reset() {
- *x = RegisterDeviceReply{}
+func (x *CreateDeviceReply) Reset() {
+ *x = CreateDeviceReply{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -153,13 +200,13 @@ func (x *RegisterDeviceReply) Reset() {
}
}
-func (x *RegisterDeviceReply) String() string {
+func (x *CreateDeviceReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*RegisterDeviceReply) ProtoMessage() {}
+func (*CreateDeviceReply) ProtoMessage() {}
-func (x *RegisterDeviceReply) ProtoReflect() protoreflect.Message {
+func (x *CreateDeviceReply) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -171,29 +218,29 @@ func (x *RegisterDeviceReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use RegisterDeviceReply.ProtoReflect.Descriptor instead.
-func (*RegisterDeviceReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use CreateDeviceReply.ProtoReflect.Descriptor instead.
+func (*CreateDeviceReply) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{1}
}
-func (x *RegisterDeviceReply) GetDeviceId() string {
+func (x *CreateDeviceReply) GetDeviceId() string {
if x != nil {
return x.DeviceId
}
return ""
}
-type RemoveDeviceRequest struct {
+type DeleteDeviceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"`
- DeviceType DeviceType `protobuf:"varint,2,opt,name=deviceType,proto3,enum=api.DeviceType" json:"deviceType,omitempty"`
+ DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
+ DeviceType DeviceType `protobuf:"varint,2,opt,name=device_type,json=deviceType,proto3,enum=api.DeviceType" json:"device_type,omitempty"`
}
-func (x *RemoveDeviceRequest) Reset() {
- *x = RemoveDeviceRequest{}
+func (x *DeleteDeviceRequest) Reset() {
+ *x = DeleteDeviceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -201,13 +248,13 @@ func (x *RemoveDeviceRequest) Reset() {
}
}
-func (x *RemoveDeviceRequest) String() string {
+func (x *DeleteDeviceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*RemoveDeviceRequest) ProtoMessage() {}
+func (*DeleteDeviceRequest) ProtoMessage() {}
-func (x *RemoveDeviceRequest) ProtoReflect() protoreflect.Message {
+func (x *DeleteDeviceRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -219,35 +266,35 @@ func (x *RemoveDeviceRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use RemoveDeviceRequest.ProtoReflect.Descriptor instead.
-func (*RemoveDeviceRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use DeleteDeviceRequest.ProtoReflect.Descriptor instead.
+func (*DeleteDeviceRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{2}
}
-func (x *RemoveDeviceRequest) GetDeviceId() string {
+func (x *DeleteDeviceRequest) GetDeviceId() string {
if x != nil {
return x.DeviceId
}
return ""
}
-func (x *RemoveDeviceRequest) GetDeviceType() DeviceType {
+func (x *DeleteDeviceRequest) GetDeviceType() DeviceType {
if x != nil {
return x.DeviceType
}
return DeviceType_IOS
}
-type RemoveDeviceReply struct {
+type DeleteDeviceReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- DeviceId string `protobuf:"bytes,1,opt,name=deviceId,proto3" json:"deviceId,omitempty"`
+ DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
}
-func (x *RemoveDeviceReply) Reset() {
- *x = RemoveDeviceReply{}
+func (x *DeleteDeviceReply) Reset() {
+ *x = DeleteDeviceReply{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -255,13 +302,13 @@ func (x *RemoveDeviceReply) Reset() {
}
}
-func (x *RemoveDeviceReply) String() string {
+func (x *DeleteDeviceReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*RemoveDeviceReply) ProtoMessage() {}
+func (*DeleteDeviceReply) ProtoMessage() {}
-func (x *RemoveDeviceReply) ProtoReflect() protoreflect.Message {
+func (x *DeleteDeviceReply) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -273,12 +320,12 @@ func (x *RemoveDeviceReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use RemoveDeviceReply.ProtoReflect.Descriptor instead.
-func (*RemoveDeviceReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use DeleteDeviceReply.ProtoReflect.Descriptor instead.
+func (*DeleteDeviceReply) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{3}
}
-func (x *RemoveDeviceReply) GetDeviceId() string {
+func (x *DeleteDeviceReply) GetDeviceId() string {
if x != nil {
return x.DeviceId
}
@@ -290,7 +337,7 @@ type IOSDeviceRequestResponseRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- RequestId string `protobuf:"bytes,1,opt,name=requestId,proto3" json:"requestId,omitempty"`
+ RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}
@@ -387,18 +434,16 @@ func (x *IOSDeviceRequestResponseReply) GetMessage() string {
return ""
}
-type GetRoomScheduleRequest struct {
+type SearchRoomsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Room int32 `protobuf:"varint,1,opt,name=room,proto3" json:"room,omitempty"`
- Start *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"`
- End *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"`
+ Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
}
-func (x *GetRoomScheduleRequest) Reset() {
- *x = GetRoomScheduleRequest{}
+func (x *SearchRoomsRequest) Reset() {
+ *x = SearchRoomsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -406,13 +451,13 @@ func (x *GetRoomScheduleRequest) Reset() {
}
}
-func (x *GetRoomScheduleRequest) String() string {
+func (x *SearchRoomsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetRoomScheduleRequest) ProtoMessage() {}
+func (*SearchRoomsRequest) ProtoMessage() {}
-func (x *GetRoomScheduleRequest) ProtoReflect() protoreflect.Message {
+func (x *SearchRoomsRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -424,42 +469,28 @@ func (x *GetRoomScheduleRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetRoomScheduleRequest.ProtoReflect.Descriptor instead.
-func (*GetRoomScheduleRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use SearchRoomsRequest.ProtoReflect.Descriptor instead.
+func (*SearchRoomsRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{6}
}
-func (x *GetRoomScheduleRequest) GetRoom() int32 {
- if x != nil {
- return x.Room
- }
- return 0
-}
-
-func (x *GetRoomScheduleRequest) GetStart() *timestamppb.Timestamp {
- if x != nil {
- return x.Start
- }
- return nil
-}
-
-func (x *GetRoomScheduleRequest) GetEnd() *timestamppb.Timestamp {
+func (x *SearchRoomsRequest) GetQuery() string {
if x != nil {
- return x.End
+ return x.Query
}
- return nil
+ return ""
}
-type GetRoomScheduleReply struct {
+type SearchRoomsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Events []*GetRoomScheduleReply_RoomScheduleEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
+ Rooms []*Room `protobuf:"bytes,1,rep,name=rooms,proto3" json:"rooms,omitempty"`
}
-func (x *GetRoomScheduleReply) Reset() {
- *x = GetRoomScheduleReply{}
+func (x *SearchRoomsReply) Reset() {
+ *x = SearchRoomsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -467,13 +498,13 @@ func (x *GetRoomScheduleReply) Reset() {
}
}
-func (x *GetRoomScheduleReply) String() string {
+func (x *SearchRoomsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetRoomScheduleReply) ProtoMessage() {}
+func (*SearchRoomsReply) ProtoMessage() {}
-func (x *GetRoomScheduleReply) ProtoReflect() protoreflect.Message {
+func (x *SearchRoomsReply) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -485,28 +516,36 @@ func (x *GetRoomScheduleReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetRoomScheduleReply.ProtoReflect.Descriptor instead.
-func (*GetRoomScheduleReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use SearchRoomsReply.ProtoReflect.Descriptor instead.
+func (*SearchRoomsReply) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{7}
}
-func (x *GetRoomScheduleReply) GetEvents() []*GetRoomScheduleReply_RoomScheduleEvent {
+func (x *SearchRoomsReply) GetRooms() []*Room {
if x != nil {
- return x.Events
+ return x.Rooms
}
return nil
}
-type GetRoomCoordinatesRequest struct {
+type Room struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- ArchId string `protobuf:"bytes,1,opt,name=arch_id,json=archId,proto3" json:"arch_id,omitempty"`
+ RoomId int64 `protobuf:"varint,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
+ RoomCode string `protobuf:"bytes,2,opt,name=room_code,json=roomCode,proto3" json:"room_code,omitempty"`
+ BuildingNr string `protobuf:"bytes,3,opt,name=building_nr,json=buildingNr,proto3" json:"building_nr,omitempty"`
+ ArchId string `protobuf:"bytes,4,opt,name=arch_id,json=archId,proto3" json:"arch_id,omitempty"`
+ Info string `protobuf:"bytes,5,opt,name=info,proto3" json:"info,omitempty"`
+ Address string `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"`
+ Purpose string `protobuf:"bytes,7,opt,name=purpose,proto3" json:"purpose,omitempty"`
+ Campus string `protobuf:"bytes,8,opt,name=campus,proto3" json:"campus,omitempty"`
+ Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"`
}
-func (x *GetRoomCoordinatesRequest) Reset() {
- *x = GetRoomCoordinatesRequest{}
+func (x *Room) Reset() {
+ *x = Room{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -514,13 +553,13 @@ func (x *GetRoomCoordinatesRequest) Reset() {
}
}
-func (x *GetRoomCoordinatesRequest) String() string {
+func (x *Room) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetRoomCoordinatesRequest) ProtoMessage() {}
+func (*Room) ProtoMessage() {}
-func (x *GetRoomCoordinatesRequest) ProtoReflect() protoreflect.Message {
+func (x *Room) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -532,30 +571,99 @@ func (x *GetRoomCoordinatesRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetRoomCoordinatesRequest.ProtoReflect.Descriptor instead.
-func (*GetRoomCoordinatesRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use Room.ProtoReflect.Descriptor instead.
+func (*Room) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{8}
}
-func (x *GetRoomCoordinatesRequest) GetArchId() string {
+func (x *Room) GetRoomId() int64 {
+ if x != nil {
+ return x.RoomId
+ }
+ return 0
+}
+
+func (x *Room) GetRoomCode() string {
+ if x != nil {
+ return x.RoomCode
+ }
+ return ""
+}
+
+func (x *Room) GetBuildingNr() string {
+ if x != nil {
+ return x.BuildingNr
+ }
+ return ""
+}
+
+func (x *Room) GetArchId() string {
if x != nil {
return x.ArchId
}
return ""
}
-type GetRoomCoordinatesReply struct {
+func (x *Room) GetInfo() string {
+ if x != nil {
+ return x.Info
+ }
+ return ""
+}
+
+func (x *Room) GetAddress() string {
+ if x != nil {
+ return x.Address
+ }
+ return ""
+}
+
+func (x *Room) GetPurpose() string {
+ if x != nil {
+ return x.Purpose
+ }
+ return ""
+}
+
+func (x *Room) GetCampus() string {
+ if x != nil {
+ return x.Campus
+ }
+ return ""
+}
+
+func (x *Room) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type News struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- UtmZone string `protobuf:"bytes,1,opt,name=utm_zone,json=utmZone,proto3" json:"utm_zone,omitempty"`
- UtmEasting float32 `protobuf:"fixed32,2,opt,name=utm_easting,json=utmEasting,proto3" json:"utm_easting,omitempty"`
- UtmNorthing float32 `protobuf:"fixed32,3,opt,name=utm_northing,json=utmNorthing,proto3" json:"utm_northing,omitempty"`
-}
-
-func (x *GetRoomCoordinatesReply) Reset() {
- *x = GetRoomCoordinatesReply{}
+ Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
+ Link string `protobuf:"bytes,4,opt,name=link,proto3" json:"link,omitempty"`
+ // where a news thumbnail is stored. empty string means no image is available
+ ImageUrl string `protobuf:"bytes,5,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
+ // the id of the news source
+ SourceId string `protobuf:"bytes,6,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
+ // where the icon can be found
+ SourceIconUrl string `protobuf:"bytes,9,opt,name=source_icon_url,json=sourceIconUrl,proto3" json:"source_icon_url,omitempty"`
+ // human readable title of the news source
+ SourceTitle string `protobuf:"bytes,10,opt,name=source_title,json=sourceTitle,proto3" json:"source_title,omitempty"`
+ // when the news item was created in OUR database
+ Created *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created,proto3" json:"created,omitempty"`
+ // the date of the news item
+ Date *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=date,proto3" json:"date,omitempty"`
+}
+
+func (x *News) Reset() {
+ *x = News{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -563,13 +671,13 @@ func (x *GetRoomCoordinatesReply) Reset() {
}
}
-func (x *GetRoomCoordinatesReply) String() string {
+func (x *News) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetRoomCoordinatesReply) ProtoMessage() {}
+func (*News) ProtoMessage() {}
-func (x *GetRoomCoordinatesReply) ProtoReflect() protoreflect.Message {
+func (x *News) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -581,42 +689,91 @@ func (x *GetRoomCoordinatesReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetRoomCoordinatesReply.ProtoReflect.Descriptor instead.
-func (*GetRoomCoordinatesReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use News.ProtoReflect.Descriptor instead.
+func (*News) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{9}
}
-func (x *GetRoomCoordinatesReply) GetUtmZone() string {
+func (x *News) GetId() int64 {
+ if x != nil {
+ return x.Id
+ }
+ return 0
+}
+
+func (x *News) GetTitle() string {
if x != nil {
- return x.UtmZone
+ return x.Title
}
return ""
}
-func (x *GetRoomCoordinatesReply) GetUtmEasting() float32 {
+func (x *News) GetText() string {
if x != nil {
- return x.UtmEasting
+ return x.Text
}
- return 0
+ return ""
+}
+
+func (x *News) GetLink() string {
+ if x != nil {
+ return x.Link
+ }
+ return ""
}
-func (x *GetRoomCoordinatesReply) GetUtmNorthing() float32 {
+func (x *News) GetImageUrl() string {
if x != nil {
- return x.UtmNorthing
+ return x.ImageUrl
}
- return 0
+ return ""
+}
+
+func (x *News) GetSourceId() string {
+ if x != nil {
+ return x.SourceId
+ }
+ return ""
+}
+
+func (x *News) GetSourceIconUrl() string {
+ if x != nil {
+ return x.SourceIconUrl
+ }
+ return ""
+}
+
+func (x *News) GetSourceTitle() string {
+ if x != nil {
+ return x.SourceTitle
+ }
+ return ""
+}
+
+func (x *News) GetCreated() *timestamppb.Timestamp {
+ if x != nil {
+ return x.Created
+ }
+ return nil
+}
+
+func (x *News) GetDate() *timestamppb.Timestamp {
+ if x != nil {
+ return x.Date
+ }
+ return nil
}
-type GetRoomMapsRequest struct {
+type ListNewsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- ArchId string `protobuf:"bytes,1,opt,name=arch_id,json=archId,proto3" json:"arch_id,omitempty"`
+ News []*News `protobuf:"bytes,1,rep,name=news,proto3" json:"news,omitempty"`
}
-func (x *GetRoomMapsRequest) Reset() {
- *x = GetRoomMapsRequest{}
+func (x *ListNewsReply) Reset() {
+ *x = ListNewsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -624,13 +781,13 @@ func (x *GetRoomMapsRequest) Reset() {
}
}
-func (x *GetRoomMapsRequest) String() string {
+func (x *ListNewsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetRoomMapsRequest) ProtoMessage() {}
+func (*ListNewsReply) ProtoMessage() {}
-func (x *GetRoomMapsRequest) ProtoReflect() protoreflect.Message {
+func (x *ListNewsReply) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -642,28 +799,33 @@ func (x *GetRoomMapsRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetRoomMapsRequest.ProtoReflect.Descriptor instead.
-func (*GetRoomMapsRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListNewsReply.ProtoReflect.Descriptor instead.
+func (*ListNewsReply) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{10}
}
-func (x *GetRoomMapsRequest) GetArchId() string {
+func (x *ListNewsReply) GetNews() []*News {
if x != nil {
- return x.ArchId
+ return x.News
}
- return ""
+ return nil
}
-type GetRoomMapsReply struct {
+type ListNewsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Maps []*GetRoomMapsReply_Map `protobuf:"bytes,1,rep,name=maps,proto3" json:"maps,omitempty"`
+ // the last id of the news item received. 0 to get all news items
+ LastNewsId int32 `protobuf:"varint,1,opt,name=last_news_id,json=lastNewsId,proto3" json:"last_news_id,omitempty"`
+ // filter by news source id. 0 to get all news items
+ NewsSource int32 `protobuf:"varint,2,opt,name=news_source,json=newsSource,proto3" json:"news_source,omitempty"`
+ // the oldest time you want to be included in the response
+ OldestDateAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=oldest_date_at,json=oldestDateAt,proto3" json:"oldest_date_at,omitempty"`
}
-func (x *GetRoomMapsReply) Reset() {
- *x = GetRoomMapsReply{}
+func (x *ListNewsRequest) Reset() {
+ *x = ListNewsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -671,13 +833,13 @@ func (x *GetRoomMapsReply) Reset() {
}
}
-func (x *GetRoomMapsReply) String() string {
+func (x *ListNewsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetRoomMapsReply) ProtoMessage() {}
+func (*ListNewsRequest) ProtoMessage() {}
-func (x *GetRoomMapsReply) ProtoReflect() protoreflect.Message {
+func (x *ListNewsRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[11]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -689,28 +851,40 @@ func (x *GetRoomMapsReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetRoomMapsReply.ProtoReflect.Descriptor instead.
-func (*GetRoomMapsReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListNewsRequest.ProtoReflect.Descriptor instead.
+func (*ListNewsRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{11}
}
-func (x *GetRoomMapsReply) GetMaps() []*GetRoomMapsReply_Map {
+func (x *ListNewsRequest) GetLastNewsId() int32 {
+ if x != nil {
+ return x.LastNewsId
+ }
+ return 0
+}
+
+func (x *ListNewsRequest) GetNewsSource() int32 {
+ if x != nil {
+ return x.NewsSource
+ }
+ return 0
+}
+
+func (x *ListNewsRequest) GetOldestDateAt() *timestamppb.Timestamp {
if x != nil {
- return x.Maps
+ return x.OldestDateAt
}
return nil
}
-type GetLocationsRequest struct {
+type ListNewsSourcesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
}
-func (x *GetLocationsRequest) Reset() {
- *x = GetLocationsRequest{}
+func (x *ListNewsSourcesRequest) Reset() {
+ *x = ListNewsSourcesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[12]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -718,13 +892,13 @@ func (x *GetLocationsRequest) Reset() {
}
}
-func (x *GetLocationsRequest) String() string {
+func (x *ListNewsSourcesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetLocationsRequest) ProtoMessage() {}
+func (*ListNewsSourcesRequest) ProtoMessage() {}
-func (x *GetLocationsRequest) ProtoReflect() protoreflect.Message {
+func (x *ListNewsSourcesRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[12]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -736,28 +910,21 @@ func (x *GetLocationsRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetLocationsRequest.ProtoReflect.Descriptor instead.
-func (*GetLocationsRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListNewsSourcesRequest.ProtoReflect.Descriptor instead.
+func (*ListNewsSourcesRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{12}
}
-func (x *GetLocationsRequest) GetLocation() string {
- if x != nil {
- return x.Location
- }
- return ""
-}
-
-type GetLocationsReply struct {
+type ListNewsSourcesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Locations []*GetLocationsReply_Location `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"`
+ Sources []*NewsSource `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"`
}
-func (x *GetLocationsReply) Reset() {
- *x = GetLocationsReply{}
+func (x *ListNewsSourcesReply) Reset() {
+ *x = ListNewsSourcesReply{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -765,13 +932,13 @@ func (x *GetLocationsReply) Reset() {
}
}
-func (x *GetLocationsReply) String() string {
+func (x *ListNewsSourcesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetLocationsReply) ProtoMessage() {}
+func (*ListNewsSourcesReply) ProtoMessage() {}
-func (x *GetLocationsReply) ProtoReflect() protoreflect.Message {
+func (x *ListNewsSourcesReply) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -783,28 +950,31 @@ func (x *GetLocationsReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetLocationsReply.ProtoReflect.Descriptor instead.
-func (*GetLocationsReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListNewsSourcesReply.ProtoReflect.Descriptor instead.
+func (*ListNewsSourcesReply) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{13}
}
-func (x *GetLocationsReply) GetLocations() []*GetLocationsReply_Location {
+func (x *ListNewsSourcesReply) GetSources() []*NewsSource {
if x != nil {
- return x.Locations
+ return x.Sources
}
return nil
}
-type SearchRoomsRequest struct {
+type NewsSource struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
+ Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
+ // where the icon can be found
+ IconUrl string `protobuf:"bytes,3,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"`
}
-func (x *SearchRoomsRequest) Reset() {
- *x = SearchRoomsRequest{}
+func (x *NewsSource) Reset() {
+ *x = NewsSource{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -812,13 +982,13 @@ func (x *SearchRoomsRequest) Reset() {
}
}
-func (x *SearchRoomsRequest) String() string {
+func (x *NewsSource) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SearchRoomsRequest) ProtoMessage() {}
+func (*NewsSource) ProtoMessage() {}
-func (x *SearchRoomsRequest) ProtoReflect() protoreflect.Message {
+func (x *NewsSource) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -830,28 +1000,43 @@ func (x *SearchRoomsRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SearchRoomsRequest.ProtoReflect.Descriptor instead.
-func (*SearchRoomsRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use NewsSource.ProtoReflect.Descriptor instead.
+func (*NewsSource) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{14}
}
-func (x *SearchRoomsRequest) GetQuery() string {
+func (x *NewsSource) GetSource() string {
if x != nil {
- return x.Query
+ return x.Source
}
return ""
}
-type SearchRoomsReply struct {
+func (x *NewsSource) GetTitle() string {
+ if x != nil {
+ return x.Title
+ }
+ return ""
+}
+
+func (x *NewsSource) GetIconUrl() string {
+ if x != nil {
+ return x.IconUrl
+ }
+ return ""
+}
+
+type ListNewsAlertsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Rooms []*Room `protobuf:"bytes,1,rep,name=rooms,proto3" json:"rooms,omitempty"`
+ // the last id of the news item received. 0 to get all news items
+ LastNewsAlertId int32 `protobuf:"varint,1,opt,name=last_news_alert_id,json=lastNewsAlertId,proto3" json:"last_news_alert_id,omitempty"`
}
-func (x *SearchRoomsReply) Reset() {
- *x = SearchRoomsReply{}
+func (x *ListNewsAlertsRequest) Reset() {
+ *x = ListNewsAlertsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -859,13 +1044,13 @@ func (x *SearchRoomsReply) Reset() {
}
}
-func (x *SearchRoomsReply) String() string {
+func (x *ListNewsAlertsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SearchRoomsReply) ProtoMessage() {}
+func (*ListNewsAlertsRequest) ProtoMessage() {}
-func (x *SearchRoomsReply) ProtoReflect() protoreflect.Message {
+func (x *ListNewsAlertsRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -877,36 +1062,28 @@ func (x *SearchRoomsReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SearchRoomsReply.ProtoReflect.Descriptor instead.
-func (*SearchRoomsReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListNewsAlertsRequest.ProtoReflect.Descriptor instead.
+func (*ListNewsAlertsRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{15}
}
-func (x *SearchRoomsReply) GetRooms() []*Room {
+func (x *ListNewsAlertsRequest) GetLastNewsAlertId() int32 {
if x != nil {
- return x.Rooms
+ return x.LastNewsAlertId
}
- return nil
+ return 0
}
-type Room struct {
+type ListNewsAlertsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- RoomId int32 `protobuf:"varint,1,opt,name=roomId,proto3" json:"roomId,omitempty"`
- RoomCode string `protobuf:"bytes,2,opt,name=room_code,json=roomCode,proto3" json:"room_code,omitempty"`
- BuildingNr string `protobuf:"bytes,3,opt,name=building_nr,json=buildingNr,proto3" json:"building_nr,omitempty"`
- ArchId string `protobuf:"bytes,4,opt,name=arch_id,json=archId,proto3" json:"arch_id,omitempty"`
- Info string `protobuf:"bytes,5,opt,name=info,proto3" json:"info,omitempty"`
- Address string `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"`
- Purpose string `protobuf:"bytes,7,opt,name=purpose,proto3" json:"purpose,omitempty"`
- Campus string `protobuf:"bytes,8,opt,name=campus,proto3" json:"campus,omitempty"`
- Name string `protobuf:"bytes,9,opt,name=name,proto3" json:"name,omitempty"`
+ Alerts []*NewsAlert `protobuf:"bytes,1,rep,name=alerts,proto3" json:"alerts,omitempty"`
}
-func (x *Room) Reset() {
- *x = Room{}
+func (x *ListNewsAlertsReply) Reset() {
+ *x = ListNewsAlertsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -914,13 +1091,13 @@ func (x *Room) Reset() {
}
}
-func (x *Room) String() string {
+func (x *ListNewsAlertsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Room) ProtoMessage() {}
+func (*ListNewsAlertsReply) ProtoMessage() {}
-func (x *Room) ProtoReflect() protoreflect.Message {
+func (x *ListNewsAlertsReply) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -932,84 +1109,32 @@ func (x *Room) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Room.ProtoReflect.Descriptor instead.
-func (*Room) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListNewsAlertsReply.ProtoReflect.Descriptor instead.
+func (*ListNewsAlertsReply) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{16}
}
-func (x *Room) GetRoomId() int32 {
- if x != nil {
- return x.RoomId
- }
- return 0
-}
-
-func (x *Room) GetRoomCode() string {
- if x != nil {
- return x.RoomCode
- }
- return ""
-}
-
-func (x *Room) GetBuildingNr() string {
- if x != nil {
- return x.BuildingNr
- }
- return ""
-}
-
-func (x *Room) GetArchId() string {
- if x != nil {
- return x.ArchId
- }
- return ""
-}
-
-func (x *Room) GetInfo() string {
- if x != nil {
- return x.Info
- }
- return ""
-}
-
-func (x *Room) GetAddress() string {
- if x != nil {
- return x.Address
- }
- return ""
-}
-
-func (x *Room) GetPurpose() string {
- if x != nil {
- return x.Purpose
- }
- return ""
-}
-
-func (x *Room) GetCampus() string {
- if x != nil {
- return x.Campus
- }
- return ""
-}
-
-func (x *Room) GetName() string {
+func (x *ListNewsAlertsReply) GetAlerts() []*NewsAlert {
if x != nil {
- return x.Name
+ return x.Alerts
}
- return ""
+ return nil
}
-type NewsSourceReply struct {
+type NewsAlert struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Sources []*NewsSource `protobuf:"bytes,1,rep,name=sources,proto3" json:"sources,omitempty"`
+ ImageUrl string `protobuf:"bytes,1,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
+ Link string `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"`
+ Created *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created,proto3" json:"created,omitempty"`
+ From *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"`
+ To *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"`
}
-func (x *NewsSourceReply) Reset() {
- *x = NewsSourceReply{}
+func (x *NewsAlert) Reset() {
+ *x = NewsAlert{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1017,13 +1142,13 @@ func (x *NewsSourceReply) Reset() {
}
}
-func (x *NewsSourceReply) String() string {
+func (x *NewsAlert) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*NewsSourceReply) ProtoMessage() {}
+func (*NewsAlert) ProtoMessage() {}
-func (x *NewsSourceReply) ProtoReflect() protoreflect.Message {
+func (x *NewsAlert) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1035,110 +1160,78 @@ func (x *NewsSourceReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use NewsSourceReply.ProtoReflect.Descriptor instead.
-func (*NewsSourceReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use NewsAlert.ProtoReflect.Descriptor instead.
+func (*NewsAlert) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{17}
}
-func (x *NewsSourceReply) GetSources() []*NewsSource {
+func (x *NewsAlert) GetImageUrl() string {
if x != nil {
- return x.Sources
- }
- return nil
-}
-
-type NewsSource struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
- Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
- Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"`
-}
-
-func (x *NewsSource) Reset() {
- *x = NewsSource{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[18]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
+ return x.ImageUrl
}
+ return ""
}
-func (x *NewsSource) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*NewsSource) ProtoMessage() {}
-
-func (x *NewsSource) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[18]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
+func (x *NewsAlert) GetLink() string {
+ if x != nil {
+ return x.Link
}
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use NewsSource.ProtoReflect.Descriptor instead.
-func (*NewsSource) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{18}
+ return ""
}
-func (x *NewsSource) GetSource() string {
+func (x *NewsAlert) GetCreated() *timestamppb.Timestamp {
if x != nil {
- return x.Source
+ return x.Created
}
- return ""
+ return nil
}
-func (x *NewsSource) GetTitle() string {
+func (x *NewsAlert) GetFrom() *timestamppb.Timestamp {
if x != nil {
- return x.Title
+ return x.From
}
- return ""
+ return nil
}
-func (x *NewsSource) GetIcon() string {
+func (x *NewsAlert) GetTo() *timestamppb.Timestamp {
if x != nil {
- return x.Icon
+ return x.To
}
- return ""
+ return nil
}
-type GetTopNewsReply struct {
+type ListCanteenRatingsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- ImageUrl string `protobuf:"bytes,1,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
- Link string `protobuf:"bytes,2,opt,name=link,proto3" json:"link,omitempty"`
- Created *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created,proto3" json:"created,omitempty"`
- From *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"`
- To *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=to,proto3" json:"to,omitempty"`
+ // canteenId Mandatory Name of the canteen (EAT-API naming scheme "MENSA_GARCHING")
+ CanteenId string `protobuf:"bytes,1,opt,name=canteen_id,json=canteenId,proto3" json:"canteen_id,omitempty"`
+ // Optional Parameter to define an interval for the ratings (Lower bound)
+ From *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
+ // Optional Parameter to define an interval for the ratings (Upper bound)
+ To *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
+ // Optional Parameter defines how many ratings are queried. If all ratings should be queried, enter "-1"
+ Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
}
-func (x *GetTopNewsReply) Reset() {
- *x = GetTopNewsReply{}
+func (x *ListCanteenRatingsRequest) Reset() {
+ *x = ListCanteenRatingsRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[19]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetTopNewsReply) String() string {
+func (x *ListCanteenRatingsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetTopNewsReply) ProtoMessage() {}
+func (*ListCanteenRatingsRequest) ProtoMessage() {}
-func (x *GetTopNewsReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[19]
+func (x *ListCanteenRatingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1149,78 +1242,69 @@ func (x *GetTopNewsReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetTopNewsReply.ProtoReflect.Descriptor instead.
-func (*GetTopNewsReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{19}
-}
-
-func (x *GetTopNewsReply) GetImageUrl() string {
- if x != nil {
- return x.ImageUrl
- }
- return ""
+// Deprecated: Use ListCanteenRatingsRequest.ProtoReflect.Descriptor instead.
+func (*ListCanteenRatingsRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{18}
}
-func (x *GetTopNewsReply) GetLink() string {
+func (x *ListCanteenRatingsRequest) GetCanteenId() string {
if x != nil {
- return x.Link
+ return x.CanteenId
}
return ""
}
-func (x *GetTopNewsReply) GetCreated() *timestamppb.Timestamp {
+func (x *ListCanteenRatingsRequest) GetFrom() *timestamppb.Timestamp {
if x != nil {
- return x.Created
+ return x.From
}
return nil
}
-func (x *GetTopNewsReply) GetFrom() *timestamppb.Timestamp {
+func (x *ListCanteenRatingsRequest) GetTo() *timestamppb.Timestamp {
if x != nil {
- return x.From
+ return x.To
}
return nil
}
-func (x *GetTopNewsReply) GetTo() *timestamppb.Timestamp {
+func (x *ListCanteenRatingsRequest) GetLimit() int32 {
if x != nil {
- return x.To
+ return x.Limit
}
- return nil
+ return 0
}
-type CafeteriaRatingRequest struct {
+type ListCanteenRatingsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // cafeteriaId Mandatory Name of the cafeteria (EAT-API naming scheme "MENSA_GARCHING")
- CafeteriaId string `protobuf:"bytes,1,opt,name=cafeteriaId,proto3" json:"cafeteriaId,omitempty"`
- // Optional Parameter to define an interval for the ratings (Lower bound)
- From *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
- // Optional Parameter to define an interval for the ratings (Upper bound)
- To *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`
- // Optional Parameter defines how many ratings are queried. If all ratings should be queried, enter "-1"
- Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
+ Rating []*SingleRatingReply `protobuf:"bytes,1,rep,name=rating,proto3" json:"rating,omitempty"`
+ Avg float64 `protobuf:"fixed64,2,opt,name=avg,proto3" json:"avg,omitempty"`
+ Std float64 `protobuf:"fixed64,3,opt,name=std,proto3" json:"std,omitempty"`
+ Min int32 `protobuf:"varint,4,opt,name=min,proto3" json:"min,omitempty"`
+ Max int32 `protobuf:"varint,5,opt,name=max,proto3" json:"max,omitempty"`
+ RatingTags []*RatingTagResult `protobuf:"bytes,6,rep,name=rating_tags,json=ratingTags,proto3" json:"rating_tags,omitempty"`
}
-func (x *CafeteriaRatingRequest) Reset() {
- *x = CafeteriaRatingRequest{}
+func (x *ListCanteenRatingsReply) Reset() {
+ *x = ListCanteenRatingsReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[20]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *CafeteriaRatingRequest) String() string {
+func (x *ListCanteenRatingsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*CafeteriaRatingRequest) ProtoMessage() {}
+func (*ListCanteenRatingsReply) ProtoMessage() {}
-func (x *CafeteriaRatingRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[20]
+func (x *ListCanteenRatingsReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1231,46 +1315,60 @@ func (x *CafeteriaRatingRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use CafeteriaRatingRequest.ProtoReflect.Descriptor instead.
-func (*CafeteriaRatingRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{20}
+// Deprecated: Use ListCanteenRatingsReply.ProtoReflect.Descriptor instead.
+func (*ListCanteenRatingsReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{19}
}
-func (x *CafeteriaRatingRequest) GetCafeteriaId() string {
+func (x *ListCanteenRatingsReply) GetRating() []*SingleRatingReply {
if x != nil {
- return x.CafeteriaId
+ return x.Rating
}
- return ""
+ return nil
}
-func (x *CafeteriaRatingRequest) GetFrom() *timestamppb.Timestamp {
+func (x *ListCanteenRatingsReply) GetAvg() float64 {
if x != nil {
- return x.From
+ return x.Avg
}
- return nil
+ return 0
}
-func (x *CafeteriaRatingRequest) GetTo() *timestamppb.Timestamp {
+func (x *ListCanteenRatingsReply) GetStd() float64 {
if x != nil {
- return x.To
+ return x.Std
}
- return nil
+ return 0
}
-func (x *CafeteriaRatingRequest) GetLimit() int32 {
+func (x *ListCanteenRatingsReply) GetMin() int32 {
if x != nil {
- return x.Limit
+ return x.Min
+ }
+ return 0
+}
+
+func (x *ListCanteenRatingsReply) GetMax() int32 {
+ if x != nil {
+ return x.Max
}
return 0
}
-type DishRatingRequest struct {
+func (x *ListCanteenRatingsReply) GetRatingTags() []*RatingTagResult {
+ if x != nil {
+ return x.RatingTags
+ }
+ return nil
+}
+
+type GetDishRatingsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- // Mandatory Name of the cafeteria (EAT-API naming scheme "MENSA_GARCHING")
- CafeteriaId string `protobuf:"bytes,1,opt,name=cafeteriaId,proto3" json:"cafeteriaId,omitempty"`
+ // Mandatory Name of the canteen (EAT-API naming scheme "MENSA_GARCHING")
+ CanteenId string `protobuf:"bytes,1,opt,name=canteen_id,json=canteenId,proto3" json:"canteen_id,omitempty"`
// Mandatory Name of the dish (EAT-API naming scheme) Must be available int the given mensa
Dish string `protobuf:"bytes,2,opt,name=dish,proto3" json:"dish,omitempty"`
// Optional Parameter to define an interval for the ratings (Lower bound)
@@ -1281,23 +1379,23 @@ type DishRatingRequest struct {
Limit int32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
}
-func (x *DishRatingRequest) Reset() {
- *x = DishRatingRequest{}
+func (x *GetDishRatingsRequest) Reset() {
+ *x = GetDishRatingsRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[21]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *DishRatingRequest) String() string {
+func (x *GetDishRatingsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DishRatingRequest) ProtoMessage() {}
+func (*GetDishRatingsRequest) ProtoMessage() {}
-func (x *DishRatingRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[21]
+func (x *GetDishRatingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1308,47 +1406,47 @@ func (x *DishRatingRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use DishRatingRequest.ProtoReflect.Descriptor instead.
-func (*DishRatingRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{21}
+// Deprecated: Use GetDishRatingsRequest.ProtoReflect.Descriptor instead.
+func (*GetDishRatingsRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{20}
}
-func (x *DishRatingRequest) GetCafeteriaId() string {
+func (x *GetDishRatingsRequest) GetCanteenId() string {
if x != nil {
- return x.CafeteriaId
+ return x.CanteenId
}
return ""
}
-func (x *DishRatingRequest) GetDish() string {
+func (x *GetDishRatingsRequest) GetDish() string {
if x != nil {
return x.Dish
}
return ""
}
-func (x *DishRatingRequest) GetFrom() *timestamppb.Timestamp {
+func (x *GetDishRatingsRequest) GetFrom() *timestamppb.Timestamp {
if x != nil {
return x.From
}
return nil
}
-func (x *DishRatingRequest) GetTo() *timestamppb.Timestamp {
+func (x *GetDishRatingsRequest) GetTo() *timestamppb.Timestamp {
if x != nil {
return x.To
}
return nil
}
-func (x *DishRatingRequest) GetLimit() int32 {
+func (x *GetDishRatingsRequest) GetLimit() int32 {
if x != nil {
return x.Limit
}
return 0
}
-type CafeteriaRatingReply struct {
+type GetDishRatingsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -1358,26 +1456,27 @@ type CafeteriaRatingReply struct {
Std float64 `protobuf:"fixed64,3,opt,name=std,proto3" json:"std,omitempty"`
Min int32 `protobuf:"varint,4,opt,name=min,proto3" json:"min,omitempty"`
Max int32 `protobuf:"varint,5,opt,name=max,proto3" json:"max,omitempty"`
- RatingTags []*RatingTagResult `protobuf:"bytes,6,rep,name=ratingTags,proto3" json:"ratingTags,omitempty"`
+ RatingTags []*RatingTagResult `protobuf:"bytes,6,rep,name=rating_tags,json=ratingTags,proto3" json:"rating_tags,omitempty"`
+ NameTags []*RatingTagResult `protobuf:"bytes,7,rep,name=name_tags,json=nameTags,proto3" json:"name_tags,omitempty"`
}
-func (x *CafeteriaRatingReply) Reset() {
- *x = CafeteriaRatingReply{}
+func (x *GetDishRatingsReply) Reset() {
+ *x = GetDishRatingsReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[22]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *CafeteriaRatingReply) String() string {
+func (x *GetDishRatingsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*CafeteriaRatingReply) ProtoMessage() {}
+func (*GetDishRatingsReply) ProtoMessage() {}
-func (x *CafeteriaRatingReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[22]
+func (x *GetDishRatingsReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1388,84 +1487,92 @@ func (x *CafeteriaRatingReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use CafeteriaRatingReply.ProtoReflect.Descriptor instead.
-func (*CafeteriaRatingReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{22}
+// Deprecated: Use GetDishRatingsReply.ProtoReflect.Descriptor instead.
+func (*GetDishRatingsReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{21}
}
-func (x *CafeteriaRatingReply) GetRating() []*SingleRatingReply {
+func (x *GetDishRatingsReply) GetRating() []*SingleRatingReply {
if x != nil {
return x.Rating
}
return nil
}
-func (x *CafeteriaRatingReply) GetAvg() float64 {
+func (x *GetDishRatingsReply) GetAvg() float64 {
if x != nil {
return x.Avg
}
return 0
}
-func (x *CafeteriaRatingReply) GetStd() float64 {
+func (x *GetDishRatingsReply) GetStd() float64 {
if x != nil {
return x.Std
}
return 0
}
-func (x *CafeteriaRatingReply) GetMin() int32 {
+func (x *GetDishRatingsReply) GetMin() int32 {
if x != nil {
return x.Min
}
return 0
}
-func (x *CafeteriaRatingReply) GetMax() int32 {
+func (x *GetDishRatingsReply) GetMax() int32 {
if x != nil {
return x.Max
}
return 0
}
-func (x *CafeteriaRatingReply) GetRatingTags() []*RatingTagResult {
+func (x *GetDishRatingsReply) GetRatingTags() []*RatingTagResult {
if x != nil {
return x.RatingTags
}
return nil
}
-type DishRatingReply struct {
+func (x *GetDishRatingsReply) GetNameTags() []*RatingTagResult {
+ if x != nil {
+ return x.NameTags
+ }
+ return nil
+}
+
+type SingleRatingReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Rating []*SingleRatingReply `protobuf:"bytes,1,rep,name=rating,proto3" json:"rating,omitempty"`
- Avg float64 `protobuf:"fixed64,2,opt,name=avg,proto3" json:"avg,omitempty"`
- Std float64 `protobuf:"fixed64,3,opt,name=std,proto3" json:"std,omitempty"`
- Min int32 `protobuf:"varint,4,opt,name=min,proto3" json:"min,omitempty"`
- Max int32 `protobuf:"varint,5,opt,name=max,proto3" json:"max,omitempty"`
- RatingTags []*RatingTagResult `protobuf:"bytes,6,rep,name=ratingTags,proto3" json:"ratingTags,omitempty"`
- NameTags []*RatingTagResult `protobuf:"bytes,7,rep,name=nameTags,proto3" json:"nameTags,omitempty"`
+ // number in the range 1-5
+ Points int32 `protobuf:"varint,1,opt,name=points,proto3" json:"points,omitempty"`
+ // Optional JPEG image in Base64
+ Image []byte `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
+ // Optional comment (max 256 chars)
+ Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"`
+ RatingTags []*RatingTagNewRequest `protobuf:"bytes,4,rep,name=rating_tags,json=ratingTags,proto3" json:"rating_tags,omitempty"`
+ Visited *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=visited,proto3" json:"visited,omitempty"`
}
-func (x *DishRatingReply) Reset() {
- *x = DishRatingReply{}
+func (x *SingleRatingReply) Reset() {
+ *x = SingleRatingReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[23]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *DishRatingReply) String() string {
+func (x *SingleRatingReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DishRatingReply) ProtoMessage() {}
+func (*SingleRatingReply) ProtoMessage() {}
-func (x *DishRatingReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[23]
+func (x *SingleRatingReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1476,77 +1583,101 @@ func (x *DishRatingReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use DishRatingReply.ProtoReflect.Descriptor instead.
-func (*DishRatingReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{23}
+// Deprecated: Use SingleRatingReply.ProtoReflect.Descriptor instead.
+func (*SingleRatingReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{22}
}
-func (x *DishRatingReply) GetRating() []*SingleRatingReply {
+func (x *SingleRatingReply) GetPoints() int32 {
if x != nil {
- return x.Rating
+ return x.Points
}
- return nil
+ return 0
}
-func (x *DishRatingReply) GetAvg() float64 {
+func (x *SingleRatingReply) GetImage() []byte {
if x != nil {
- return x.Avg
+ return x.Image
}
- return 0
+ return nil
}
-func (x *DishRatingReply) GetStd() float64 {
+func (x *SingleRatingReply) GetComment() string {
if x != nil {
- return x.Std
+ return x.Comment
}
- return 0
+ return ""
}
-func (x *DishRatingReply) GetMin() int32 {
+func (x *SingleRatingReply) GetRatingTags() []*RatingTagNewRequest {
if x != nil {
- return x.Min
+ return x.RatingTags
}
- return 0
+ return nil
}
-func (x *DishRatingReply) GetMax() int32 {
+func (x *SingleRatingReply) GetVisited() *timestamppb.Timestamp {
if x != nil {
- return x.Max
+ return x.Visited
}
- return 0
+ return nil
}
-func (x *DishRatingReply) GetRatingTags() []*RatingTagResult {
- if x != nil {
- return x.RatingTags
+type CreateCanteenRatingReply struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *CreateCanteenRatingReply) Reset() {
+ *x = CreateCanteenRatingReply{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
- return nil
}
-func (x *DishRatingReply) GetNameTags() []*RatingTagResult {
- if x != nil {
- return x.NameTags
+func (x *CreateCanteenRatingReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateCanteenRatingReply) ProtoMessage() {}
+
+func (x *CreateCanteenRatingReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[23]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return nil
+ return mi.MessageOf(x)
}
-type SingleRatingReply struct {
+// Deprecated: Use CreateCanteenRatingReply.ProtoReflect.Descriptor instead.
+func (*CreateCanteenRatingReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{23}
+}
+
+type CreateCanteenRatingRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// number in the range 1-5
- Points int32 `protobuf:"varint,1,opt,name=points,proto3" json:"points,omitempty"`
- // Optional JPEG image in Base64
- Image []byte `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
+ Points int32 `protobuf:"varint,1,opt,name=points,proto3" json:"points,omitempty"`
+ CanteenId string `protobuf:"bytes,2,opt,name=canteen_id,json=canteenId,proto3" json:"canteen_id,omitempty"`
+ Image []byte `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"`
+ // Optional list of tag ratings add as many tags with a rating (1-5) of the list of canteenRatingTags
+ RatingTags []*RatingTag `protobuf:"bytes,4,rep,name=rating_tags,json=ratingTags,proto3" json:"rating_tags,omitempty"`
// Optional comment (max 256 chars)
- Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"`
- RatingTags []*RatingTagNewRequest `protobuf:"bytes,4,rep,name=ratingTags,proto3" json:"ratingTags,omitempty"`
- Visited *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=visited,proto3" json:"visited,omitempty"`
+ Comment string `protobuf:"bytes,6,opt,name=comment,proto3" json:"comment,omitempty"`
}
-func (x *SingleRatingReply) Reset() {
- *x = SingleRatingReply{}
+func (x *CreateCanteenRatingRequest) Reset() {
+ *x = CreateCanteenRatingRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1554,13 +1685,13 @@ func (x *SingleRatingReply) Reset() {
}
}
-func (x *SingleRatingReply) String() string {
+func (x *CreateCanteenRatingRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SingleRatingReply) ProtoMessage() {}
+func (*CreateCanteenRatingRequest) ProtoMessage() {}
-func (x *SingleRatingReply) ProtoReflect() protoreflect.Message {
+func (x *CreateCanteenRatingRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[24]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1572,63 +1703,54 @@ func (x *SingleRatingReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SingleRatingReply.ProtoReflect.Descriptor instead.
-func (*SingleRatingReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use CreateCanteenRatingRequest.ProtoReflect.Descriptor instead.
+func (*CreateCanteenRatingRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{24}
}
-func (x *SingleRatingReply) GetPoints() int32 {
+func (x *CreateCanteenRatingRequest) GetPoints() int32 {
if x != nil {
return x.Points
}
return 0
}
-func (x *SingleRatingReply) GetImage() []byte {
+func (x *CreateCanteenRatingRequest) GetCanteenId() string {
if x != nil {
- return x.Image
+ return x.CanteenId
}
- return nil
+ return ""
}
-func (x *SingleRatingReply) GetComment() string {
+func (x *CreateCanteenRatingRequest) GetImage() []byte {
if x != nil {
- return x.Comment
+ return x.Image
}
- return ""
+ return nil
}
-func (x *SingleRatingReply) GetRatingTags() []*RatingTagNewRequest {
+func (x *CreateCanteenRatingRequest) GetRatingTags() []*RatingTag {
if x != nil {
return x.RatingTags
}
return nil
}
-func (x *SingleRatingReply) GetVisited() *timestamppb.Timestamp {
+func (x *CreateCanteenRatingRequest) GetComment() string {
if x != nil {
- return x.Visited
+ return x.Comment
}
- return nil
+ return ""
}
-type NewCafeteriaRatingRequest struct {
+type CreateDishRatingReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- // number in the range 1-5
- Points int32 `protobuf:"varint,1,opt,name=points,proto3" json:"points,omitempty"`
- CafeteriaId string `protobuf:"bytes,2,opt,name=cafeteriaId,proto3" json:"cafeteriaId,omitempty"`
- Image []byte `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"`
- // Optional list of tag ratings add as many tags with a rating (1-5) of the list of cafeteriaRatingTags
- RatingTags []*RatingTag `protobuf:"bytes,4,rep,name=ratingTags,proto3" json:"ratingTags,omitempty"`
- // Optional comment (max 256 chars)
- Comment string `protobuf:"bytes,6,opt,name=comment,proto3" json:"comment,omitempty"`
}
-func (x *NewCafeteriaRatingRequest) Reset() {
- *x = NewCafeteriaRatingRequest{}
+func (x *CreateDishRatingReply) Reset() {
+ *x = CreateDishRatingReply{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1636,13 +1758,13 @@ func (x *NewCafeteriaRatingRequest) Reset() {
}
}
-func (x *NewCafeteriaRatingRequest) String() string {
+func (x *CreateDishRatingReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*NewCafeteriaRatingRequest) ProtoMessage() {}
+func (*CreateDishRatingReply) ProtoMessage() {}
-func (x *NewCafeteriaRatingRequest) ProtoReflect() protoreflect.Message {
+func (x *CreateDishRatingReply) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[25]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1654,47 +1776,12 @@ func (x *NewCafeteriaRatingRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use NewCafeteriaRatingRequest.ProtoReflect.Descriptor instead.
-func (*NewCafeteriaRatingRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use CreateDishRatingReply.ProtoReflect.Descriptor instead.
+func (*CreateDishRatingReply) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{25}
}
-func (x *NewCafeteriaRatingRequest) GetPoints() int32 {
- if x != nil {
- return x.Points
- }
- return 0
-}
-
-func (x *NewCafeteriaRatingRequest) GetCafeteriaId() string {
- if x != nil {
- return x.CafeteriaId
- }
- return ""
-}
-
-func (x *NewCafeteriaRatingRequest) GetImage() []byte {
- if x != nil {
- return x.Image
- }
- return nil
-}
-
-func (x *NewCafeteriaRatingRequest) GetRatingTags() []*RatingTag {
- if x != nil {
- return x.RatingTags
- }
- return nil
-}
-
-func (x *NewCafeteriaRatingRequest) GetComment() string {
- if x != nil {
- return x.Comment
- }
- return ""
-}
-
-type NewDishRatingRequest struct {
+type CreateDishRatingRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -1702,19 +1789,19 @@ type NewDishRatingRequest struct {
// number in the range 1-5
Points int32 `protobuf:"varint,1,opt,name=points,proto3" json:"points,omitempty"`
// Mandatory Name of the dish (EAT-API naming scheme "MENSA_GARCHING") Must be available int the given mensa
- CafeteriaId string `protobuf:"bytes,2,opt,name=cafeteriaId,proto3" json:"cafeteriaId,omitempty"`
+ CanteenId string `protobuf:"bytes,2,opt,name=canteen_id,json=canteenId,proto3" json:"canteen_id,omitempty"`
// Mandatory Name of the dish (EAT-API naming scheme) Must be available int the given mensa
Dish string `protobuf:"bytes,3,opt,name=dish,proto3" json:"dish,omitempty"`
// Optional JPEG image in Base64
Image []byte `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty"`
// Optional list of tag ratings add as many tags with a rating (1-5) of the list of dishRatingTags
- RatingTags []*RatingTag `protobuf:"bytes,5,rep,name=ratingTags,proto3" json:"ratingTags,omitempty"`
+ RatingTags []*RatingTag `protobuf:"bytes,5,rep,name=rating_tags,json=ratingTags,proto3" json:"rating_tags,omitempty"`
// Optional comment (max 256 chars)
Comment string `protobuf:"bytes,7,opt,name=comment,proto3" json:"comment,omitempty"`
}
-func (x *NewDishRatingRequest) Reset() {
- *x = NewDishRatingRequest{}
+func (x *CreateDishRatingRequest) Reset() {
+ *x = CreateDishRatingRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1722,13 +1809,13 @@ func (x *NewDishRatingRequest) Reset() {
}
}
-func (x *NewDishRatingRequest) String() string {
+func (x *CreateDishRatingRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*NewDishRatingRequest) ProtoMessage() {}
+func (*CreateDishRatingRequest) ProtoMessage() {}
-func (x *NewDishRatingRequest) ProtoReflect() protoreflect.Message {
+func (x *CreateDishRatingRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[26]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1740,63 +1827,61 @@ func (x *NewDishRatingRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use NewDishRatingRequest.ProtoReflect.Descriptor instead.
-func (*NewDishRatingRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use CreateDishRatingRequest.ProtoReflect.Descriptor instead.
+func (*CreateDishRatingRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{26}
}
-func (x *NewDishRatingRequest) GetPoints() int32 {
+func (x *CreateDishRatingRequest) GetPoints() int32 {
if x != nil {
return x.Points
}
return 0
}
-func (x *NewDishRatingRequest) GetCafeteriaId() string {
+func (x *CreateDishRatingRequest) GetCanteenId() string {
if x != nil {
- return x.CafeteriaId
+ return x.CanteenId
}
return ""
}
-func (x *NewDishRatingRequest) GetDish() string {
+func (x *CreateDishRatingRequest) GetDish() string {
if x != nil {
return x.Dish
}
return ""
}
-func (x *NewDishRatingRequest) GetImage() []byte {
+func (x *CreateDishRatingRequest) GetImage() []byte {
if x != nil {
return x.Image
}
return nil
}
-func (x *NewDishRatingRequest) GetRatingTags() []*RatingTag {
+func (x *CreateDishRatingRequest) GetRatingTags() []*RatingTag {
if x != nil {
return x.RatingTags
}
return nil
}
-func (x *NewDishRatingRequest) GetComment() string {
+func (x *CreateDishRatingRequest) GetComment() string {
if x != nil {
return x.Comment
}
return ""
}
-type GetTagsReply struct {
+type ListAvailableDishTagsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- RatingTags []*TagsOverview `protobuf:"bytes,1,rep,name=ratingTags,proto3" json:"ratingTags,omitempty"`
}
-func (x *GetTagsReply) Reset() {
- *x = GetTagsReply{}
+func (x *ListAvailableDishTagsRequest) Reset() {
+ *x = ListAvailableDishTagsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1804,13 +1889,13 @@ func (x *GetTagsReply) Reset() {
}
}
-func (x *GetTagsReply) String() string {
+func (x *ListAvailableDishTagsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetTagsReply) ProtoMessage() {}
+func (*ListAvailableDishTagsRequest) ProtoMessage() {}
-func (x *GetTagsReply) ProtoReflect() protoreflect.Message {
+func (x *ListAvailableDishTagsRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[27]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1822,30 +1907,21 @@ func (x *GetTagsReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetTagsReply.ProtoReflect.Descriptor instead.
-func (*GetTagsReply) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListAvailableDishTagsRequest.ProtoReflect.Descriptor instead.
+func (*ListAvailableDishTagsRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{27}
}
-func (x *GetTagsReply) GetRatingTags() []*TagsOverview {
- if x != nil {
- return x.RatingTags
- }
- return nil
-}
-
-type TagsOverview struct {
+type ListAvailableDishTagsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- TagId int32 `protobuf:"varint,1,opt,name=tagId,proto3" json:"tagId,omitempty"`
- De string `protobuf:"bytes,2,opt,name=de,proto3" json:"de,omitempty"`
- En string `protobuf:"bytes,3,opt,name=en,proto3" json:"en,omitempty"`
+ RatingTags []*TagsOverview `protobuf:"bytes,1,rep,name=rating_tags,json=ratingTags,proto3" json:"rating_tags,omitempty"`
}
-func (x *TagsOverview) Reset() {
- *x = TagsOverview{}
+func (x *ListAvailableDishTagsReply) Reset() {
+ *x = ListAvailableDishTagsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1853,13 +1929,13 @@ func (x *TagsOverview) Reset() {
}
}
-func (x *TagsOverview) String() string {
+func (x *ListAvailableDishTagsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*TagsOverview) ProtoMessage() {}
+func (*ListAvailableDishTagsReply) ProtoMessage() {}
-func (x *TagsOverview) ProtoReflect() protoreflect.Message {
+func (x *ListAvailableDishTagsReply) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[28]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1871,43 +1947,26 @@ func (x *TagsOverview) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use TagsOverview.ProtoReflect.Descriptor instead.
-func (*TagsOverview) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListAvailableDishTagsReply.ProtoReflect.Descriptor instead.
+func (*ListAvailableDishTagsReply) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{28}
}
-func (x *TagsOverview) GetTagId() int32 {
- if x != nil {
- return x.TagId
- }
- return 0
-}
-
-func (x *TagsOverview) GetDe() string {
- if x != nil {
- return x.De
- }
- return ""
-}
-
-func (x *TagsOverview) GetEn() string {
+func (x *ListAvailableDishTagsReply) GetRatingTags() []*TagsOverview {
if x != nil {
- return x.En
+ return x.RatingTags
}
- return ""
+ return nil
}
-type RatingTag struct {
+type ListNameTagsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- TagId int32 `protobuf:"varint,1,opt,name=tagId,proto3" json:"tagId,omitempty"`
- Points float64 `protobuf:"fixed64,2,opt,name=points,proto3" json:"points,omitempty"`
}
-func (x *RatingTag) Reset() {
- *x = RatingTag{}
+func (x *ListNameTagsRequest) Reset() {
+ *x = ListNameTagsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1915,13 +1974,13 @@ func (x *RatingTag) Reset() {
}
}
-func (x *RatingTag) String() string {
+func (x *ListNameTagsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*RatingTag) ProtoMessage() {}
+func (*ListNameTagsRequest) ProtoMessage() {}
-func (x *RatingTag) ProtoReflect() protoreflect.Message {
+func (x *ListNameTagsRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[29]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1933,36 +1992,21 @@ func (x *RatingTag) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use RatingTag.ProtoReflect.Descriptor instead.
-func (*RatingTag) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListNameTagsRequest.ProtoReflect.Descriptor instead.
+func (*ListNameTagsRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{29}
}
-func (x *RatingTag) GetTagId() int32 {
- if x != nil {
- return x.TagId
- }
- return 0
-}
-
-func (x *RatingTag) GetPoints() float64 {
- if x != nil {
- return x.Points
- }
- return 0
-}
-
-type RatingTagNewRequest struct {
+type ListNameTagsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- TagId int32 `protobuf:"varint,1,opt,name=tagId,proto3" json:"tagId,omitempty"`
- Points int32 `protobuf:"varint,2,opt,name=points,proto3" json:"points,omitempty"`
+ RatingTags []*TagsOverview `protobuf:"bytes,1,rep,name=rating_tags,json=ratingTags,proto3" json:"rating_tags,omitempty"`
}
-func (x *RatingTagNewRequest) Reset() {
- *x = RatingTagNewRequest{}
+func (x *ListNameTagsReply) Reset() {
+ *x = ListNameTagsReply{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1970,13 +2014,13 @@ func (x *RatingTagNewRequest) Reset() {
}
}
-func (x *RatingTagNewRequest) String() string {
+func (x *ListNameTagsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*RatingTagNewRequest) ProtoMessage() {}
+func (*ListNameTagsReply) ProtoMessage() {}
-func (x *RatingTagNewRequest) ProtoReflect() protoreflect.Message {
+func (x *ListNameTagsReply) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[30]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1988,39 +2032,26 @@ func (x *RatingTagNewRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use RatingTagNewRequest.ProtoReflect.Descriptor instead.
-func (*RatingTagNewRequest) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListNameTagsReply.ProtoReflect.Descriptor instead.
+func (*ListNameTagsReply) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{30}
}
-func (x *RatingTagNewRequest) GetTagId() int32 {
+func (x *ListNameTagsReply) GetRatingTags() []*TagsOverview {
if x != nil {
- return x.TagId
- }
- return 0
-}
-
-func (x *RatingTagNewRequest) GetPoints() int32 {
- if x != nil {
- return x.Points
+ return x.RatingTags
}
- return 0
+ return nil
}
-type RatingTagResult struct {
+type ListAvailableCanteenTagsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- TagId int32 `protobuf:"varint,1,opt,name=tagId,proto3" json:"tagId,omitempty"`
- Avg float64 `protobuf:"fixed64,2,opt,name=avg,proto3" json:"avg,omitempty"`
- Std float64 `protobuf:"fixed64,3,opt,name=std,proto3" json:"std,omitempty"`
- Min int32 `protobuf:"varint,4,opt,name=min,proto3" json:"min,omitempty"`
- Max int32 `protobuf:"varint,5,opt,name=max,proto3" json:"max,omitempty"`
}
-func (x *RatingTagResult) Reset() {
- *x = RatingTagResult{}
+func (x *ListAvailableCanteenTagsRequest) Reset() {
+ *x = ListAvailableCanteenTagsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_tumdev_campus_backend_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -2028,13 +2059,13 @@ func (x *RatingTagResult) Reset() {
}
}
-func (x *RatingTagResult) String() string {
+func (x *ListAvailableCanteenTagsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*RatingTagResult) ProtoMessage() {}
+func (*ListAvailableCanteenTagsRequest) ProtoMessage() {}
-func (x *RatingTagResult) ProtoReflect() protoreflect.Message {
+func (x *ListAvailableCanteenTagsRequest) ProtoReflect() protoreflect.Message {
mi := &file_tumdev_campus_backend_proto_msgTypes[31]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -2046,71 +2077,85 @@ func (x *RatingTagResult) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use RatingTagResult.ProtoReflect.Descriptor instead.
-func (*RatingTagResult) Descriptor() ([]byte, []int) {
+// Deprecated: Use ListAvailableCanteenTagsRequest.ProtoReflect.Descriptor instead.
+func (*ListAvailableCanteenTagsRequest) Descriptor() ([]byte, []int) {
return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{31}
}
-func (x *RatingTagResult) GetTagId() int32 {
- if x != nil {
- return x.TagId
- }
- return 0
+type ListAvailableCanteenTagsReply struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RatingTags []*TagsOverview `protobuf:"bytes,1,rep,name=rating_tags,json=ratingTags,proto3" json:"rating_tags,omitempty"`
}
-func (x *RatingTagResult) GetAvg() float64 {
- if x != nil {
- return x.Avg
+func (x *ListAvailableCanteenTagsReply) Reset() {
+ *x = ListAvailableCanteenTagsReply{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
- return 0
}
-func (x *RatingTagResult) GetStd() float64 {
- if x != nil {
- return x.Std
- }
- return 0
+func (x *ListAvailableCanteenTagsReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
}
-func (x *RatingTagResult) GetMin() int32 {
- if x != nil {
- return x.Min
+func (*ListAvailableCanteenTagsReply) ProtoMessage() {}
+
+func (x *ListAvailableCanteenTagsReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[32]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return 0
+ return mi.MessageOf(x)
}
-func (x *RatingTagResult) GetMax() int32 {
+// Deprecated: Use ListAvailableCanteenTagsReply.ProtoReflect.Descriptor instead.
+func (*ListAvailableCanteenTagsReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *ListAvailableCanteenTagsReply) GetRatingTags() []*TagsOverview {
if x != nil {
- return x.Max
+ return x.RatingTags
}
- return 0
+ return nil
}
-type GetCafeteriaReply struct {
+type TagsOverview struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Cafeteria []*Cafeteria `protobuf:"bytes,1,rep,name=cafeteria,proto3" json:"cafeteria,omitempty"`
+ TagId int32 `protobuf:"varint,1,opt,name=tag_id,json=tagId,proto3" json:"tag_id,omitempty"`
+ De string `protobuf:"bytes,2,opt,name=de,proto3" json:"de,omitempty"`
+ En string `protobuf:"bytes,3,opt,name=en,proto3" json:"en,omitempty"`
}
-func (x *GetCafeteriaReply) Reset() {
- *x = GetCafeteriaReply{}
+func (x *TagsOverview) Reset() {
+ *x = TagsOverview{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[32]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetCafeteriaReply) String() string {
+func (x *TagsOverview) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetCafeteriaReply) ProtoMessage() {}
+func (*TagsOverview) ProtoMessage() {}
-func (x *GetCafeteriaReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[32]
+func (x *TagsOverview) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2121,46 +2166,58 @@ func (x *GetCafeteriaReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetCafeteriaReply.ProtoReflect.Descriptor instead.
-func (*GetCafeteriaReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{32}
+// Deprecated: Use TagsOverview.ProtoReflect.Descriptor instead.
+func (*TagsOverview) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *TagsOverview) GetTagId() int32 {
+ if x != nil {
+ return x.TagId
+ }
+ return 0
}
-func (x *GetCafeteriaReply) GetCafeteria() []*Cafeteria {
+func (x *TagsOverview) GetDe() string {
if x != nil {
- return x.Cafeteria
+ return x.De
}
- return nil
+ return ""
}
-type Cafeteria struct {
+func (x *TagsOverview) GetEn() string {
+ if x != nil {
+ return x.En
+ }
+ return ""
+}
+
+type RatingTag struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
- Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"`
- Latitude float64 `protobuf:"fixed64,4,opt,name=latitude,proto3" json:"latitude,omitempty"`
+ TagId int64 `protobuf:"varint,1,opt,name=tag_id,json=tagId,proto3" json:"tag_id,omitempty"`
+ Points float64 `protobuf:"fixed64,2,opt,name=points,proto3" json:"points,omitempty"`
}
-func (x *Cafeteria) Reset() {
- *x = Cafeteria{}
+func (x *RatingTag) Reset() {
+ *x = RatingTag{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[33]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *Cafeteria) String() string {
+func (x *RatingTag) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Cafeteria) ProtoMessage() {}
+func (*RatingTag) ProtoMessage() {}
-func (x *Cafeteria) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[33]
+func (x *RatingTag) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2171,70 +2228,109 @@ func (x *Cafeteria) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Cafeteria.ProtoReflect.Descriptor instead.
-func (*Cafeteria) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{33}
+// Deprecated: Use RatingTag.ProtoReflect.Descriptor instead.
+func (*RatingTag) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{34}
}
-func (x *Cafeteria) GetId() string {
+func (x *RatingTag) GetTagId() int64 {
if x != nil {
- return x.Id
+ return x.TagId
}
- return ""
+ return 0
}
-func (x *Cafeteria) GetAddress() string {
+func (x *RatingTag) GetPoints() float64 {
if x != nil {
- return x.Address
+ return x.Points
}
- return ""
+ return 0
+}
+
+type RatingTagNewRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TagId int32 `protobuf:"varint,1,opt,name=tag_id,json=tagId,proto3" json:"tag_id,omitempty"`
+ Points int32 `protobuf:"varint,2,opt,name=points,proto3" json:"points,omitempty"`
}
-func (x *Cafeteria) GetLongitude() float64 {
+func (x *RatingTagNewRequest) Reset() {
+ *x = RatingTagNewRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RatingTagNewRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RatingTagNewRequest) ProtoMessage() {}
+
+func (x *RatingTagNewRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[35]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RatingTagNewRequest.ProtoReflect.Descriptor instead.
+func (*RatingTagNewRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{35}
+}
+
+func (x *RatingTagNewRequest) GetTagId() int32 {
if x != nil {
- return x.Longitude
+ return x.TagId
}
return 0
}
-func (x *Cafeteria) GetLatitude() float64 {
+func (x *RatingTagNewRequest) GetPoints() int32 {
if x != nil {
- return x.Latitude
+ return x.Points
}
return 0
}
-type GetDishesRequest struct {
+type RatingTagResult struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- CafeteriaId string `protobuf:"bytes,1,opt,name=cafeteriaId,proto3" json:"cafeteriaId,omitempty"`
- // >=2022 until the current year
- Year int32 `protobuf:"varint,2,opt,name=year,proto3" json:"year,omitempty"`
- // range 1 - 53
- Week int32 `protobuf:"varint,3,opt,name=week,proto3" json:"week,omitempty"`
- // range 0 (Monday) - 4 (Friday)
- Day int32 `protobuf:"varint,4,opt,name=day,proto3" json:"day,omitempty"`
+ TagId int32 `protobuf:"varint,1,opt,name=tag_id,json=tagId,proto3" json:"tag_id,omitempty"`
+ Avg float64 `protobuf:"fixed64,2,opt,name=avg,proto3" json:"avg,omitempty"`
+ Std float64 `protobuf:"fixed64,3,opt,name=std,proto3" json:"std,omitempty"`
+ Min int32 `protobuf:"varint,4,opt,name=min,proto3" json:"min,omitempty"`
+ Max int32 `protobuf:"varint,5,opt,name=max,proto3" json:"max,omitempty"`
}
-func (x *GetDishesRequest) Reset() {
- *x = GetDishesRequest{}
+func (x *RatingTagResult) Reset() {
+ *x = RatingTagResult{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[34]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetDishesRequest) String() string {
+func (x *RatingTagResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetDishesRequest) ProtoMessage() {}
+func (*RatingTagResult) ProtoMessage() {}
-func (x *GetDishesRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[34]
+func (x *RatingTagResult) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[36]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2245,64 +2341,69 @@ func (x *GetDishesRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetDishesRequest.ProtoReflect.Descriptor instead.
-func (*GetDishesRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{34}
+// Deprecated: Use RatingTagResult.ProtoReflect.Descriptor instead.
+func (*RatingTagResult) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{36}
}
-func (x *GetDishesRequest) GetCafeteriaId() string {
+func (x *RatingTagResult) GetTagId() int32 {
if x != nil {
- return x.CafeteriaId
+ return x.TagId
}
- return ""
+ return 0
}
-func (x *GetDishesRequest) GetYear() int32 {
+func (x *RatingTagResult) GetAvg() float64 {
if x != nil {
- return x.Year
+ return x.Avg
}
return 0
}
-func (x *GetDishesRequest) GetWeek() int32 {
+func (x *RatingTagResult) GetStd() float64 {
if x != nil {
- return x.Week
+ return x.Std
}
return 0
}
-func (x *GetDishesRequest) GetDay() int32 {
+func (x *RatingTagResult) GetMin() int32 {
if x != nil {
- return x.Day
+ return x.Min
}
return 0
}
-type GetDishesReply struct {
+func (x *RatingTagResult) GetMax() int32 {
+ if x != nil {
+ return x.Max
+ }
+ return 0
+}
+
+type ListCanteensRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- Dish []string `protobuf:"bytes,1,rep,name=dish,proto3" json:"dish,omitempty"`
}
-func (x *GetDishesReply) Reset() {
- *x = GetDishesReply{}
+func (x *ListCanteensRequest) Reset() {
+ *x = ListCanteensRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[35]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetDishesReply) String() string {
+func (x *ListCanteensRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetDishesReply) ProtoMessage() {}
+func (*ListCanteensRequest) ProtoMessage() {}
-func (x *GetDishesReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[35]
+func (x *ListCanteensRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[37]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2313,43 +2414,36 @@ func (x *GetDishesReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetDishesReply.ProtoReflect.Descriptor instead.
-func (*GetDishesReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{35}
-}
-
-func (x *GetDishesReply) GetDish() []string {
- if x != nil {
- return x.Dish
- }
- return nil
+// Deprecated: Use ListCanteensRequest.ProtoReflect.Descriptor instead.
+func (*ListCanteensRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{37}
}
-type GetResponsiblePersonReply struct {
+type ListCanteensReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- ResponsiblePerson []*ResponsiblePersonElement `protobuf:"bytes,1,rep,name=responsiblePerson,proto3" json:"responsiblePerson,omitempty"`
+ Canteen []*Canteen `protobuf:"bytes,1,rep,name=canteen,proto3" json:"canteen,omitempty"`
}
-func (x *GetResponsiblePersonReply) Reset() {
- *x = GetResponsiblePersonReply{}
+func (x *ListCanteensReply) Reset() {
+ *x = ListCanteensReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[36]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[38]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetResponsiblePersonReply) String() string {
+func (x *ListCanteensReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetResponsiblePersonReply) ProtoMessage() {}
+func (*ListCanteensReply) ProtoMessage() {}
-func (x *GetResponsiblePersonReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[36]
+func (x *ListCanteensReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[38]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2360,47 +2454,46 @@ func (x *GetResponsiblePersonReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetResponsiblePersonReply.ProtoReflect.Descriptor instead.
-func (*GetResponsiblePersonReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{36}
+// Deprecated: Use ListCanteensReply.ProtoReflect.Descriptor instead.
+func (*ListCanteensReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{38}
}
-func (x *GetResponsiblePersonReply) GetResponsiblePerson() []*ResponsiblePersonElement {
+func (x *ListCanteensReply) GetCanteen() []*Canteen {
if x != nil {
- return x.ResponsiblePerson
+ return x.Canteen
}
return nil
}
-type ResponsiblePersonElement struct {
+type Canteen struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Telephone string `protobuf:"bytes,2,opt,name=telephone,proto3" json:"telephone,omitempty"`
- Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
- Faculty string `protobuf:"bytes,4,opt,name=faculty,proto3" json:"faculty,omitempty"`
- TumID string `protobuf:"bytes,5,opt,name=tumID,proto3" json:"tumID,omitempty"`
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
+ Longitude float64 `protobuf:"fixed64,3,opt,name=longitude,proto3" json:"longitude,omitempty"`
+ Latitude float64 `protobuf:"fixed64,4,opt,name=latitude,proto3" json:"latitude,omitempty"`
}
-func (x *ResponsiblePersonElement) Reset() {
- *x = ResponsiblePersonElement{}
+func (x *Canteen) Reset() {
+ *x = Canteen{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[37]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[39]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *ResponsiblePersonElement) String() string {
+func (x *Canteen) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ResponsiblePersonElement) ProtoMessage() {}
+func (*Canteen) ProtoMessage() {}
-func (x *ResponsiblePersonElement) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[37]
+func (x *Canteen) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[39]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2411,71 +2504,70 @@ func (x *ResponsiblePersonElement) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ResponsiblePersonElement.ProtoReflect.Descriptor instead.
-func (*ResponsiblePersonElement) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{37}
-}
-
-func (x *ResponsiblePersonElement) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
+// Deprecated: Use Canteen.ProtoReflect.Descriptor instead.
+func (*Canteen) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{39}
}
-func (x *ResponsiblePersonElement) GetTelephone() string {
+func (x *Canteen) GetId() string {
if x != nil {
- return x.Telephone
+ return x.Id
}
return ""
}
-func (x *ResponsiblePersonElement) GetEmail() string {
+func (x *Canteen) GetAddress() string {
if x != nil {
- return x.Email
+ return x.Address
}
return ""
}
-func (x *ResponsiblePersonElement) GetFaculty() string {
+func (x *Canteen) GetLongitude() float64 {
if x != nil {
- return x.Faculty
+ return x.Longitude
}
- return ""
+ return 0
}
-func (x *ResponsiblePersonElement) GetTumID() string {
+func (x *Canteen) GetLatitude() float64 {
if x != nil {
- return x.TumID
+ return x.Latitude
}
- return ""
+ return 0
}
-type GetBuilding2GpsReply struct {
+type ListDishesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Building2Gps []*Building2GpsElement `protobuf:"bytes,1,rep,name=building2Gps,proto3" json:"building2Gps,omitempty"`
+ CanteenId string `protobuf:"bytes,1,opt,name=canteen_id,json=canteenId,proto3" json:"canteen_id,omitempty"`
+ // >=2022 until the current year
+ Year int32 `protobuf:"varint,2,opt,name=year,proto3" json:"year,omitempty"`
+ // range 1 - 53
+ Week int32 `protobuf:"varint,3,opt,name=week,proto3" json:"week,omitempty"`
+ // range 0 (Monday) - 4 (Friday)
+ Day int32 `protobuf:"varint,4,opt,name=day,proto3" json:"day,omitempty"`
}
-func (x *GetBuilding2GpsReply) Reset() {
- *x = GetBuilding2GpsReply{}
+func (x *ListDishesRequest) Reset() {
+ *x = ListDishesRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[38]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[40]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetBuilding2GpsReply) String() string {
+func (x *ListDishesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetBuilding2GpsReply) ProtoMessage() {}
+func (*ListDishesRequest) ProtoMessage() {}
-func (x *GetBuilding2GpsReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[38]
+func (x *ListDishesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[40]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2486,45 +2578,64 @@ func (x *GetBuilding2GpsReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetBuilding2GpsReply.ProtoReflect.Descriptor instead.
-func (*GetBuilding2GpsReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{38}
+// Deprecated: Use ListDishesRequest.ProtoReflect.Descriptor instead.
+func (*ListDishesRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{40}
}
-func (x *GetBuilding2GpsReply) GetBuilding2Gps() []*Building2GpsElement {
+func (x *ListDishesRequest) GetCanteenId() string {
if x != nil {
- return x.Building2Gps
+ return x.CanteenId
}
- return nil
+ return ""
+}
+
+func (x *ListDishesRequest) GetYear() int32 {
+ if x != nil {
+ return x.Year
+ }
+ return 0
+}
+
+func (x *ListDishesRequest) GetWeek() int32 {
+ if x != nil {
+ return x.Week
+ }
+ return 0
+}
+
+func (x *ListDishesRequest) GetDay() int32 {
+ if x != nil {
+ return x.Day
+ }
+ return 0
}
-type Building2GpsElement struct {
+type ListDishesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Latitude string `protobuf:"bytes,2,opt,name=latitude,proto3" json:"latitude,omitempty"`
- Longitude string `protobuf:"bytes,3,opt,name=longitude,proto3" json:"longitude,omitempty"`
+ Dish []string `protobuf:"bytes,1,rep,name=dish,proto3" json:"dish,omitempty"`
}
-func (x *Building2GpsElement) Reset() {
- *x = Building2GpsElement{}
+func (x *ListDishesReply) Reset() {
+ *x = ListDishesReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[39]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[41]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *Building2GpsElement) String() string {
+func (x *ListDishesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*Building2GpsElement) ProtoMessage() {}
+func (*ListDishesReply) ProtoMessage() {}
-func (x *Building2GpsElement) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[39]
+func (x *ListDishesReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[41]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2535,57 +2646,41 @@ func (x *Building2GpsElement) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use Building2GpsElement.ProtoReflect.Descriptor instead.
-func (*Building2GpsElement) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{39}
-}
-
-func (x *Building2GpsElement) GetId() string {
- if x != nil {
- return x.Id
- }
- return ""
-}
-
-func (x *Building2GpsElement) GetLatitude() string {
- if x != nil {
- return x.Latitude
- }
- return ""
+// Deprecated: Use ListDishesReply.ProtoReflect.Descriptor instead.
+func (*ListDishesReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{41}
}
-func (x *Building2GpsElement) GetLongitude() string {
+func (x *ListDishesReply) GetDish() []string {
if x != nil {
- return x.Longitude
+ return x.Dish
}
- return ""
+ return nil
}
-type GetAreaFacilitiesByBuildingNrReply struct {
+type ListResponsiblePersonRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- AreaFacilitiesByBuildingNr []*RoomInformationElement `protobuf:"bytes,1,rep,name=areaFacilitiesByBuildingNr,proto3" json:"areaFacilitiesByBuildingNr,omitempty"`
}
-func (x *GetAreaFacilitiesByBuildingNrReply) Reset() {
- *x = GetAreaFacilitiesByBuildingNrReply{}
+func (x *ListResponsiblePersonRequest) Reset() {
+ *x = ListResponsiblePersonRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[40]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[42]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetAreaFacilitiesByBuildingNrReply) String() string {
+func (x *ListResponsiblePersonRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetAreaFacilitiesByBuildingNrReply) ProtoMessage() {}
+func (*ListResponsiblePersonRequest) ProtoMessage() {}
-func (x *GetAreaFacilitiesByBuildingNrReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[40]
+func (x *ListResponsiblePersonRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[42]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2596,43 +2691,36 @@ func (x *GetAreaFacilitiesByBuildingNrReply) ProtoReflect() protoreflect.Message
return mi.MessageOf(x)
}
-// Deprecated: Use GetAreaFacilitiesByBuildingNrReply.ProtoReflect.Descriptor instead.
-func (*GetAreaFacilitiesByBuildingNrReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{40}
-}
-
-func (x *GetAreaFacilitiesByBuildingNrReply) GetAreaFacilitiesByBuildingNr() []*RoomInformationElement {
- if x != nil {
- return x.AreaFacilitiesByBuildingNr
- }
- return nil
+// Deprecated: Use ListResponsiblePersonRequest.ProtoReflect.Descriptor instead.
+func (*ListResponsiblePersonRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{42}
}
-type GetAreaFacilitiesByBuildingNrRequest struct {
+type ListResponsiblePersonReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- BuildingNr string `protobuf:"bytes,1,opt,name=building_nr,json=buildingNr,proto3" json:"building_nr,omitempty"`
+ ResponsiblePerson []*ResponsiblePerson `protobuf:"bytes,1,rep,name=responsible_person,json=responsiblePerson,proto3" json:"responsible_person,omitempty"`
}
-func (x *GetAreaFacilitiesByBuildingNrRequest) Reset() {
- *x = GetAreaFacilitiesByBuildingNrRequest{}
+func (x *ListResponsiblePersonReply) Reset() {
+ *x = ListResponsiblePersonReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[41]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[43]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetAreaFacilitiesByBuildingNrRequest) String() string {
+func (x *ListResponsiblePersonReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetAreaFacilitiesByBuildingNrRequest) ProtoMessage() {}
+func (*ListResponsiblePersonReply) ProtoMessage() {}
-func (x *GetAreaFacilitiesByBuildingNrRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[41]
+func (x *ListResponsiblePersonReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[43]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2643,43 +2731,47 @@ func (x *GetAreaFacilitiesByBuildingNrRequest) ProtoReflect() protoreflect.Messa
return mi.MessageOf(x)
}
-// Deprecated: Use GetAreaFacilitiesByBuildingNrRequest.ProtoReflect.Descriptor instead.
-func (*GetAreaFacilitiesByBuildingNrRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{41}
+// Deprecated: Use ListResponsiblePersonReply.ProtoReflect.Descriptor instead.
+func (*ListResponsiblePersonReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{43}
}
-func (x *GetAreaFacilitiesByBuildingNrRequest) GetBuildingNr() string {
+func (x *ListResponsiblePersonReply) GetResponsiblePerson() []*ResponsiblePerson {
if x != nil {
- return x.BuildingNr
+ return x.ResponsiblePerson
}
- return ""
+ return nil
}
-type GetListOfToiletsReply struct {
+type ResponsiblePerson struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- ListOfToilets []*RoomInformationElement `protobuf:"bytes,1,rep,name=listOfToilets,proto3" json:"listOfToilets,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Telephone string `protobuf:"bytes,2,opt,name=telephone,proto3" json:"telephone,omitempty"`
+ Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
+ Faculty string `protobuf:"bytes,4,opt,name=faculty,proto3" json:"faculty,omitempty"`
+ TumId string `protobuf:"bytes,5,opt,name=tum_id,json=tumId,proto3" json:"tum_id,omitempty"`
}
-func (x *GetListOfToiletsReply) Reset() {
- *x = GetListOfToiletsReply{}
+func (x *ResponsiblePerson) Reset() {
+ *x = ResponsiblePerson{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[42]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[44]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetListOfToiletsReply) String() string {
+func (x *ResponsiblePerson) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetListOfToiletsReply) ProtoMessage() {}
+func (*ResponsiblePerson) ProtoMessage() {}
-func (x *GetListOfToiletsReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[42]
+func (x *ResponsiblePerson) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[44]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2690,16 +2782,44 @@ func (x *GetListOfToiletsReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetListOfToiletsReply.ProtoReflect.Descriptor instead.
-func (*GetListOfToiletsReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{42}
+// Deprecated: Use ResponsiblePerson.ProtoReflect.Descriptor instead.
+func (*ResponsiblePerson) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{44}
}
-func (x *GetListOfToiletsReply) GetListOfToilets() []*RoomInformationElement {
+func (x *ResponsiblePerson) GetName() string {
if x != nil {
- return x.ListOfToilets
+ return x.Name
}
- return nil
+ return ""
+}
+
+func (x *ResponsiblePerson) GetTelephone() string {
+ if x != nil {
+ return x.Telephone
+ }
+ return ""
+}
+
+func (x *ResponsiblePerson) GetEmail() string {
+ if x != nil {
+ return x.Email
+ }
+ return ""
+}
+
+func (x *ResponsiblePerson) GetFaculty() string {
+ if x != nil {
+ return x.Faculty
+ }
+ return ""
+}
+
+func (x *ResponsiblePerson) GetTumId() string {
+ if x != nil {
+ return x.TumId
+ }
+ return ""
}
type RoomInformationElement struct {
@@ -2707,7 +2827,7 @@ type RoomInformationElement struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- RoomId int32 `protobuf:"varint,1,opt,name=roomId,proto3" json:"roomId,omitempty"`
+ RoomId int32 `protobuf:"varint,1,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
RoomCode string `protobuf:"bytes,2,opt,name=room_code,json=roomCode,proto3" json:"room_code,omitempty"`
BuildingNr string `protobuf:"bytes,3,opt,name=building_nr,json=buildingNr,proto3" json:"building_nr,omitempty"`
ArchId string `protobuf:"bytes,4,opt,name=arch_id,json=archId,proto3" json:"arch_id,omitempty"`
@@ -2721,7 +2841,7 @@ type RoomInformationElement struct {
func (x *RoomInformationElement) Reset() {
*x = RoomInformationElement{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[43]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[45]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2734,7 +2854,7 @@ func (x *RoomInformationElement) String() string {
func (*RoomInformationElement) ProtoMessage() {}
func (x *RoomInformationElement) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[43]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[45]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2747,7 +2867,7 @@ func (x *RoomInformationElement) ProtoReflect() protoreflect.Message {
// Deprecated: Use RoomInformationElement.ProtoReflect.Descriptor instead.
func (*RoomInformationElement) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{43}
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{45}
}
func (x *RoomInformationElement) GetRoomId() int32 {
@@ -2813,31 +2933,29 @@ func (x *RoomInformationElement) GetName() string {
return ""
}
-type GetListOfElevatorsReply struct {
+type ListMoreInformationRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
-
- ListOfElevators []*RoomInformationElement `protobuf:"bytes,1,rep,name=listOfElevators,proto3" json:"listOfElevators,omitempty"`
}
-func (x *GetListOfElevatorsReply) Reset() {
- *x = GetListOfElevatorsReply{}
+func (x *ListMoreInformationRequest) Reset() {
+ *x = ListMoreInformationRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[44]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[46]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetListOfElevatorsReply) String() string {
+func (x *ListMoreInformationRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetListOfElevatorsReply) ProtoMessage() {}
+func (*ListMoreInformationRequest) ProtoMessage() {}
-func (x *GetListOfElevatorsReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[44]
+func (x *ListMoreInformationRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[46]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2848,43 +2966,36 @@ func (x *GetListOfElevatorsReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetListOfElevatorsReply.ProtoReflect.Descriptor instead.
-func (*GetListOfElevatorsReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{44}
-}
-
-func (x *GetListOfElevatorsReply) GetListOfElevators() []*RoomInformationElement {
- if x != nil {
- return x.ListOfElevators
- }
- return nil
+// Deprecated: Use ListMoreInformationRequest.ProtoReflect.Descriptor instead.
+func (*ListMoreInformationRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{46}
}
-type GetMoreInformationReply struct {
+type ListMoreInformationReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Information []*MoreInformationElement `protobuf:"bytes,1,rep,name=information,proto3" json:"information,omitempty"`
+ Infos []*ListMoreInformationReply_MoreInformation `protobuf:"bytes,1,rep,name=infos,proto3" json:"infos,omitempty"`
}
-func (x *GetMoreInformationReply) Reset() {
- *x = GetMoreInformationReply{}
+func (x *ListMoreInformationReply) Reset() {
+ *x = ListMoreInformationReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[45]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[47]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetMoreInformationReply) String() string {
+func (x *ListMoreInformationReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetMoreInformationReply) ProtoMessage() {}
+func (*ListMoreInformationReply) ProtoMessage() {}
-func (x *GetMoreInformationReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[45]
+func (x *ListMoreInformationReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[47]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2895,82 +3006,19 @@ func (x *GetMoreInformationReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetMoreInformationReply.ProtoReflect.Descriptor instead.
-func (*GetMoreInformationReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{45}
+// Deprecated: Use ListMoreInformationReply.ProtoReflect.Descriptor instead.
+func (*ListMoreInformationReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{47}
}
-func (x *GetMoreInformationReply) GetInformation() []*MoreInformationElement {
+func (x *ListMoreInformationReply) GetInfos() []*ListMoreInformationReply_MoreInformation {
if x != nil {
- return x.Information
+ return x.Infos
}
return nil
}
-type MoreInformationElement struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
- Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"`
- Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
-}
-
-func (x *MoreInformationElement) Reset() {
- *x = MoreInformationElement{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[46]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *MoreInformationElement) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*MoreInformationElement) ProtoMessage() {}
-
-func (x *MoreInformationElement) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[46]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use MoreInformationElement.ProtoReflect.Descriptor instead.
-func (*MoreInformationElement) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{46}
-}
-
-func (x *MoreInformationElement) GetTitle() string {
- if x != nil {
- return x.Title
- }
- return ""
-}
-
-func (x *MoreInformationElement) GetCategory() string {
- if x != nil {
- return x.Category
- }
- return ""
-}
-
-func (x *MoreInformationElement) GetUrl() string {
- if x != nil {
- return x.Url
- }
- return ""
-}
-
-type GetOpeningTimesRequest struct {
+type ListOpeningTimesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -2978,23 +3026,23 @@ type GetOpeningTimesRequest struct {
Language string `protobuf:"bytes,1,opt,name=language,proto3" json:"language,omitempty"`
}
-func (x *GetOpeningTimesRequest) Reset() {
- *x = GetOpeningTimesRequest{}
+func (x *ListOpeningTimesRequest) Reset() {
+ *x = ListOpeningTimesRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[47]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[48]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetOpeningTimesRequest) String() string {
+func (x *ListOpeningTimesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetOpeningTimesRequest) ProtoMessage() {}
+func (*ListOpeningTimesRequest) ProtoMessage() {}
-func (x *GetOpeningTimesRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[47]
+func (x *ListOpeningTimesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[48]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3005,19 +3053,19 @@ func (x *GetOpeningTimesRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetOpeningTimesRequest.ProtoReflect.Descriptor instead.
-func (*GetOpeningTimesRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{47}
+// Deprecated: Use ListOpeningTimesRequest.ProtoReflect.Descriptor instead.
+func (*ListOpeningTimesRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{48}
}
-func (x *GetOpeningTimesRequest) GetLanguage() string {
+func (x *ListOpeningTimesRequest) GetLanguage() string {
if x != nil {
return x.Language
}
return ""
}
-type GetOpeningTimesReply struct {
+type ListOpeningTimesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -3025,23 +3073,23 @@ type GetOpeningTimesReply struct {
Facilities []*OpeningTimesMsgElement `protobuf:"bytes,1,rep,name=facilities,proto3" json:"facilities,omitempty"`
}
-func (x *GetOpeningTimesReply) Reset() {
- *x = GetOpeningTimesReply{}
+func (x *ListOpeningTimesReply) Reset() {
+ *x = ListOpeningTimesReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[48]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[49]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetOpeningTimesReply) String() string {
+func (x *ListOpeningTimesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetOpeningTimesReply) ProtoMessage() {}
+func (*ListOpeningTimesReply) ProtoMessage() {}
-func (x *GetOpeningTimesReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[48]
+func (x *ListOpeningTimesReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[49]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3052,12 +3100,12 @@ func (x *GetOpeningTimesReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetOpeningTimesReply.ProtoReflect.Descriptor instead.
-func (*GetOpeningTimesReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{48}
+// Deprecated: Use ListOpeningTimesReply.ProtoReflect.Descriptor instead.
+func (*ListOpeningTimesReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{49}
}
-func (x *GetOpeningTimesReply) GetFacilities() []*OpeningTimesMsgElement {
+func (x *ListOpeningTimesReply) GetFacilities() []*OpeningTimesMsgElement {
if x != nil {
return x.Facilities
}
@@ -3085,7 +3133,7 @@ type OpeningTimesMsgElement struct {
func (x *OpeningTimesMsgElement) Reset() {
*x = OpeningTimesMsgElement{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[49]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[50]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3098,7 +3146,7 @@ func (x *OpeningTimesMsgElement) String() string {
func (*OpeningTimesMsgElement) ProtoMessage() {}
func (x *OpeningTimesMsgElement) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[49]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[50]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3111,7 +3159,7 @@ func (x *OpeningTimesMsgElement) ProtoReflect() protoreflect.Message {
// Deprecated: Use OpeningTimesMsgElement.ProtoReflect.Descriptor instead.
func (*OpeningTimesMsgElement) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{49}
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{50}
}
func (x *OpeningTimesMsgElement) GetId() int32 {
@@ -3196,13 +3244,13 @@ type GetUpdateNoteRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
+ Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
}
func (x *GetUpdateNoteRequest) Reset() {
*x = GetUpdateNoteRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[50]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[51]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3215,7 +3263,7 @@ func (x *GetUpdateNoteRequest) String() string {
func (*GetUpdateNoteRequest) ProtoMessage() {}
func (x *GetUpdateNoteRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[50]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[51]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3228,10 +3276,10 @@ func (x *GetUpdateNoteRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetUpdateNoteRequest.ProtoReflect.Descriptor instead.
func (*GetUpdateNoteRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{50}
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{51}
}
-func (x *GetUpdateNoteRequest) GetVersion() int32 {
+func (x *GetUpdateNoteRequest) GetVersion() int64 {
if x != nil {
return x.Version
}
@@ -3250,7 +3298,7 @@ type GetUpdateNoteReply struct {
func (x *GetUpdateNoteReply) Reset() {
*x = GetUpdateNoteReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[51]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[52]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3263,7 +3311,7 @@ func (x *GetUpdateNoteReply) String() string {
func (*GetUpdateNoteReply) ProtoMessage() {}
func (x *GetUpdateNoteReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[51]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[52]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3276,7 +3324,7 @@ func (x *GetUpdateNoteReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetUpdateNoteReply.ProtoReflect.Descriptor instead.
func (*GetUpdateNoteReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{51}
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{52}
}
func (x *GetUpdateNoteReply) GetMessage() string {
@@ -3293,7 +3341,45 @@ func (x *GetUpdateNoteReply) GetVersionName() string {
return ""
}
-type GetStudyRoomListReply struct {
+type ListStudyRoomsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *ListStudyRoomsRequest) Reset() {
+ *x = ListStudyRoomsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[53]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListStudyRoomsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListStudyRoomsRequest) ProtoMessage() {}
+
+func (x *ListStudyRoomsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[53]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListStudyRoomsRequest.ProtoReflect.Descriptor instead.
+func (*ListStudyRoomsRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{53}
+}
+
+type ListStudyRoomsReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -3301,23 +3387,23 @@ type GetStudyRoomListReply struct {
Rooms []*StudyRoomMsgElement `protobuf:"bytes,1,rep,name=rooms,proto3" json:"rooms,omitempty"`
}
-func (x *GetStudyRoomListReply) Reset() {
- *x = GetStudyRoomListReply{}
+func (x *ListStudyRoomsReply) Reset() {
+ *x = ListStudyRoomsReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[52]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[54]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetStudyRoomListReply) String() string {
+func (x *ListStudyRoomsReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetStudyRoomListReply) ProtoMessage() {}
+func (*ListStudyRoomsReply) ProtoMessage() {}
-func (x *GetStudyRoomListReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[52]
+func (x *ListStudyRoomsReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[54]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3328,12 +3414,12 @@ func (x *GetStudyRoomListReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetStudyRoomListReply.ProtoReflect.Descriptor instead.
-func (*GetStudyRoomListReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{52}
+// Deprecated: Use ListStudyRoomsReply.ProtoReflect.Descriptor instead.
+func (*ListStudyRoomsReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{54}
}
-func (x *GetStudyRoomListReply) GetRooms() []*StudyRoomMsgElement {
+func (x *ListStudyRoomsReply) GetRooms() []*StudyRoomMsgElement {
if x != nil {
return x.Rooms
}
@@ -3354,7 +3440,7 @@ type StudyRoomMsgElement struct {
func (x *StudyRoomMsgElement) Reset() {
*x = StudyRoomMsgElement{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[53]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[55]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3367,7 +3453,7 @@ func (x *StudyRoomMsgElement) String() string {
func (*StudyRoomMsgElement) ProtoMessage() {}
func (x *StudyRoomMsgElement) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[53]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[55]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3380,7 +3466,7 @@ func (x *StudyRoomMsgElement) ProtoReflect() protoreflect.Message {
// Deprecated: Use StudyRoomMsgElement.ProtoReflect.Descriptor instead.
func (*StudyRoomMsgElement) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{53}
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{55}
}
func (x *StudyRoomMsgElement) GetId() int32 {
@@ -3417,7 +3503,7 @@ type StudyRoom struct {
unknownFields protoimpl.UnknownFields
GroupId int32 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
- RoomId int32 `protobuf:"varint,2,opt,name=roomId,proto3" json:"roomId,omitempty"`
+ RoomId int32 `protobuf:"varint,2,opt,name=room_id,json=roomId,proto3" json:"room_id,omitempty"`
RoomCode string `protobuf:"bytes,3,opt,name=room_code,json=roomCode,proto3" json:"room_code,omitempty"`
RoomName string `protobuf:"bytes,4,opt,name=room_name,json=roomName,proto3" json:"room_name,omitempty"`
BuildingName string `protobuf:"bytes,5,opt,name=building_name,json=buildingName,proto3" json:"building_name,omitempty"`
@@ -3426,7 +3512,7 @@ type StudyRoom struct {
func (x *StudyRoom) Reset() {
*x = StudyRoom{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[54]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[56]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -3439,7 +3525,7 @@ func (x *StudyRoom) String() string {
func (*StudyRoom) ProtoMessage() {}
func (x *StudyRoom) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[54]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[56]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3452,7 +3538,7 @@ func (x *StudyRoom) ProtoReflect() protoreflect.Message {
// Deprecated: Use StudyRoom.ProtoReflect.Descriptor instead.
func (*StudyRoom) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{54}
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{56}
}
func (x *StudyRoom) GetGroupId() int32 {
@@ -3490,31 +3576,34 @@ func (x *StudyRoom) GetBuildingName() string {
return ""
}
-type GetKinoRequest struct {
+type ListMoviesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- LastId int32 `protobuf:"varint,1,opt,name=lastId,proto3" json:"lastId,omitempty"`
+ // the last Id you have requested. Use -1 to get all movies
+ LastId int32 `protobuf:"varint,1,opt,name=last_id,json=lastId,proto3" json:"last_id,omitempty"`
+ // the oldest time you want to be included in the response
+ OldestDateAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=oldest_date_at,json=oldestDateAt,proto3" json:"oldest_date_at,omitempty"`
}
-func (x *GetKinoRequest) Reset() {
- *x = GetKinoRequest{}
+func (x *ListMoviesRequest) Reset() {
+ *x = ListMoviesRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[55]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[57]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetKinoRequest) String() string {
+func (x *ListMoviesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetKinoRequest) ProtoMessage() {}
+func (*ListMoviesRequest) ProtoMessage() {}
-func (x *GetKinoRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[55]
+func (x *ListMoviesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[57]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3525,43 +3614,50 @@ func (x *GetKinoRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetKinoRequest.ProtoReflect.Descriptor instead.
-func (*GetKinoRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{55}
+// Deprecated: Use ListMoviesRequest.ProtoReflect.Descriptor instead.
+func (*ListMoviesRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{57}
}
-func (x *GetKinoRequest) GetLastId() int32 {
+func (x *ListMoviesRequest) GetLastId() int32 {
if x != nil {
return x.LastId
}
return 0
}
-type GetKinoReply struct {
+func (x *ListMoviesRequest) GetOldestDateAt() *timestamppb.Timestamp {
+ if x != nil {
+ return x.OldestDateAt
+ }
+ return nil
+}
+
+type ListMoviesReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Kinos []*KinoMsgElement `protobuf:"bytes,1,rep,name=kinos,proto3" json:"kinos,omitempty"`
+ Movies []*Movie `protobuf:"bytes,1,rep,name=movies,proto3" json:"movies,omitempty"`
}
-func (x *GetKinoReply) Reset() {
- *x = GetKinoReply{}
+func (x *ListMoviesReply) Reset() {
+ *x = ListMoviesReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[56]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[58]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetKinoReply) String() string {
+func (x *ListMoviesReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetKinoReply) ProtoMessage() {}
+func (*ListMoviesReply) ProtoMessage() {}
-func (x *GetKinoReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[56]
+func (x *ListMoviesReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[58]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3572,58 +3668,60 @@ func (x *GetKinoReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetKinoReply.ProtoReflect.Descriptor instead.
-func (*GetKinoReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{56}
+// Deprecated: Use ListMoviesReply.ProtoReflect.Descriptor instead.
+func (*ListMoviesReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{58}
}
-func (x *GetKinoReply) GetKinos() []*KinoMsgElement {
+func (x *ListMoviesReply) GetMovies() []*Movie {
if x != nil {
- return x.Kinos
+ return x.Movies
}
return nil
}
-type KinoMsgElement struct {
+type Movie struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
- Kino int32 `protobuf:"varint,3,opt,name=kino,proto3" json:"kino,omitempty"`
- Date *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=date,proto3" json:"date,omitempty"`
- Created *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"`
- Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"`
- Year string `protobuf:"bytes,7,opt,name=year,proto3" json:"year,omitempty"`
- Runtime string `protobuf:"bytes,8,opt,name=runtime,proto3" json:"runtime,omitempty"`
- Genre string `protobuf:"bytes,9,opt,name=genre,proto3" json:"genre,omitempty"`
- Director string `protobuf:"bytes,10,opt,name=director,proto3" json:"director,omitempty"`
- Actors string `protobuf:"bytes,11,opt,name=actors,proto3" json:"actors,omitempty"`
- Rating string `protobuf:"bytes,12,opt,name=rating,proto3" json:"rating,omitempty"`
- Description string `protobuf:"bytes,13,opt,name=description,proto3" json:"description,omitempty"`
- Cover int32 `protobuf:"varint,14,opt,name=cover,proto3" json:"cover,omitempty"`
- Trailer string `protobuf:"bytes,15,opt,name=trailer,proto3" json:"trailer,omitempty"`
- Link string `protobuf:"bytes,16,opt,name=link,proto3" json:"link,omitempty"`
-}
-
-func (x *KinoMsgElement) Reset() {
- *x = KinoMsgElement{}
+ MovieId int64 `protobuf:"varint,3,opt,name=movie_id,json=movieId,proto3" json:"movie_id,omitempty"`
+ Date *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=date,proto3" json:"date,omitempty"`
+ Created *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"`
+ Title string `protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"`
+ // release year of the movie
+ ReleaseYear string `protobuf:"bytes,7,opt,name=release_year,json=releaseYear,proto3" json:"release_year,omitempty"`
+ Runtime string `protobuf:"bytes,8,opt,name=runtime,proto3" json:"runtime,omitempty"`
+ Genre string `protobuf:"bytes,9,opt,name=genre,proto3" json:"genre,omitempty"`
+ Director string `protobuf:"bytes,10,opt,name=director,proto3" json:"director,omitempty"`
+ Actors string `protobuf:"bytes,11,opt,name=actors,proto3" json:"actors,omitempty"`
+ // imdb rating
+ ImdbRating string `protobuf:"bytes,12,opt,name=imdb_rating,json=imdbRating,proto3" json:"imdb_rating,omitempty"`
+ Description string `protobuf:"bytes,13,opt,name=description,proto3" json:"description,omitempty"`
+ CoverId int64 `protobuf:"varint,14,opt,name=cover_id,json=coverId,proto3" json:"cover_id,omitempty"`
+ // Where to find additional information about this movie
+ Link string `protobuf:"bytes,16,opt,name=link,proto3" json:"link,omitempty"`
+ // Where to find a cover image for this movie
+ CoverUrl string `protobuf:"bytes,17,opt,name=cover_url,json=coverUrl,proto3" json:"cover_url,omitempty"`
+}
+
+func (x *Movie) Reset() {
+ *x = Movie{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[57]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[59]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *KinoMsgElement) String() string {
+func (x *Movie) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*KinoMsgElement) ProtoMessage() {}
+func (*Movie) ProtoMessage() {}
-func (x *KinoMsgElement) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[57]
+func (x *Movie) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[59]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3634,156 +3732,149 @@ func (x *KinoMsgElement) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use KinoMsgElement.ProtoReflect.Descriptor instead.
-func (*KinoMsgElement) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{57}
-}
-
-func (x *KinoMsgElement) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-func (x *KinoMsgElement) GetPath() string {
- if x != nil {
- return x.Path
- }
- return ""
+// Deprecated: Use Movie.ProtoReflect.Descriptor instead.
+func (*Movie) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{59}
}
-func (x *KinoMsgElement) GetKino() int32 {
+func (x *Movie) GetMovieId() int64 {
if x != nil {
- return x.Kino
+ return x.MovieId
}
return 0
}
-func (x *KinoMsgElement) GetDate() *timestamppb.Timestamp {
+func (x *Movie) GetDate() *timestamppb.Timestamp {
if x != nil {
return x.Date
}
return nil
}
-func (x *KinoMsgElement) GetCreated() *timestamppb.Timestamp {
+func (x *Movie) GetCreated() *timestamppb.Timestamp {
if x != nil {
return x.Created
}
return nil
}
-func (x *KinoMsgElement) GetTitle() string {
+func (x *Movie) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
-func (x *KinoMsgElement) GetYear() string {
+func (x *Movie) GetReleaseYear() string {
if x != nil {
- return x.Year
+ return x.ReleaseYear
}
return ""
}
-func (x *KinoMsgElement) GetRuntime() string {
+func (x *Movie) GetRuntime() string {
if x != nil {
return x.Runtime
}
return ""
}
-func (x *KinoMsgElement) GetGenre() string {
+func (x *Movie) GetGenre() string {
if x != nil {
return x.Genre
}
return ""
}
-func (x *KinoMsgElement) GetDirector() string {
+func (x *Movie) GetDirector() string {
if x != nil {
return x.Director
}
return ""
}
-func (x *KinoMsgElement) GetActors() string {
+func (x *Movie) GetActors() string {
if x != nil {
return x.Actors
}
return ""
}
-func (x *KinoMsgElement) GetRating() string {
+func (x *Movie) GetImdbRating() string {
if x != nil {
- return x.Rating
+ return x.ImdbRating
}
return ""
}
-func (x *KinoMsgElement) GetDescription() string {
+func (x *Movie) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
-func (x *KinoMsgElement) GetCover() int32 {
+func (x *Movie) GetCoverId() int64 {
if x != nil {
- return x.Cover
+ return x.CoverId
}
return 0
}
-func (x *KinoMsgElement) GetTrailer() string {
+func (x *Movie) GetLink() string {
if x != nil {
- return x.Trailer
+ return x.Link
}
return ""
}
-func (x *KinoMsgElement) GetLink() string {
+func (x *Movie) GetCoverUrl() string {
if x != nil {
- return x.Link
+ return x.CoverUrl
}
return ""
}
-type SendFeedbackRequest struct {
+type CreateFeedbackRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
- Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
- EmailId string `protobuf:"bytes,3,opt,name=emailId,proto3" json:"emailId,omitempty"`
- Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
- ImageCount int32 `protobuf:"varint,5,opt,name=image_count,json=imageCount,proto3" json:"image_count,omitempty"`
- Latitude float64 `protobuf:"fixed64,6,opt,name=latitude,proto3" json:"latitude,omitempty"`
- Longitude float64 `protobuf:"fixed64,7,opt,name=longitude,proto3" json:"longitude,omitempty"`
- OsVersion string `protobuf:"bytes,8,opt,name=osVersion,proto3" json:"osVersion,omitempty"`
- AppVersion string `protobuf:"bytes,9,opt,name=appVersion,proto3" json:"appVersion,omitempty"`
-}
-
-func (x *SendFeedbackRequest) Reset() {
- *x = SendFeedbackRequest{}
+ // who is the feedback for
+ Recipient CreateFeedbackRequest_Recipient `protobuf:"varint,1,opt,name=recipient,proto3,enum=api.CreateFeedbackRequest_Recipient" json:"recipient,omitempty"`
+ // the email address of the user
+ FromEmail string `protobuf:"bytes,2,opt,name=from_email,json=fromEmail,proto3" json:"from_email,omitempty"`
+ // The actual message
+ Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
+ // Optional location which the user can choose (data protection) to attach or not
+ Location *Coordinate `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"`
+ // Optional os information which the user can choose (data protection) to attach or not
+ OsVersion string `protobuf:"bytes,5,opt,name=os_version,json=osVersion,proto3" json:"os_version,omitempty"`
+ // Optional app information which the user can choose (data protection) to attach or not
+ AppVersion string `protobuf:"bytes,6,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
+ // Optional file in Base64.
+ // Accepted file formats: jpeg, jpg, png, webp, md, txt, pdf
+ // Maximum file size 4MB as by Protobuf maximum per request message size
+ Attachment []byte `protobuf:"bytes,7,opt,name=attachment,proto3" json:"attachment,omitempty"`
+}
+
+func (x *CreateFeedbackRequest) Reset() {
+ *x = CreateFeedbackRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[58]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[60]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *SendFeedbackRequest) String() string {
+func (x *CreateFeedbackRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SendFeedbackRequest) ProtoMessage() {}
+func (*CreateFeedbackRequest) ProtoMessage() {}
-func (x *SendFeedbackRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[58]
+func (x *CreateFeedbackRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[60]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3794,75 +3885,154 @@ func (x *SendFeedbackRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SendFeedbackRequest.ProtoReflect.Descriptor instead.
-func (*SendFeedbackRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{58}
+// Deprecated: Use CreateFeedbackRequest.ProtoReflect.Descriptor instead.
+func (*CreateFeedbackRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{60}
+}
+
+func (x *CreateFeedbackRequest) GetRecipient() CreateFeedbackRequest_Recipient {
+ if x != nil {
+ return x.Recipient
+ }
+ return CreateFeedbackRequest_TUM_DEV
}
-func (x *SendFeedbackRequest) GetTopic() string {
+func (x *CreateFeedbackRequest) GetFromEmail() string {
if x != nil {
- return x.Topic
+ return x.FromEmail
}
return ""
}
-func (x *SendFeedbackRequest) GetEmail() string {
+func (x *CreateFeedbackRequest) GetMessage() string {
if x != nil {
- return x.Email
+ return x.Message
}
return ""
}
-func (x *SendFeedbackRequest) GetEmailId() string {
+func (x *CreateFeedbackRequest) GetLocation() *Coordinate {
+ if x != nil {
+ return x.Location
+ }
+ return nil
+}
+
+func (x *CreateFeedbackRequest) GetOsVersion() string {
if x != nil {
- return x.EmailId
+ return x.OsVersion
}
return ""
}
-func (x *SendFeedbackRequest) GetMessage() string {
+func (x *CreateFeedbackRequest) GetAppVersion() string {
if x != nil {
- return x.Message
+ return x.AppVersion
}
return ""
}
-func (x *SendFeedbackRequest) GetImageCount() int32 {
+func (x *CreateFeedbackRequest) GetAttachment() []byte {
if x != nil {
- return x.ImageCount
+ return x.Attachment
}
- return 0
+ return nil
+}
+
+type Coordinate struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
+ Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
}
-func (x *SendFeedbackRequest) GetLatitude() float64 {
+func (x *Coordinate) Reset() {
+ *x = Coordinate{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[61]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Coordinate) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Coordinate) ProtoMessage() {}
+
+func (x *Coordinate) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[61]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Coordinate.ProtoReflect.Descriptor instead.
+func (*Coordinate) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{61}
+}
+
+func (x *Coordinate) GetLatitude() float64 {
if x != nil {
return x.Latitude
}
return 0
}
-func (x *SendFeedbackRequest) GetLongitude() float64 {
+func (x *Coordinate) GetLongitude() float64 {
if x != nil {
return x.Longitude
}
return 0
}
-func (x *SendFeedbackRequest) GetOsVersion() string {
- if x != nil {
- return x.OsVersion
+type CreateFeedbackReply struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *CreateFeedbackReply) Reset() {
+ *x = CreateFeedbackReply{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[62]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
}
- return ""
}
-func (x *SendFeedbackRequest) GetAppVersion() string {
- if x != nil {
- return x.AppVersion
+func (x *CreateFeedbackReply) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateFeedbackReply) ProtoMessage() {}
+
+func (x *CreateFeedbackReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[62]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
}
- return ""
+ return mi.MessageOf(x)
}
-type SendFeedbackImageReply struct {
+// Deprecated: Use CreateFeedbackReply.ProtoReflect.Descriptor instead.
+func (*CreateFeedbackReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{62}
+}
+
+type CreateFeedbackImageReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -3870,23 +4040,23 @@ type SendFeedbackImageReply struct {
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
}
-func (x *SendFeedbackImageReply) Reset() {
- *x = SendFeedbackImageReply{}
+func (x *CreateFeedbackImageReply) Reset() {
+ *x = CreateFeedbackImageReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[59]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[63]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *SendFeedbackImageReply) String() string {
+func (x *CreateFeedbackImageReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SendFeedbackImageReply) ProtoMessage() {}
+func (*CreateFeedbackImageReply) ProtoMessage() {}
-func (x *SendFeedbackImageReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[59]
+func (x *CreateFeedbackImageReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[63]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3897,44 +4067,44 @@ func (x *SendFeedbackImageReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SendFeedbackImageReply.ProtoReflect.Descriptor instead.
-func (*SendFeedbackImageReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{59}
+// Deprecated: Use CreateFeedbackImageReply.ProtoReflect.Descriptor instead.
+func (*CreateFeedbackImageReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{63}
}
-func (x *SendFeedbackImageReply) GetStatus() string {
+func (x *CreateFeedbackImageReply) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
-type SendFeedbackImageRequest struct {
+type CreateFeedbackImageRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
- ImageNr int32 `protobuf:"varint,2,opt,name=imageNr,proto3" json:"imageNr,omitempty"` //todo where does the file come from?
+ ImageNr int32 `protobuf:"varint,2,opt,name=image_nr,json=imageNr,proto3" json:"image_nr,omitempty"` //todo where does the file come from?
}
-func (x *SendFeedbackImageRequest) Reset() {
- *x = SendFeedbackImageRequest{}
+func (x *CreateFeedbackImageRequest) Reset() {
+ *x = CreateFeedbackImageRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[60]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[64]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *SendFeedbackImageRequest) String() string {
+func (x *CreateFeedbackImageRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*SendFeedbackImageRequest) ProtoMessage() {}
+func (*CreateFeedbackImageRequest) ProtoMessage() {}
-func (x *SendFeedbackImageRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[60]
+func (x *CreateFeedbackImageRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[64]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3945,50 +4115,50 @@ func (x *SendFeedbackImageRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use SendFeedbackImageRequest.ProtoReflect.Descriptor instead.
-func (*SendFeedbackImageRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{60}
+// Deprecated: Use CreateFeedbackImageRequest.ProtoReflect.Descriptor instead.
+func (*CreateFeedbackImageRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{64}
}
-func (x *SendFeedbackImageRequest) GetId() int32 {
+func (x *CreateFeedbackImageRequest) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
-func (x *SendFeedbackImageRequest) GetImageNr() int32 {
+func (x *CreateFeedbackImageRequest) GetImageNr() int32 {
if x != nil {
return x.ImageNr
}
return 0
}
-type GetMembersRequest struct {
+type GetMemberRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- LrzId string `protobuf:"bytes,1,opt,name=lrzId,proto3" json:"lrzId,omitempty"`
+ LrzId string `protobuf:"bytes,1,opt,name=lrz_id,json=lrzId,proto3" json:"lrz_id,omitempty"`
}
-func (x *GetMembersRequest) Reset() {
- *x = GetMembersRequest{}
+func (x *GetMemberRequest) Reset() {
+ *x = GetMemberRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[61]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[65]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetMembersRequest) String() string {
+func (x *GetMemberRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetMembersRequest) ProtoMessage() {}
+func (*GetMemberRequest) ProtoMessage() {}
-func (x *GetMembersRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[61]
+func (x *GetMemberRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[65]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -3999,45 +4169,45 @@ func (x *GetMembersRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetMembersRequest.ProtoReflect.Descriptor instead.
-func (*GetMembersRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{61}
+// Deprecated: Use GetMemberRequest.ProtoReflect.Descriptor instead.
+func (*GetMemberRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{65}
}
-func (x *GetMembersRequest) GetLrzId() string {
+func (x *GetMemberRequest) GetLrzId() string {
if x != nil {
return x.LrzId
}
return ""
}
-type GetMembersReply struct {
+type GetMemberReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- LrzId string `protobuf:"bytes,1,opt,name=lrzId,proto3" json:"lrzId,omitempty"`
+ LrzId string `protobuf:"bytes,1,opt,name=lrz_id,json=lrzId,proto3" json:"lrz_id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
- MemberId int32 `protobuf:"varint,3,opt,name=memberId,proto3" json:"memberId,omitempty"`
+ MemberId int32 `protobuf:"varint,3,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"`
}
-func (x *GetMembersReply) Reset() {
- *x = GetMembersReply{}
+func (x *GetMemberReply) Reset() {
+ *x = GetMemberReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[62]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[66]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetMembersReply) String() string {
+func (x *GetMemberReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetMembersReply) ProtoMessage() {}
+func (*GetMemberReply) ProtoMessage() {}
-func (x *GetMembersReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[62]
+func (x *GetMemberReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[66]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4048,26 +4218,26 @@ func (x *GetMembersReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetMembersReply.ProtoReflect.Descriptor instead.
-func (*GetMembersReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{62}
+// Deprecated: Use GetMemberReply.ProtoReflect.Descriptor instead.
+func (*GetMemberReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{66}
}
-func (x *GetMembersReply) GetLrzId() string {
+func (x *GetMemberReply) GetLrzId() string {
if x != nil {
return x.LrzId
}
return ""
}
-func (x *GetMembersReply) GetName() string {
+func (x *GetMemberReply) GetName() string {
if x != nil {
return x.Name
}
return ""
}
-func (x *GetMembersReply) GetMemberId() int32 {
+func (x *GetMemberReply) GetMemberId() int32 {
if x != nil {
return x.MemberId
}
@@ -4079,13 +4249,13 @@ type GetUploadStatusRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- LrzId string `protobuf:"bytes,1,opt,name=lrzId,proto3" json:"lrzId,omitempty"`
+ LrzId string `protobuf:"bytes,1,opt,name=lrz_id,json=lrzId,proto3" json:"lrz_id,omitempty"`
}
func (x *GetUploadStatusRequest) Reset() {
*x = GetUploadStatusRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[63]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[67]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4098,7 +4268,7 @@ func (x *GetUploadStatusRequest) String() string {
func (*GetUploadStatusRequest) ProtoMessage() {}
func (x *GetUploadStatusRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[63]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[67]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4111,7 +4281,7 @@ func (x *GetUploadStatusRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetUploadStatusRequest.ProtoReflect.Descriptor instead.
func (*GetUploadStatusRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{63}
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{67}
}
func (x *GetUploadStatusRequest) GetLrzId() string {
@@ -4136,7 +4306,7 @@ type GetUploadStatusReply struct {
func (x *GetUploadStatusReply) Reset() {
*x = GetUploadStatusReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[64]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[68]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4149,7 +4319,7 @@ func (x *GetUploadStatusReply) String() string {
func (*GetUploadStatusReply) ProtoMessage() {}
func (x *GetUploadStatusReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[64]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[68]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4162,7 +4332,7 @@ func (x *GetUploadStatusReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetUploadStatusReply.ProtoReflect.Descriptor instead.
func (*GetUploadStatusReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{64}
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{68}
}
func (x *GetUploadStatusReply) GetFcmToken() string {
@@ -4193,42 +4363,89 @@ func (x *GetUploadStatusReply) GetEmployeeId() bool {
return false
}
-func (x *GetUploadStatusReply) GetExternalId() bool {
+func (x *GetUploadStatusReply) GetExternalId() bool {
+ if x != nil {
+ return x.ExternalId
+ }
+ return false
+}
+
+type GetNotificationRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ NotificationId int32 `protobuf:"varint,1,opt,name=notification_id,json=notificationId,proto3" json:"notification_id,omitempty"`
+}
+
+func (x *GetNotificationRequest) Reset() {
+ *x = GetNotificationRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[69]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetNotificationRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetNotificationRequest) ProtoMessage() {}
+
+func (x *GetNotificationRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[69]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetNotificationRequest.ProtoReflect.Descriptor instead.
+func (*GetNotificationRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{69}
+}
+
+func (x *GetNotificationRequest) GetNotificationId() int32 {
if x != nil {
- return x.ExternalId
+ return x.NotificationId
}
- return false
+ return 0
}
-type GetNotificationsReply struct {
+type GetNotificationReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- NotificationId int32 `protobuf:"varint,1,opt,name=notificationId,proto3" json:"notificationId,omitempty"`
+ NotificationId int32 `protobuf:"varint,1,opt,name=notification_id,json=notificationId,proto3" json:"notification_id,omitempty"`
Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"`
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
Signature string `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
}
-func (x *GetNotificationsReply) Reset() {
- *x = GetNotificationsReply{}
+func (x *GetNotificationReply) Reset() {
+ *x = GetNotificationReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[65]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[70]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetNotificationsReply) String() string {
+func (x *GetNotificationReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetNotificationsReply) ProtoMessage() {}
+func (*GetNotificationReply) ProtoMessage() {}
-func (x *GetNotificationsReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[65]
+func (x *GetNotificationReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[70]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4239,71 +4456,71 @@ func (x *GetNotificationsReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetNotificationsReply.ProtoReflect.Descriptor instead.
-func (*GetNotificationsReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{65}
+// Deprecated: Use GetNotificationReply.ProtoReflect.Descriptor instead.
+func (*GetNotificationReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{70}
}
-func (x *GetNotificationsReply) GetNotificationId() int32 {
+func (x *GetNotificationReply) GetNotificationId() int32 {
if x != nil {
return x.NotificationId
}
return 0
}
-func (x *GetNotificationsReply) GetType() int32 {
+func (x *GetNotificationReply) GetType() int32 {
if x != nil {
return x.Type
}
return 0
}
-func (x *GetNotificationsReply) GetTitle() string {
+func (x *GetNotificationReply) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
-func (x *GetNotificationsReply) GetDescription() string {
+func (x *GetNotificationReply) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
-func (x *GetNotificationsReply) GetSignature() string {
+func (x *GetNotificationReply) GetSignature() string {
if x != nil {
return x.Signature
}
return ""
}
-type NotificationsRequest struct {
+type GetNotificationConfirmRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- NotificationId int32 `protobuf:"varint,1,opt,name=notificationId,proto3" json:"notificationId,omitempty"`
+ NotificationId int32 `protobuf:"varint,1,opt,name=notification_id,json=notificationId,proto3" json:"notification_id,omitempty"`
}
-func (x *NotificationsRequest) Reset() {
- *x = NotificationsRequest{}
+func (x *GetNotificationConfirmRequest) Reset() {
+ *x = GetNotificationConfirmRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[66]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[71]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *NotificationsRequest) String() string {
+func (x *GetNotificationConfirmRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*NotificationsRequest) ProtoMessage() {}
+func (*GetNotificationConfirmRequest) ProtoMessage() {}
-func (x *NotificationsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[66]
+func (x *GetNotificationConfirmRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[71]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4314,19 +4531,19 @@ func (x *NotificationsRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use NotificationsRequest.ProtoReflect.Descriptor instead.
-func (*NotificationsRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{66}
+// Deprecated: Use GetNotificationConfirmRequest.ProtoReflect.Descriptor instead.
+func (*GetNotificationConfirmRequest) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{71}
}
-func (x *NotificationsRequest) GetNotificationId() int32 {
+func (x *GetNotificationConfirmRequest) GetNotificationId() int32 {
if x != nil {
return x.NotificationId
}
return 0
}
-type GetNotificationsConfirmReply struct {
+type GetNotificationConfirmReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
@@ -4334,23 +4551,23 @@ type GetNotificationsConfirmReply struct {
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
}
-func (x *GetNotificationsConfirmReply) Reset() {
- *x = GetNotificationsConfirmReply{}
+func (x *GetNotificationConfirmReply) Reset() {
+ *x = GetNotificationConfirmReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[67]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[72]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetNotificationsConfirmReply) String() string {
+func (x *GetNotificationConfirmReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetNotificationsConfirmReply) ProtoMessage() {}
+func (*GetNotificationConfirmReply) ProtoMessage() {}
-func (x *GetNotificationsConfirmReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[67]
+func (x *GetNotificationConfirmReply) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[72]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4361,12 +4578,12 @@ func (x *GetNotificationsConfirmReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use GetNotificationsConfirmReply.ProtoReflect.Descriptor instead.
-func (*GetNotificationsConfirmReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{67}
+// Deprecated: Use GetNotificationConfirmReply.ProtoReflect.Descriptor instead.
+func (*GetNotificationConfirmReply) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{72}
}
-func (x *GetNotificationsConfirmReply) GetStatus() string {
+func (x *GetNotificationConfirmReply) GetStatus() string {
if x != nil {
return x.Status
}
@@ -4379,13 +4596,13 @@ type GetCanteenHeadCountRequest struct {
unknownFields protoimpl.UnknownFields
// The requested canteen ID
- CanteenId string `protobuf:"bytes,1,opt,name=canteenId,proto3" json:"canteenId,omitempty"`
+ CanteenId string `protobuf:"bytes,1,opt,name=canteen_id,json=canteenId,proto3" json:"canteen_id,omitempty"`
}
func (x *GetCanteenHeadCountRequest) Reset() {
*x = GetCanteenHeadCountRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[68]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[73]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4398,7 +4615,7 @@ func (x *GetCanteenHeadCountRequest) String() string {
func (*GetCanteenHeadCountRequest) ProtoMessage() {}
func (x *GetCanteenHeadCountRequest) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[68]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[73]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4411,7 +4628,7 @@ func (x *GetCanteenHeadCountRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetCanteenHeadCountRequest.ProtoReflect.Descriptor instead.
func (*GetCanteenHeadCountRequest) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{68}
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{73}
}
func (x *GetCanteenHeadCountRequest) GetCanteenId() string {
@@ -4429,7 +4646,7 @@ type GetCanteenHeadCountReply struct {
// The absolut count of humans in the canteen. Only valid in case percent != -1.
Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
// The maximum nunmber of humans in the canteen for the percent to be 100.00. Only valid in case percent != -1.
- MaxCount uint32 `protobuf:"varint,2,opt,name=maxCount,proto3" json:"maxCount,omitempty"`
+ MaxCount uint32 `protobuf:"varint,2,opt,name=max_count,json=maxCount,proto3" json:"max_count,omitempty"`
// Current capacity utilization of the canteen clamped to 0 and 100 or -1 in case no data is available.
Percent float32 `protobuf:"fixed32,3,opt,name=percent,proto3" json:"percent,omitempty"`
// A time stamp indicating how up to date the response is. Only valid in case percent != -1.
@@ -4439,7 +4656,7 @@ type GetCanteenHeadCountReply struct {
func (x *GetCanteenHeadCountReply) Reset() {
*x = GetCanteenHeadCountReply{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[69]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[74]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -4452,7 +4669,7 @@ func (x *GetCanteenHeadCountReply) String() string {
func (*GetCanteenHeadCountReply) ProtoMessage() {}
func (x *GetCanteenHeadCountReply) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[69]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[74]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4465,7 +4682,7 @@ func (x *GetCanteenHeadCountReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetCanteenHeadCountReply.ProtoReflect.Descriptor instead.
func (*GetCanteenHeadCountReply) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{69}
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{74}
}
func (x *GetCanteenHeadCountReply) GetCount() uint32 {
@@ -4496,35 +4713,33 @@ func (x *GetCanteenHeadCountReply) GetTimestamp() *timestamppb.Timestamp {
return nil
}
-type GetRoomScheduleReply_RoomScheduleEvent struct {
+type ListMoreInformationReply_MoreInformation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- Start *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
- End *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
- Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
- EventId int32 `protobuf:"varint,4,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
- CourseCode string `protobuf:"bytes,5,opt,name=course_code,json=courseCode,proto3" json:"course_code,omitempty"`
+ Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
+ Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"`
+ Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
}
-func (x *GetRoomScheduleReply_RoomScheduleEvent) Reset() {
- *x = GetRoomScheduleReply_RoomScheduleEvent{}
+func (x *ListMoreInformationReply_MoreInformation) Reset() {
+ *x = ListMoreInformationReply_MoreInformation{}
if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[70]
+ mi := &file_tumdev_campus_backend_proto_msgTypes[75]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *GetRoomScheduleReply_RoomScheduleEvent) String() string {
+func (x *ListMoreInformationReply_MoreInformation) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*GetRoomScheduleReply_RoomScheduleEvent) ProtoMessage() {}
+func (*ListMoreInformationReply_MoreInformation) ProtoMessage() {}
-func (x *GetRoomScheduleReply_RoomScheduleEvent) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[70]
+func (x *ListMoreInformationReply_MoreInformation) ProtoReflect() protoreflect.Message {
+ mi := &file_tumdev_campus_backend_proto_msgTypes[75]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -4535,200 +4750,28 @@ func (x *GetRoomScheduleReply_RoomScheduleEvent) ProtoReflect() protoreflect.Mes
return mi.MessageOf(x)
}
-// Deprecated: Use GetRoomScheduleReply_RoomScheduleEvent.ProtoReflect.Descriptor instead.
-func (*GetRoomScheduleReply_RoomScheduleEvent) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{7, 0}
+// Deprecated: Use ListMoreInformationReply_MoreInformation.ProtoReflect.Descriptor instead.
+func (*ListMoreInformationReply_MoreInformation) Descriptor() ([]byte, []int) {
+ return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{47, 0}
}
-func (x *GetRoomScheduleReply_RoomScheduleEvent) GetStart() *timestamppb.Timestamp {
- if x != nil {
- return x.Start
- }
- return nil
-}
-
-func (x *GetRoomScheduleReply_RoomScheduleEvent) GetEnd() *timestamppb.Timestamp {
- if x != nil {
- return x.End
- }
- return nil
-}
-
-func (x *GetRoomScheduleReply_RoomScheduleEvent) GetTitle() string {
+func (x *ListMoreInformationReply_MoreInformation) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
-func (x *GetRoomScheduleReply_RoomScheduleEvent) GetEventId() int32 {
- if x != nil {
- return x.EventId
- }
- return 0
-}
-
-func (x *GetRoomScheduleReply_RoomScheduleEvent) GetCourseCode() string {
- if x != nil {
- return x.CourseCode
- }
- return ""
-}
-
-type GetRoomMapsReply_Map struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- MapId int64 `protobuf:"varint,1,opt,name=map_id,json=mapId,proto3" json:"map_id,omitempty"`
- Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
- Scale int64 `protobuf:"varint,3,opt,name=scale,proto3" json:"scale,omitempty"`
- Width int64 `protobuf:"varint,4,opt,name=width,proto3" json:"width,omitempty"`
- Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"`
-}
-
-func (x *GetRoomMapsReply_Map) Reset() {
- *x = GetRoomMapsReply_Map{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[71]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetRoomMapsReply_Map) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetRoomMapsReply_Map) ProtoMessage() {}
-
-func (x *GetRoomMapsReply_Map) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[71]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetRoomMapsReply_Map.ProtoReflect.Descriptor instead.
-func (*GetRoomMapsReply_Map) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{11, 0}
-}
-
-func (x *GetRoomMapsReply_Map) GetMapId() int64 {
- if x != nil {
- return x.MapId
- }
- return 0
-}
-
-func (x *GetRoomMapsReply_Map) GetDescription() string {
- if x != nil {
- return x.Description
- }
- return ""
-}
-
-func (x *GetRoomMapsReply_Map) GetScale() int64 {
- if x != nil {
- return x.Scale
- }
- return 0
-}
-
-func (x *GetRoomMapsReply_Map) GetWidth() int64 {
- if x != nil {
- return x.Width
- }
- return 0
-}
-
-func (x *GetRoomMapsReply_Map) GetHeight() int64 {
- if x != nil {
- return x.Height
- }
- return 0
-}
-
-type GetLocationsReply_Location struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- Location string `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
- Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
- Lon string `protobuf:"bytes,3,opt,name=lon,proto3" json:"lon,omitempty"`
- Lat string `protobuf:"bytes,4,opt,name=lat,proto3" json:"lat,omitempty"`
- Radius string `protobuf:"bytes,5,opt,name=radius,proto3" json:"radius,omitempty"`
-}
-
-func (x *GetLocationsReply_Location) Reset() {
- *x = GetLocationsReply_Location{}
- if protoimpl.UnsafeEnabled {
- mi := &file_tumdev_campus_backend_proto_msgTypes[72]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *GetLocationsReply_Location) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*GetLocationsReply_Location) ProtoMessage() {}
-
-func (x *GetLocationsReply_Location) ProtoReflect() protoreflect.Message {
- mi := &file_tumdev_campus_backend_proto_msgTypes[72]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use GetLocationsReply_Location.ProtoReflect.Descriptor instead.
-func (*GetLocationsReply_Location) Descriptor() ([]byte, []int) {
- return file_tumdev_campus_backend_proto_rawDescGZIP(), []int{13, 0}
-}
-
-func (x *GetLocationsReply_Location) GetLocation() string {
- if x != nil {
- return x.Location
- }
- return ""
-}
-
-func (x *GetLocationsReply_Location) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
-}
-
-func (x *GetLocationsReply_Location) GetLon() string {
- if x != nil {
- return x.Lon
- }
- return ""
-}
-
-func (x *GetLocationsReply_Location) GetLat() string {
+func (x *ListMoreInformationReply_MoreInformation) GetCategory() string {
if x != nil {
- return x.Lat
+ return x.Category
}
return ""
}
-func (x *GetLocationsReply_Location) GetRadius() string {
+func (x *ListMoreInformationReply_MoreInformation) GetUrl() string {
if x != nil {
- return x.Radius
+ return x.Url
}
return ""
}
@@ -4740,792 +4783,725 @@ var file_tumdev_campus_backend_proto_rawDesc = []byte{
0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61,
0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74,
- 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95,
- 0x01, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63,
- 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69,
- 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69,
- 0x63, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65,
- 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69,
- 0x63, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63,
- 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65,
- 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x70, 0x75, 0x62,
- 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0x31, 0x0a, 0x13, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
- 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a,
- 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x62, 0x0a, 0x13, 0x52, 0x65, 0x6d,
- 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x0a,
- 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
- 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
- 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x2f, 0x0a,
- 0x11, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70,
- 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x59,
- 0x0a, 0x1f, 0x49, 0x4f, 0x53, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12,
- 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x39, 0x0a, 0x1d, 0x49, 0x4f, 0x53,
- 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65,
- 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73,
- 0x73, 0x61, 0x67, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d,
- 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72,
- 0x6f, 0x6f, 0x6d, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05,
- 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03,
- 0x65, 0x6e, 0x64, 0x22, 0xa3, 0x02, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x53,
- 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x43, 0x0a, 0x06,
- 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75,
- 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x63, 0x68, 0x65,
- 0x64, 0x75, 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74,
- 0x73, 0x1a, 0xc5, 0x01, 0x0a, 0x11, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75,
- 0x6c, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
- 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x65, 0x6e, 0x64,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
- 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x19, 0x0a,
- 0x08, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x07, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x75, 0x72,
- 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63,
- 0x6f, 0x75, 0x72, 0x73, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x34, 0x0a, 0x19, 0x47, 0x65, 0x74,
- 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x72, 0x63, 0x68, 0x49, 0x64, 0x22,
- 0x78, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69,
- 0x6e, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x74,
- 0x6d, 0x5f, 0x7a, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x75, 0x74,
- 0x6d, 0x5a, 0x6f, 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x74, 0x6d, 0x5f, 0x65, 0x61, 0x73,
- 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x75, 0x74, 0x6d, 0x45,
- 0x61, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x74, 0x6d, 0x5f, 0x6e, 0x6f,
- 0x72, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x75, 0x74,
- 0x6d, 0x4e, 0x6f, 0x72, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x22, 0x2d, 0x0a, 0x12, 0x47, 0x65, 0x74,
- 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x17, 0x0a, 0x07, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x06, 0x61, 0x72, 0x63, 0x68, 0x49, 0x64, 0x22, 0xc6, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x74,
- 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2d, 0x0a,
- 0x04, 0x6d, 0x61, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x70,
- 0x6c, 0x79, 0x2e, 0x4d, 0x61, 0x70, 0x52, 0x04, 0x6d, 0x61, 0x70, 0x73, 0x1a, 0x82, 0x01, 0x0a,
- 0x03, 0x4d, 0x61, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x61, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x61, 0x70, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64,
- 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a,
- 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x63,
- 0x61, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x03, 0x52, 0x05, 0x77, 0x69, 0x64, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69,
- 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68,
- 0x74, 0x22, 0x31, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xca, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3d, 0x0a, 0x09, 0x6c, 0x6f,
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09,
- 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x76, 0x0a, 0x08, 0x4c, 0x6f, 0x63,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x61, 0x74, 0x18, 0x04,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x64,
- 0x69, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x61, 0x64, 0x69, 0x75,
- 0x73, 0x22, 0x2a, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x73,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x33, 0x0a,
- 0x10, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c,
- 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x05, 0x72, 0x6f, 0x6f,
- 0x6d, 0x73, 0x22, 0xe9, 0x01, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x72,
- 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x6f, 0x6f,
- 0x6d, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65,
- 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x72, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e,
- 0x72, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x06, 0x61, 0x72, 0x63, 0x68, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e,
- 0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x18,
- 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x72, 0x70,
- 0x6f, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f,
- 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
- 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3c,
- 0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c,
- 0x79, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75,
- 0x72, 0x63, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x4e, 0x0a, 0x0a,
- 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e,
- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x22, 0xd4, 0x01, 0x0a,
- 0x0f, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79,
- 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a,
- 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e,
- 0x6b, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07,
- 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
- 0x70, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
- 0x02, 0x74, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x16, 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69,
- 0x61, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20,
- 0x0a, 0x0b, 0x63, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x49, 0x64, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x49, 0x64,
- 0x12, 0x2e, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
+ 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x97, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65,
+ 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
+ 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x70, 0x75,
+ 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x0b, 0x64, 0x65,
+ 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
+ 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x0a, 0x0b,
+ 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x30, 0x0a, 0x11, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79,
+ 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x64, 0x0a,
+ 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49,
+ 0x64, 0x12, 0x30, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
+ 0x79, 0x70, 0x65, 0x22, 0x30, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x5a, 0x0a, 0x1f, 0x49, 0x4f, 0x53, 0x44, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f,
+ 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61,
+ 0x64, 0x22, 0x39, 0x0a, 0x1d, 0x49, 0x4f, 0x53, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x70,
+ 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2a, 0x0a, 0x12,
+ 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x33, 0x0a, 0x10, 0x53, 0x65, 0x61, 0x72,
+ 0x63, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1f, 0x0a, 0x05,
+ 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70,
+ 0x69, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x22, 0xea, 0x01,
+ 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12,
+ 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x72, 0x12, 0x17, 0x0a,
+ 0x07, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+ 0x61, 0x72, 0x63, 0x68, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64,
+ 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64,
+ 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x16,
+ 0x0a, 0x06, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+ 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xbf, 0x02, 0x0a, 0x04, 0x4e,
+ 0x65, 0x77, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78,
+ 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a,
+ 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e,
+ 0x6b, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1b,
+ 0x0a, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x09,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x63, 0x6f, 0x6e,
+ 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x69,
+ 0x74, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
+ 0x61, 0x6d, 0x70, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x04,
+ 0x64, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x22, 0x2e, 0x0a, 0x0d,
+ 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1d, 0x0a,
+ 0x04, 0x6e, 0x65, 0x77, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x70,
+ 0x69, 0x2e, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x04, 0x6e, 0x65, 0x77, 0x73, 0x22, 0x96, 0x01, 0x0a,
+ 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x20, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x65, 0x77, 0x73, 0x5f, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73,
+ 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x77, 0x73, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x61,
+ 0x74, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x44,
+ 0x61, 0x74, 0x65, 0x41, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77,
+ 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
+ 0x41, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e,
+ 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x73, 0x22, 0x55, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x19,
+ 0x0a, 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x44, 0x0a, 0x15, 0x4c, 0x69, 0x73,
+ 0x74, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x65, 0x77, 0x73, 0x5f,
+ 0x61, 0x6c, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f,
+ 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x49, 0x64, 0x22,
+ 0x3d, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65, 0x72, 0x74,
+ 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x65, 0x77,
+ 0x73, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x22, 0xce,
+ 0x01, 0x0a, 0x09, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09,
+ 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e,
+ 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x34, 0x0a,
+ 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d,
- 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
- 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05,
- 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d,
- 0x69, 0x74, 0x22, 0xbb, 0x01, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e,
- 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x61, 0x66, 0x65,
- 0x74, 0x65, 0x72, 0x69, 0x61, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63,
- 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69,
- 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x73, 0x68, 0x12, 0x2e,
- 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
- 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x2a,
- 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x66,
+ 0x72, 0x6f, 0x6d, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x6f, 0x22,
+ 0xac, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52,
+ 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04,
+ 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
- 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69,
- 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74,
- 0x22, 0xc4, 0x01, 0x0a, 0x14, 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x61,
- 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x61, 0x74,
- 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e,
- 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c,
- 0x79, 0x52, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76, 0x67,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x61, 0x76, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x73,
- 0x74, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x73, 0x74, 0x64, 0x12, 0x10, 0x0a,
- 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12,
- 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x61,
- 0x78, 0x12, 0x34, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x18,
- 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x74, 0x69,
- 0x6e, 0x67, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74,
- 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x22, 0xf1, 0x01, 0x0a, 0x0f, 0x44, 0x69, 0x73, 0x68,
- 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x72,
- 0x61, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65,
- 0x70, 0x6c, 0x79, 0x52, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x61,
- 0x76, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x61, 0x76, 0x67, 0x12, 0x10, 0x0a,
- 0x03, 0x73, 0x74, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x73, 0x74, 0x64, 0x12,
- 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x69,
- 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
- 0x6d, 0x61, 0x78, 0x12, 0x34, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67,
- 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61,
- 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0a, 0x72,
- 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x6e, 0x61, 0x6d,
- 0x65, 0x54, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c,
- 0x74, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x73, 0x22, 0xcb, 0x01, 0x0a, 0x11,
- 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c,
- 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61,
- 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12,
- 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x72, 0x61, 0x74,
- 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4e, 0x65, 0x77,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54,
- 0x61, 0x67, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x76, 0x69, 0x73, 0x69, 0x74, 0x65, 0x64, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
- 0x52, 0x07, 0x76, 0x69, 0x73, 0x69, 0x74, 0x65, 0x64, 0x22, 0xb5, 0x01, 0x0a, 0x19, 0x4e, 0x65,
- 0x77, 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74,
- 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12,
- 0x20, 0x0a, 0x0b, 0x63, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x49, 0x64, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x49,
- 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c,
- 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e,
- 0x67, 0x54, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x72, 0x61, 0x74,
- 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65,
- 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
- 0x74, 0x22, 0xc4, 0x01, 0x0a, 0x14, 0x4e, 0x65, 0x77, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74,
- 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f,
- 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e,
- 0x74, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x49,
- 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72,
- 0x69, 0x61, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67,
- 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2e,
- 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54,
- 0x61, 0x67, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x18,
- 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x41, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x54,
- 0x61, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x31, 0x0a, 0x0a, 0x72, 0x61, 0x74, 0x69,
- 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x52,
- 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x22, 0x44, 0x0a, 0x0c, 0x54,
- 0x61, 0x67, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x12, 0x14, 0x0a, 0x05, 0x74,
- 0x61, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x61, 0x67, 0x49,
- 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x64,
- 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65,
- 0x6e, 0x22, 0x39, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x12, 0x14,
- 0x0a, 0x05, 0x74, 0x61, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74,
- 0x61, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02,
- 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x13,
- 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75,
- 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
- 0x28, 0x05, 0x52, 0x05, 0x74, 0x61, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x69,
- 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74,
- 0x73, 0x22, 0x6f, 0x0a, 0x0f, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x52, 0x65,
- 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x67, 0x49, 0x64, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x61, 0x67, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x2a, 0x0a, 0x02,
+ 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
+ 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69,
+ 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xc8,
+ 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61,
+ 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x61,
+ 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69,
+ 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70,
+ 0x6c, 0x79, 0x52, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76,
0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x61, 0x76, 0x67, 0x12, 0x10, 0x0a, 0x03,
0x73, 0x74, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x73, 0x74, 0x64, 0x12, 0x10,
0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x69, 0x6e,
0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d,
- 0x61, 0x78, 0x22, 0x41, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72,
- 0x69, 0x61, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2c, 0x0a, 0x09, 0x63, 0x61, 0x66, 0x65, 0x74,
- 0x65, 0x72, 0x69, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x09, 0x63, 0x61, 0x66, 0x65,
- 0x74, 0x65, 0x72, 0x69, 0x61, 0x22, 0x6f, 0x0a, 0x09, 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72,
- 0x69, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
- 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09,
- 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52,
- 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61,
- 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61,
- 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x6e, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73,
- 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x61,
- 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x0b, 0x63, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04,
- 0x79, 0x65, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72,
- 0x12, 0x12, 0x0a, 0x04, 0x77, 0x65, 0x65, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04,
- 0x77, 0x65, 0x65, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x03, 0x64, 0x61, 0x79, 0x22, 0x24, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73,
- 0x68, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x68,
- 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69, 0x73, 0x68, 0x22, 0x68, 0x0a, 0x19,
- 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x65,
- 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x4b, 0x0a, 0x11, 0x72, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x01,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d,
- 0x65, 0x6e, 0x74, 0x52, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65,
- 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x22, 0x92, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d,
- 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70,
- 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x65, 0x6c, 0x65,
- 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x66,
- 0x61, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61,
- 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x75, 0x6d, 0x49, 0x44, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x75, 0x6d, 0x49, 0x44, 0x22, 0x54, 0x0a, 0x14, 0x47,
- 0x65, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x32, 0x47, 0x70, 0x73, 0x52, 0x65,
- 0x70, 0x6c, 0x79, 0x12, 0x3c, 0x0a, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x32,
- 0x47, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e,
- 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x32, 0x47, 0x70, 0x73, 0x45, 0x6c, 0x65, 0x6d,
- 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x32, 0x47, 0x70,
- 0x73, 0x22, 0x5f, 0x0a, 0x13, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x32, 0x47, 0x70,
- 0x73, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69,
- 0x74, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69,
- 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64,
- 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75,
- 0x64, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x41, 0x72, 0x65, 0x61, 0x46, 0x61,
- 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69,
- 0x6e, 0x67, 0x4e, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x5b, 0x0a, 0x1a, 0x61, 0x72, 0x65,
- 0x61, 0x46, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x79, 0x42, 0x75, 0x69,
- 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x1a, 0x61, 0x72, 0x65, 0x61,
- 0x46, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x79, 0x42, 0x75, 0x69, 0x6c,
- 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x72, 0x22, 0x47, 0x0a, 0x24, 0x47, 0x65, 0x74, 0x41, 0x72, 0x65,
- 0x61, 0x46, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x79, 0x42, 0x75, 0x69,
- 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f,
- 0x0a, 0x0b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x72, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x72, 0x22,
- 0x5a, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x54, 0x6f, 0x69, 0x6c,
- 0x65, 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x41, 0x0a, 0x0d, 0x6c, 0x69, 0x73, 0x74,
- 0x4f, 0x66, 0x54, 0x6f, 0x69, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
- 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0d, 0x6c, 0x69,
- 0x73, 0x74, 0x4f, 0x66, 0x54, 0x6f, 0x69, 0x6c, 0x65, 0x74, 0x73, 0x22, 0xfb, 0x01, 0x0a, 0x16,
- 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45,
- 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x1b,
- 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62,
- 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
- 0x52, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x72, 0x12, 0x17, 0x0a, 0x07,
- 0x61, 0x72, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61,
- 0x72, 0x63, 0x68, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64,
- 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72,
- 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x07,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x0a,
- 0x06, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63,
- 0x61, 0x6d, 0x70, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x60, 0x0a, 0x17, 0x47, 0x65, 0x74,
- 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x45, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52,
- 0x65, 0x70, 0x6c, 0x79, 0x12, 0x45, 0x0a, 0x0f, 0x6c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x45, 0x6c,
- 0x65, 0x76, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x6c, 0x69, 0x73, 0x74,
- 0x4f, 0x66, 0x45, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x22, 0x58, 0x0a, 0x17, 0x47,
- 0x65, 0x74, 0x4d, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3d, 0x0a, 0x0b, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x4d, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0b, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5c, 0x0a, 0x16, 0x4d, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66,
- 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12,
- 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
- 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
- 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72,
- 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
- 0x75, 0x72, 0x6c, 0x22, 0x34, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x6e,
- 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a,
- 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x53, 0x0a, 0x14, 0x47, 0x65, 0x74,
- 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c,
- 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18,
- 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
- 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x4d, 0x73, 0x67, 0x45, 0x6c, 0x65, 0x6d, 0x65,
- 0x6e, 0x74, 0x52, 0x0a, 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xbf,
- 0x02, 0x0a, 0x16, 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x4d,
- 0x73, 0x67, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74,
- 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74,
- 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64,
- 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72,
- 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73,
- 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f,
- 0x68, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x70, 0x65,
- 0x6e, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x75, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x66,
- 0x6f, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x12,
- 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72,
- 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a,
- 0x0c, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20,
- 0x01, 0x28, 0x05, 0x52, 0x0b, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64,
- 0x22, 0x30, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74,
- 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
- 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
- 0x6f, 0x6e, 0x22, 0x51, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e,
- 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73,
- 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
- 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61,
- 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
- 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x47, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x75, 0x64,
- 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e,
- 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x73, 0x67,
- 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x22, 0x79,
- 0x0a, 0x13, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x73, 0x67, 0x45, 0x6c,
- 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74,
- 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61,
- 0x69, 0x6c, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f,
- 0x6f, 0x6d, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x09, 0x53, 0x74,
- 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70,
- 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70,
- 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
+ 0x61, 0x78, 0x12, 0x35, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67,
+ 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61,
+ 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0a, 0x72,
+ 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x15, 0x47, 0x65,
+ 0x74, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e,
+ 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x64, 0x69, 0x73, 0x68, 0x12, 0x2e, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
+ 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02,
+ 0x74, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xf7, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74,
+ 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79,
+ 0x12, 0x2e, 0x0a, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x61, 0x74,
+ 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67,
+ 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x61,
+ 0x76, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52,
+ 0x03, 0x73, 0x74, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x35, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x69,
+ 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73,
+ 0x75, 0x6c, 0x74, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12,
+ 0x31, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54,
+ 0x61, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61,
+ 0x67, 0x73, 0x22, 0xcc, 0x01, 0x0a, 0x11, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x52, 0x61, 0x74,
+ 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e,
+ 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73,
+ 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
+ 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74,
+ 0x12, 0x39, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18,
+ 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x74, 0x69,
+ 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4e, 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52,
+ 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x76,
+ 0x69, 0x73, 0x69, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
+ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x76, 0x69, 0x73, 0x69, 0x74, 0x65,
+ 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65,
+ 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0xb4, 0x01,
+ 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52,
+ 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
+ 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x6f,
+ 0x69, 0x6e, 0x74, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x5f,
+ 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65,
+ 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x0b, 0x72, 0x61, 0x74,
+ 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e,
+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x52, 0x0a,
+ 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69,
+ 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0xc5, 0x01,
+ 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69,
+ 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x69,
+ 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74,
+ 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x49, 0x64,
+ 0x12, 0x12, 0x0a, 0x04, 0x64, 0x69, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x64, 0x69, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2f, 0x0a, 0x0b, 0x72, 0x61,
+ 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x52,
+ 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61,
+ 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61,
+ 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65,
+ 0x70, 0x6c, 0x79, 0x12, 0x32, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61,
+ 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54,
+ 0x61, 0x67, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x52, 0x0a, 0x72, 0x61, 0x74,
+ 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4e,
+ 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x47,
+ 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65,
+ 0x70, 0x6c, 0x79, 0x12, 0x32, 0x0a, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61,
+ 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54,
+ 0x61, 0x67, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x52, 0x0a, 0x72, 0x61, 0x74,
+ 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x41,
+ 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x54,
+ 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x53, 0x0a, 0x1d, 0x4c, 0x69,
+ 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65,
+ 0x65, 0x6e, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x32, 0x0a, 0x0b, 0x72,
+ 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x61, 0x67, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x76,
+ 0x69, 0x65, 0x77, 0x52, 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x22,
+ 0x45, 0x0a, 0x0c, 0x54, 0x61, 0x67, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x76, 0x69, 0x65, 0x77, 0x12,
+ 0x15, 0x0a, 0x06, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x05, 0x74, 0x61, 0x67, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x02, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x02, 0x65, 0x6e, 0x22, 0x3a, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67,
+ 0x54, 0x61, 0x67, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x61, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x61, 0x67, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f,
+ 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e,
+ 0x74, 0x73, 0x22, 0x44, 0x0a, 0x13, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x4e,
+ 0x65, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x61, 0x67,
+ 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x61, 0x67, 0x49, 0x64,
+ 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x06, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x70, 0x0a, 0x0f, 0x52, 0x61, 0x74, 0x69,
+ 0x6e, 0x67, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x74,
+ 0x61, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x61, 0x67,
+ 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52,
+ 0x03, 0x61, 0x76, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x01, 0x52, 0x03, 0x73, 0x74, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69,
+ 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x22, 0x3b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e,
+ 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x07, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65,
+ 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61,
+ 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x07, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x22, 0x6d,
+ 0x0a, 0x07, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64,
+ 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72,
+ 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64,
+ 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x22, 0x6c, 0x0a,
+ 0x11, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x5f, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x49,
+ 0x64, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x65, 0x65, 0x6b, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x04, 0x77, 0x65, 0x65, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x79,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x64, 0x61, 0x79, 0x22, 0x25, 0x0a, 0x0f, 0x4c,
+ 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x12,
+ 0x0a, 0x04, 0x64, 0x69, 0x73, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x64, 0x69,
+ 0x73, 0x68, 0x22, 0x1e, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x22, 0x63, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79,
+ 0x12, 0x45, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x5f,
+ 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x65,
+ 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c,
+ 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x22, 0x8c, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x65, 0x6c, 0x65, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12,
+ 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+ 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x75, 0x6c, 0x74, 0x79,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12,
+ 0x15, 0x0a, 0x06, 0x74, 0x75, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x05, 0x74, 0x75, 0x6d, 0x49, 0x64, 0x22, 0xfc, 0x01, 0x0a, 0x16, 0x52, 0x6f, 0x6f, 0x6d, 0x49,
+ 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
+ 0x74, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f,
- 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72,
- 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d,
- 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67,
- 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x75, 0x69,
- 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x28, 0x0a, 0x0e, 0x47, 0x65, 0x74,
- 0x4b, 0x69, 0x6e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c,
- 0x61, 0x73, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x61, 0x73,
- 0x74, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x6f, 0x52, 0x65,
- 0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x6b, 0x69, 0x6e, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x69, 0x6e, 0x6f, 0x4d, 0x73, 0x67,
- 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x6b, 0x69, 0x6e, 0x6f, 0x73, 0x22, 0xbe,
- 0x03, 0x0a, 0x0e, 0x4b, 0x69, 0x6e, 0x6f, 0x4d, 0x73, 0x67, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
- 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e,
- 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x6f, 0x12, 0x2e, 0x0a,
- 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
- 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a,
- 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61,
- 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61,
- 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, 0x12, 0x18, 0x0a,
- 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
- 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x65, 0x6e, 0x72, 0x65,
- 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x65, 0x6e, 0x72, 0x65, 0x12, 0x1a, 0x0a,
- 0x08, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52,
- 0x08, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74,
- 0x6f, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x6f, 0x72,
- 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x06, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
- 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
- 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63,
- 0x6f, 0x76, 0x65, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x76, 0x65,
- 0x72, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01,
- 0x28, 0x09, 0x52, 0x07, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6c,
- 0x69, 0x6e, 0x6b, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x22,
- 0x8e, 0x02, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63,
- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x14, 0x0a,
- 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d,
- 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x64, 0x18, 0x03,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x49, 0x64, 0x12, 0x18, 0x0a,
- 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
- 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65,
- 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x69, 0x6d,
- 0x61, 0x67, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74, 0x69,
- 0x74, 0x75, 0x64, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74, 0x69,
- 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75, 0x64,
- 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75,
- 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
- 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
- 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09,
+ 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72,
+ 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x75, 0x69, 0x6c, 0x64,
+ 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75,
+ 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x72, 0x63, 0x68,
+ 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x72, 0x63, 0x68, 0x49,
+ 0x64, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12,
+ 0x18, 0x0a, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6d,
+ 0x70, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x6d, 0x70, 0x75,
+ 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x72,
+ 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x72, 0x65,
+ 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79,
+ 0x12, 0x43, 0x0a, 0x05, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x72, 0x65, 0x49, 0x6e,
+ 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x4d,
+ 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05,
+ 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x1a, 0x55, 0x0a, 0x0f, 0x4d, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66,
+ 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1a,
+ 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72,
+ 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x35, 0x0a, 0x17,
+ 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75,
+ 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75,
+ 0x61, 0x67, 0x65, 0x22, 0x54, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x69,
+ 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3b, 0x0a, 0x0a,
+ 0x66, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x69,
+ 0x6d, 0x65, 0x73, 0x4d, 0x73, 0x67, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x66,
+ 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xbf, 0x02, 0x0a, 0x16, 0x4f, 0x70,
+ 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x4d, 0x73, 0x67, 0x45, 0x6c, 0x65,
+ 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79,
+ 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12,
+ 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f,
+ 0x6f, 0x6d, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f,
+ 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x23, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x6f, 0x75, 0x72, 0x73,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x48,
+ 0x6f, 0x75, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x18, 0x08, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x66, 0x6f, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72,
+ 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08,
+ 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+ 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x66, 0x65,
+ 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b,
+ 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x14, 0x47,
+ 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x51, 0x0a,
+ 0x12, 0x47, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x65,
+ 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a,
+ 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65,
+ 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f,
+ 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x45, 0x0a, 0x13, 0x4c, 0x69, 0x73,
+ 0x74, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79,
+ 0x12, 0x2e, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x4d,
+ 0x73, 0x67, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73,
+ 0x22, 0x79, 0x0a, 0x13, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x73, 0x67,
+ 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64,
+ 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65,
+ 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x24, 0x0a, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x18, 0x04,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x75, 0x64, 0x79,
+ 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x09,
+ 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f,
+ 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f,
+ 0x75, 0x70, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x69, 0x64, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x12, 0x1b, 0x0a,
+ 0x09, 0x72, 0x6f, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x08, 0x72, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f,
+ 0x6f, 0x6d, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72,
+ 0x6f, 0x6f, 0x6d, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64,
+ 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
+ 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6e, 0x0a, 0x11,
+ 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x06, 0x6c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x0e, 0x6f, 0x6c,
+ 0x64, 0x65, 0x73, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c,
+ 0x6f, 0x6c, 0x64, 0x65, 0x73, 0x74, 0x44, 0x61, 0x74, 0x65, 0x41, 0x74, 0x22, 0x35, 0x0a, 0x0f,
+ 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12,
+ 0x22, 0x0a, 0x06, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x0a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x6f, 0x76, 0x69, 0x65, 0x52, 0x06, 0x6d, 0x6f, 0x76,
+ 0x69, 0x65, 0x73, 0x22, 0xc6, 0x03, 0x0a, 0x05, 0x4d, 0x6f, 0x76, 0x69, 0x65, 0x12, 0x19, 0x0a,
+ 0x08, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x07, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
+ 0x6d, 0x70, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65,
+ 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x14,
+ 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
+ 0x69, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f,
+ 0x79, 0x65, 0x61, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x65,
+ 0x61, 0x73, 0x65, 0x59, 0x65, 0x61, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69,
+ 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d,
+ 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x65, 0x6e, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x67, 0x65, 0x6e, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x72, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x69, 0x72, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x0b, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69,
+ 0x6d, 0x64, 0x62, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0a, 0x69, 0x6d, 0x64, 0x62, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x20, 0x0a, 0x0b,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19,
+ 0x0a, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x07, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e,
+ 0x6b, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x1b, 0x0a,
+ 0x09, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x08, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02,
+ 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x0f, 0x10, 0x10, 0x22, 0xcc, 0x02, 0x0a,
+ 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69,
+ 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52,
+ 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x72,
+ 0x6f, 0x6d, 0x5f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x66, 0x72, 0x6f, 0x6d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6f, 0x72,
+ 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+ 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
- 0x22, 0x30, 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b,
- 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74,
- 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
- 0x75, 0x73, 0x22, 0x44, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61,
- 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e,
- 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18,
- 0x0a, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
- 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x72, 0x22, 0x29, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d,
- 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a,
- 0x05, 0x6c, 0x72, 0x7a, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x72,
- 0x7a, 0x49, 0x64, 0x22, 0x57, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72,
- 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x72, 0x7a, 0x49, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x72, 0x7a, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
- 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x05, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2e, 0x0a, 0x16,
+ 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74,
+ 0x22, 0x29, 0x0a, 0x09, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0b, 0x0a,
+ 0x07, 0x54, 0x55, 0x4d, 0x5f, 0x44, 0x45, 0x56, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x55,
+ 0x4d, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x10, 0x01, 0x22, 0x46, 0x0a, 0x0a, 0x43,
+ 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x74,
+ 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x74,
+ 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74, 0x75,
+ 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74,
+ 0x75, 0x64, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65,
+ 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x32, 0x0a, 0x18, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67,
+ 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x47,
+ 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b,
+ 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08,
+ 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07,
+ 0x69, 0x6d, 0x61, 0x67, 0x65, 0x4e, 0x72, 0x22, 0x29, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x65,
+ 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6c,
+ 0x72, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x72, 0x7a,
+ 0x49, 0x64, 0x22, 0x58, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52,
+ 0x65, 0x70, 0x6c, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x72, 0x7a, 0x5f, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x72, 0x7a, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x1b, 0x0a, 0x09, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x16,
0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x72, 0x7a, 0x49, 0x64, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x72, 0x7a, 0x49, 0x64, 0x22, 0xb3, 0x01, 0x0a,
- 0x14, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
- 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x63, 0x6d, 0x5f, 0x74, 0x6f, 0x6b,
- 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x63, 0x6d, 0x54, 0x6f, 0x6b,
- 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65,
- 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18,
- 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x49, 0x64,
- 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x69, 0x64, 0x18,
- 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x49,
- 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x64,
- 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
- 0x49, 0x64, 0x22, 0xa9, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69,
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x26, 0x0a, 0x0e,
- 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
- 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c,
- 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20,
- 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x05, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x3e,
- 0x0a, 0x14, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69,
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e,
- 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x36,
- 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16,
- 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
- 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e,
- 0x74, 0x65, 0x65, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x49,
- 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e,
- 0x49, 0x64, 0x22, 0xa0, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65,
- 0x6e, 0x48, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12,
- 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05,
- 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e,
- 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e,
- 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,
- 0x28, 0x02, 0x52, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74,
- 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65,
- 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x2f, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
- 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4f, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07,
- 0x41, 0x4e, 0x44, 0x52, 0x4f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x49, 0x4e,
- 0x44, 0x4f, 0x57, 0x53, 0x10, 0x02, 0x32, 0xb0, 0x1e, 0x0a, 0x06, 0x43, 0x61, 0x6d, 0x70, 0x75,
- 0x73, 0x12, 0x4d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x70, 0x4e, 0x65, 0x77, 0x73, 0x12,
- 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
- 0x74, 0x54, 0x6f, 0x70, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x11, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x2f, 0x74, 0x6f, 0x70,
- 0x12, 0x5e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79,
- 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x62, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x73, 0x12, 0x0d, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
- 0x12, 0x68, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x12,
- 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6f, 0x6d,
- 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53,
- 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
- 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x62, 0x05, 0x72, 0x6f, 0x6f, 0x6d,
- 0x73, 0x22, 0x17, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x66, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x2f, 0x72,
- 0x6f, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x6a, 0x0a, 0x0c, 0x47, 0x65,
- 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f,
- 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x28, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x22, 0x62, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
- 0x15, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0x60, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f,
- 0x6d, 0x4d, 0x61, 0x70, 0x73, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52,
- 0x6f, 0x6f, 0x6d, 0x4d, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x4d, 0x61, 0x70, 0x73,
- 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a,
- 0x62, 0x04, 0x6d, 0x61, 0x70, 0x73, 0x22, 0x10, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x66, 0x69, 0x6e,
- 0x64, 0x65, 0x72, 0x2f, 0x6d, 0x61, 0x70, 0x73, 0x12, 0x7b, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52,
- 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1e,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x6f, 0x72,
- 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x43, 0x6f, 0x6f, 0x72,
- 0x64, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x27, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x66, 0x69,
- 0x6e, 0x64, 0x65, 0x72, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x69,
- 0x6e, 0x61, 0x74, 0x65, 0x73, 0x12, 0x7b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d,
- 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
- 0x65, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52,
- 0x6f, 0x6f, 0x6d, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79,
- 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x3a, 0x01, 0x2a, 0x62, 0x06, 0x65, 0x76, 0x65,
- 0x6e, 0x74, 0x73, 0x22, 0x1d, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x66, 0x69, 0x6e, 0x64, 0x65, 0x72,
- 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x79,
- 0x49, 0x64, 0x12, 0x6f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72,
- 0x69, 0x61, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e,
- 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x61, 0x66,
- 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c,
- 0x79, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x63,
- 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f,
- 0x67, 0x65, 0x74, 0x12, 0x5b, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61,
- 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x69, 0x73, 0x68,
- 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65,
- 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10,
- 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x67, 0x65, 0x74,
- 0x12, 0x6e, 0x0a, 0x12, 0x4e, 0x65, 0x77, 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61,
- 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x65, 0x77,
- 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x20,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x3a, 0x01, 0x2a, 0x22, 0x15, 0x2f, 0x63, 0x61, 0x66, 0x65,
- 0x74, 0x65, 0x72, 0x69, 0x61, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x6e, 0x65, 0x77,
- 0x12, 0x5f, 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e,
- 0x67, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x65, 0x77, 0x44, 0x69, 0x73, 0x68, 0x52,
- 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
- 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x72, 0x7a, 0x5f, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x72, 0x7a, 0x49, 0x64, 0x22, 0xb3, 0x01,
+ 0x0a, 0x14, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x63, 0x6d, 0x5f, 0x74, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x63, 0x6d, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65,
+ 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b,
+ 0x65, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x49,
+ 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65, 0x5f, 0x69, 0x64,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x65, 0x6d, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x65,
+ 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x69,
+ 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a,
+ 0x0f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xa9, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4e, 0x6f,
+ 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12,
+ 0x27, 0x0a, 0x0f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05,
+ 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
+ 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
+ 0x72, 0x65, 0x22, 0x48, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6e, 0x6f,
+ 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x35, 0x0a, 0x1b,
+ 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x22, 0x3b, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65,
+ 0x6e, 0x48, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x49, 0x64,
+ 0x22, 0xa1, 0x01, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x48,
+ 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a,
+ 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f,
+ 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x75, 0x6e, 0x74,
+ 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x02, 0x52, 0x07, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73,
+ 0x74, 0x61, 0x6d, 0x70, 0x2a, 0x2f, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79,
+ 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x49, 0x4f, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x41,
+ 0x4e, 0x44, 0x52, 0x4f, 0x49, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x49, 0x4e, 0x44,
+ 0x4f, 0x57, 0x53, 0x10, 0x02, 0x32, 0xad, 0x18, 0x0a, 0x06, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73,
+ 0x12, 0x64, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65, 0x72,
+ 0x74, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77,
+ 0x73, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18,
+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x41, 0x6c, 0x65,
+ 0x72, 0x74, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16,
+ 0x62, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x0c, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x2f,
+ 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12, 0x69, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65,
+ 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+ 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x4e, 0x65, 0x77, 0x73, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c,
+ 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x62, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x73, 0x12, 0x0d, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x12, 0x49, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x12, 0x14, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65, 0x77, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x65,
+ 0x77, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x62,
+ 0x04, 0x6e, 0x65, 0x77, 0x73, 0x12, 0x05, 0x2f, 0x6e, 0x65, 0x77, 0x73, 0x12, 0x68, 0x0a, 0x0b,
+ 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x17, 0x2e, 0x61, 0x70,
+ 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,
+ 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x23, 0x3a, 0x01, 0x2a, 0x62, 0x05, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x22, 0x17, 0x2f,
+ 0x72, 0x6f, 0x6f, 0x6d, 0x66, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x2f, 0x72, 0x6f, 0x6f, 0x6d, 0x2f,
+ 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x72, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61,
+ 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1e, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61,
+ 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61,
+ 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93,
+ 0x02, 0x18, 0x3a, 0x01, 0x2a, 0x22, 0x13, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f,
+ 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x67, 0x65, 0x74, 0x12, 0x63, 0x0a, 0x0e, 0x47, 0x65,
+ 0x74, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1a, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
+ 0x65, 0x74, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x70,
+ 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f,
+ 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x67, 0x65, 0x74, 0x12,
+ 0x75, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e,
+ 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6e,
+ 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x01,
+ 0x2a, 0x22, 0x13, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x74, 0x69,
+ 0x6e, 0x67, 0x2f, 0x6e, 0x65, 0x77, 0x12, 0x69, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69,
+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e,
+ 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x69, 0x73, 0x68, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x52,
+ 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22,
0x10, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x6e, 0x65,
- 0x77, 0x12, 0x71, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c,
- 0x65, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
- 0x79, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52,
- 0x65, 0x70, 0x6c, 0x79, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x62, 0x0a, 0x72, 0x61,
- 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x1a, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f,
- 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67,
- 0x54, 0x61, 0x67, 0x73, 0x12, 0x66, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54,
- 0x61, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x11, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x2c,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x62, 0x0a, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61,
- 0x67, 0x73, 0x12, 0x18, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67,
- 0x2f, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x12, 0x7b, 0x0a, 0x19,
- 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x61, 0x66, 0x65,
- 0x74, 0x65, 0x72, 0x69, 0x61, 0x54, 0x61, 0x67, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
- 0x79, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x67, 0x73, 0x52,
- 0x65, 0x70, 0x6c, 0x79, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x62, 0x0a, 0x72, 0x61,
- 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x1f, 0x2f, 0x63, 0x61, 0x66, 0x65, 0x74,
- 0x65, 0x72, 0x69, 0x61, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x6c, 0x6c, 0x52,
- 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x6c, 0x0a, 0x0d, 0x47, 0x65, 0x74,
- 0x43, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
- 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x66, 0x65,
- 0x74, 0x65, 0x72, 0x69, 0x61, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x25, 0x62, 0x09, 0x63, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x12, 0x18, 0x2f,
- 0x63, 0x61, 0x66, 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x2f, 0x61, 0x6c, 0x6c, 0x43, 0x61, 0x66,
- 0x65, 0x74, 0x65, 0x72, 0x69, 0x61, 0x73, 0x12, 0x56, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x44, 0x69,
- 0x73, 0x68, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69,
- 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79,
- 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x62, 0x04, 0x64, 0x69, 0x73, 0x68, 0x12, 0x0f,
- 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x68, 0x65, 0x73, 0x12,
- 0x6d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c,
- 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a,
- 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x69, 0x62, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
- 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x62, 0x61, 0x72, 0x72, 0x69, 0x65,
- 0x72, 0x66, 0x72, 0x65, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x12, 0x67,
- 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x32, 0x47, 0x70,
- 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e,
- 0x47, 0x65, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x32, 0x47, 0x70, 0x73, 0x52,
- 0x65, 0x70, 0x6c, 0x79, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x62,
- 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x66, 0x72, 0x65, 0x65, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64,
- 0x69, 0x6e, 0x67, 0x32, 0x47, 0x70, 0x73, 0x12, 0x90, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x41,
- 0x72, 0x65, 0x61, 0x46, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x79, 0x42,
- 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x72, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e,
- 0x47, 0x65, 0x74, 0x41, 0x72, 0x65, 0x61, 0x46, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65,
- 0x73, 0x42, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x72, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72,
- 0x65, 0x61, 0x46, 0x61, 0x63, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x79, 0x42, 0x75,
- 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x4e, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x62, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x66,
- 0x72, 0x65, 0x65, 0x2f, 0x6e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x12, 0x64, 0x0a, 0x10, 0x47, 0x65,
- 0x74, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x54, 0x6f, 0x69, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x16,
- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74,
- 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x54, 0x6f, 0x69, 0x6c, 0x65, 0x74, 0x73, 0x52, 0x65, 0x70,
- 0x6c, 0x79, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x62, 0x61, 0x72,
- 0x72, 0x69, 0x65, 0x72, 0x66, 0x72, 0x65, 0x65, 0x2f, 0x74, 0x6f, 0x69, 0x6c, 0x65, 0x74, 0x73,
- 0x12, 0x6a, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x45, 0x6c, 0x65,
- 0x76, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x66, 0x45, 0x6c,
- 0x65, 0x76, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1e, 0x82, 0xd3,
- 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x62, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x66, 0x72,
- 0x65, 0x65, 0x2f, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x70, 0x0a, 0x12,
- 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e,
- 0x12, 0x1c, 0x2f, 0x62, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x66, 0x72, 0x65, 0x65, 0x2f, 0x6d,
- 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6b,
- 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65,
- 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x69,
- 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
- 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x54,
- 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x1a, 0x12, 0x18, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x74, 0x69, 0x6d, 0x65, 0x73,
- 0x2f, 0x7b, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x7d, 0x12, 0x62, 0x0a, 0x0d, 0x47,
- 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
- 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79,
- 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x6e, 0x6f, 0x74, 0x65, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12,
- 0x5b, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x4c,
- 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69,
- 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12,
- 0x0b, 0x2f, 0x73, 0x74, 0x75, 0x64, 0x79, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x49, 0x0a, 0x07,
- 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x6f, 0x12, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
- 0x74, 0x4b, 0x69, 0x6e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x69, 0x6e, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
- 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x6b, 0x69, 0x6e, 0x6f, 0x2f, 0x7b,
- 0x6c, 0x61, 0x73, 0x74, 0x49, 0x64, 0x7d, 0x12, 0x58, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x46,
- 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65,
- 0x6e, 0x64, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
- 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x64,
- 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x11,
- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x22, 0x09, 0x2f, 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63,
- 0x6b, 0x12, 0x71, 0x0a, 0x11, 0x53, 0x65, 0x6e, 0x64, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63,
- 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e,
- 0x64, 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x6e, 0x64,
- 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70,
- 0x6c, 0x79, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x18, 0x2f, 0x66, 0x65, 0x65,
- 0x64, 0x62, 0x61, 0x63, 0x6b, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x69, 0x6d, 0x61, 0x67,
- 0x65, 0x4e, 0x72, 0x7d, 0x12, 0x6b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61,
- 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
- 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70,
- 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
- 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
- 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2f, 0x7b, 0x6c, 0x72, 0x7a, 0x49, 0x64,
- 0x7d, 0x12, 0x71, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66,
- 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
- 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63,
- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x27, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x49, 0x64, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69,
- 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12,
- 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69,
- 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x2f, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x2f, 0x7b, 0x6e,
- 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x7d, 0x12, 0x54,
- 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x61,
- 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71,
- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65,
- 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x12, 0x12, 0x10, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6c, 0x72,
- 0x7a, 0x49, 0x64, 0x7d, 0x12, 0x7d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65,
+ 0x77, 0x12, 0x8c, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61,
+ 0x62, 0x6c, 0x65, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x70,
+ 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x44,
+ 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f,
+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
+ 0x6c, 0x65, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
+ 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x62, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f,
+ 0x74, 0x61, 0x67, 0x73, 0x12, 0x1a, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72, 0x61, 0x74, 0x69,
+ 0x6e, 0x67, 0x2f, 0x61, 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73,
+ 0x12, 0x6f, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x73,
+ 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54,
+ 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69,
+ 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x70,
+ 0x6c, 0x79, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x62, 0x0b, 0x72, 0x61, 0x74, 0x69,
+ 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x18, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x72,
+ 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x68, 0x54, 0x61, 0x67,
+ 0x73, 0x12, 0x98, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61,
+ 0x62, 0x6c, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x54, 0x61, 0x67, 0x73, 0x12, 0x24,
+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
+ 0x6c, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41,
+ 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x54,
+ 0x61, 0x67, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c,
+ 0x62, 0x0b, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x2f,
+ 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x61,
+ 0x6c, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x54, 0x61, 0x67, 0x73, 0x12, 0x67, 0x0a, 0x0c,
+ 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x73, 0x12, 0x18, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x25,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x62, 0x07, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x12,
+ 0x14, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x61, 0x6c, 0x6c, 0x43, 0x61, 0x6e,
+ 0x74, 0x65, 0x65, 0x6e, 0x73, 0x12, 0x59, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73,
+ 0x68, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69,
+ 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70,
+ 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x68, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c,
+ 0x79, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x62, 0x04, 0x64, 0x69, 0x73, 0x68, 0x12,
+ 0x0f, 0x2f, 0x64, 0x69, 0x73, 0x68, 0x2f, 0x61, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x68, 0x65, 0x73,
+ 0x12, 0x7a, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69,
+ 0x62, 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+ 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x50,
+ 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x69, 0x62,
+ 0x6c, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1d, 0x82,
+ 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x62, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x66,
+ 0x72, 0x65, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x12, 0x7b, 0x0a, 0x13,
+ 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f,
+ 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d,
+ 0x6f, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
+ 0x70, 0x6c, 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x62, 0x61,
+ 0x72, 0x72, 0x69, 0x65, 0x72, 0x66, 0x72, 0x65, 0x65, 0x2f, 0x6d, 0x6f, 0x72, 0x65, 0x49, 0x6e,
+ 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x6e, 0x0a, 0x10, 0x4c, 0x69, 0x73,
+ 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x54,
+ 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70,
+ 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d,
+ 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12,
+ 0x18, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6e, 0x67, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x2f, 0x7b,
+ 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x7d, 0x12, 0x62, 0x0a, 0x0d, 0x47, 0x65, 0x74,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69,
+ 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1d,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x6e,
+ 0x6f, 0x74, 0x65, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x12, 0x5b, 0x0a,
+ 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x73, 0x12,
+ 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52,
+ 0x6f, 0x6f, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70,
+ 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x79, 0x52, 0x6f, 0x6f, 0x6d, 0x73,
+ 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f,
+ 0x73, 0x74, 0x75, 0x64, 0x79, 0x72, 0x6f, 0x6f, 0x6d, 0x73, 0x12, 0x55, 0x0a, 0x0a, 0x4c, 0x69,
+ 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c,
+ 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x6f, 0x76, 0x69, 0x65,
+ 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11,
+ 0x2f, 0x6d, 0x6f, 0x76, 0x69, 0x65, 0x73, 0x2f, 0x7b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x64,
+ 0x7d, 0x12, 0x67, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64, 0x62,
+ 0x61, 0x63, 0x6b, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x46, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x46, 0x65, 0x65, 0x64,
+ 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x17, 0x3a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x09, 0x2f,
+ 0x66, 0x65, 0x65, 0x64, 0x62, 0x61, 0x63, 0x6b, 0x28, 0x01, 0x12, 0x6c, 0x0a, 0x0f, 0x47, 0x65,
+ 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69,
+ 0x2e, 0x47, 0x65, 0x74, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f,
+ 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x2f,
+ 0x7b, 0x6c, 0x72, 0x7a, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x73, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e,
+ 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x70,
+ 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
+ 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
+ 0x70, 0x6c, 0x79, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x6e, 0x6f,
+ 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6e, 0x6f, 0x74,
+ 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x90, 0x01,
+ 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
+ 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x30,
+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x2f, 0x7b,
+ 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d,
+ 0x12, 0x52, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x15, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65,
+ 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+ 0x13, 0x12, 0x11, 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6c, 0x72, 0x7a,
+ 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x7e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65,
0x65, 0x6e, 0x48, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x48, 0x65, 0x61, 0x64,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x48, 0x65, 0x61,
- 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x26, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x68, 0x65,
+ 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x27, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e, 0x2f, 0x68, 0x65,
0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x2f, 0x7b, 0x63, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x6e,
- 0x49, 0x64, 0x7d, 0x12, 0x99, 0x01, 0x0a, 0x18, 0x49, 0x4f, 0x53, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x99, 0x01, 0x0a, 0x18, 0x49, 0x4f, 0x53, 0x44, 0x65, 0x76, 0x69,
+ 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x4f, 0x53, 0x44, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x4f,
+ 0x53, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x33, 0x82, 0xd3, 0xe4,
+ 0x93, 0x02, 0x2d, 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, 0x69, 0x6f, 0x73, 0x2f, 0x6e, 0x6f, 0x74,
+ 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
- 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x4f, 0x53, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52,
- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x4f, 0x53,
- 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93,
- 0x02, 0x2d, 0x3a, 0x01, 0x2a, 0x22, 0x28, 0x2f, 0x69, 0x6f, 0x73, 0x2f, 0x6e, 0x6f, 0x74, 0x69,
- 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
- 0x5a, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63,
- 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72,
- 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e,
- 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69,
- 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a,
- 0x01, 0x2a, 0x22, 0x07, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x52,
- 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70,
- 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f,
- 0x76, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1a, 0x82,
- 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b,
- 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x7d, 0x42, 0x5e, 0x0a, 0x12, 0x61, 0x70, 0x70,
- 0x2e, 0x74, 0x75, 0x6d, 0x2e, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x42,
- 0x0e, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
- 0x01, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x55,
- 0x4d, 0x2d, 0x44, 0x65, 0x76, 0x2f, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x2d, 0x42, 0x61, 0x63,
- 0x6b, 0x65, 0x6e, 0x64, 0x2f, 0x61, 0x70, 0x69, 0xaa, 0x02, 0x0e, 0x43, 0x61, 0x6d, 0x70, 0x75,
- 0x73, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x33,
+ 0x12, 0x54, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
+ 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69,
+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70,
+ 0x6c, 0x79, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x3a, 0x01, 0x2a, 0x22, 0x07, 0x2f,
+ 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5d, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x44, 0x65, 0x76,
+ 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15,
+ 0x2a, 0x13, 0x2f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x64, 0x65, 0x76, 0x69, 0x63,
+ 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0x5e, 0x0a, 0x12, 0x61, 0x70, 0x70, 0x2e, 0x74, 0x75, 0x6d,
+ 0x2e, 0x63, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0e, 0x43, 0x61, 0x6d,
+ 0x70, 0x75, 0x73, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x25, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x55, 0x4d, 0x2d, 0x44, 0x65,
+ 0x76, 0x2f, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x2d, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64,
+ 0x2f, 0x61, 0x70, 0x69, 0xaa, 0x02, 0x0e, 0x43, 0x61, 0x6d, 0x70, 0x75, 0x73, 0x41, 0x70, 0x69,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -5540,206 +5516,192 @@ func file_tumdev_campus_backend_proto_rawDescGZIP() []byte {
return file_tumdev_campus_backend_proto_rawDescData
}
-var file_tumdev_campus_backend_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
-var file_tumdev_campus_backend_proto_msgTypes = make([]protoimpl.MessageInfo, 73)
+var file_tumdev_campus_backend_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_tumdev_campus_backend_proto_msgTypes = make([]protoimpl.MessageInfo, 76)
var file_tumdev_campus_backend_proto_goTypes = []interface{}{
- (DeviceType)(0), // 0: api.DeviceType
- (*RegisterDeviceRequest)(nil), // 1: api.RegisterDeviceRequest
- (*RegisterDeviceReply)(nil), // 2: api.RegisterDeviceReply
- (*RemoveDeviceRequest)(nil), // 3: api.RemoveDeviceRequest
- (*RemoveDeviceReply)(nil), // 4: api.RemoveDeviceReply
- (*IOSDeviceRequestResponseRequest)(nil), // 5: api.IOSDeviceRequestResponseRequest
- (*IOSDeviceRequestResponseReply)(nil), // 6: api.IOSDeviceRequestResponseReply
- (*GetRoomScheduleRequest)(nil), // 7: api.GetRoomScheduleRequest
- (*GetRoomScheduleReply)(nil), // 8: api.GetRoomScheduleReply
- (*GetRoomCoordinatesRequest)(nil), // 9: api.GetRoomCoordinatesRequest
- (*GetRoomCoordinatesReply)(nil), // 10: api.GetRoomCoordinatesReply
- (*GetRoomMapsRequest)(nil), // 11: api.GetRoomMapsRequest
- (*GetRoomMapsReply)(nil), // 12: api.GetRoomMapsReply
- (*GetLocationsRequest)(nil), // 13: api.GetLocationsRequest
- (*GetLocationsReply)(nil), // 14: api.GetLocationsReply
- (*SearchRoomsRequest)(nil), // 15: api.SearchRoomsRequest
- (*SearchRoomsReply)(nil), // 16: api.SearchRoomsReply
- (*Room)(nil), // 17: api.Room
- (*NewsSourceReply)(nil), // 18: api.NewsSourceReply
- (*NewsSource)(nil), // 19: api.NewsSource
- (*GetTopNewsReply)(nil), // 20: api.GetTopNewsReply
- (*CafeteriaRatingRequest)(nil), // 21: api.CafeteriaRatingRequest
- (*DishRatingRequest)(nil), // 22: api.DishRatingRequest
- (*CafeteriaRatingReply)(nil), // 23: api.CafeteriaRatingReply
- (*DishRatingReply)(nil), // 24: api.DishRatingReply
- (*SingleRatingReply)(nil), // 25: api.SingleRatingReply
- (*NewCafeteriaRatingRequest)(nil), // 26: api.NewCafeteriaRatingRequest
- (*NewDishRatingRequest)(nil), // 27: api.NewDishRatingRequest
- (*GetTagsReply)(nil), // 28: api.GetTagsReply
- (*TagsOverview)(nil), // 29: api.TagsOverview
- (*RatingTag)(nil), // 30: api.RatingTag
- (*RatingTagNewRequest)(nil), // 31: api.RatingTagNewRequest
- (*RatingTagResult)(nil), // 32: api.RatingTagResult
- (*GetCafeteriaReply)(nil), // 33: api.GetCafeteriaReply
- (*Cafeteria)(nil), // 34: api.Cafeteria
- (*GetDishesRequest)(nil), // 35: api.GetDishesRequest
- (*GetDishesReply)(nil), // 36: api.GetDishesReply
- (*GetResponsiblePersonReply)(nil), // 37: api.GetResponsiblePersonReply
- (*ResponsiblePersonElement)(nil), // 38: api.ResponsiblePersonElement
- (*GetBuilding2GpsReply)(nil), // 39: api.GetBuilding2GpsReply
- (*Building2GpsElement)(nil), // 40: api.Building2GpsElement
- (*GetAreaFacilitiesByBuildingNrReply)(nil), // 41: api.GetAreaFacilitiesByBuildingNrReply
- (*GetAreaFacilitiesByBuildingNrRequest)(nil), // 42: api.GetAreaFacilitiesByBuildingNrRequest
- (*GetListOfToiletsReply)(nil), // 43: api.GetListOfToiletsReply
- (*RoomInformationElement)(nil), // 44: api.RoomInformationElement
- (*GetListOfElevatorsReply)(nil), // 45: api.GetListOfElevatorsReply
- (*GetMoreInformationReply)(nil), // 46: api.GetMoreInformationReply
- (*MoreInformationElement)(nil), // 47: api.MoreInformationElement
- (*GetOpeningTimesRequest)(nil), // 48: api.GetOpeningTimesRequest
- (*GetOpeningTimesReply)(nil), // 49: api.GetOpeningTimesReply
- (*OpeningTimesMsgElement)(nil), // 50: api.OpeningTimesMsgElement
- (*GetUpdateNoteRequest)(nil), // 51: api.GetUpdateNoteRequest
- (*GetUpdateNoteReply)(nil), // 52: api.GetUpdateNoteReply
- (*GetStudyRoomListReply)(nil), // 53: api.GetStudyRoomListReply
- (*StudyRoomMsgElement)(nil), // 54: api.StudyRoomMsgElement
- (*StudyRoom)(nil), // 55: api.StudyRoom
- (*GetKinoRequest)(nil), // 56: api.GetKinoRequest
- (*GetKinoReply)(nil), // 57: api.GetKinoReply
- (*KinoMsgElement)(nil), // 58: api.KinoMsgElement
- (*SendFeedbackRequest)(nil), // 59: api.SendFeedbackRequest
- (*SendFeedbackImageReply)(nil), // 60: api.SendFeedbackImageReply
- (*SendFeedbackImageRequest)(nil), // 61: api.SendFeedbackImageRequest
- (*GetMembersRequest)(nil), // 62: api.GetMembersRequest
- (*GetMembersReply)(nil), // 63: api.GetMembersReply
- (*GetUploadStatusRequest)(nil), // 64: api.GetUploadStatusRequest
- (*GetUploadStatusReply)(nil), // 65: api.GetUploadStatusReply
- (*GetNotificationsReply)(nil), // 66: api.GetNotificationsReply
- (*NotificationsRequest)(nil), // 67: api.NotificationsRequest
- (*GetNotificationsConfirmReply)(nil), // 68: api.GetNotificationsConfirmReply
- (*GetCanteenHeadCountRequest)(nil), // 69: api.GetCanteenHeadCountRequest
- (*GetCanteenHeadCountReply)(nil), // 70: api.GetCanteenHeadCountReply
- (*GetRoomScheduleReply_RoomScheduleEvent)(nil), // 71: api.GetRoomScheduleReply.RoomScheduleEvent
- (*GetRoomMapsReply_Map)(nil), // 72: api.GetRoomMapsReply.Map
- (*GetLocationsReply_Location)(nil), // 73: api.GetLocationsReply.Location
- (*timestamppb.Timestamp)(nil), // 74: google.protobuf.Timestamp
- (*emptypb.Empty)(nil), // 75: google.protobuf.Empty
+ (DeviceType)(0), // 0: api.DeviceType
+ (CreateFeedbackRequest_Recipient)(0), // 1: api.CreateFeedbackRequest.Recipient
+ (*CreateDeviceRequest)(nil), // 2: api.CreateDeviceRequest
+ (*CreateDeviceReply)(nil), // 3: api.CreateDeviceReply
+ (*DeleteDeviceRequest)(nil), // 4: api.DeleteDeviceRequest
+ (*DeleteDeviceReply)(nil), // 5: api.DeleteDeviceReply
+ (*IOSDeviceRequestResponseRequest)(nil), // 6: api.IOSDeviceRequestResponseRequest
+ (*IOSDeviceRequestResponseReply)(nil), // 7: api.IOSDeviceRequestResponseReply
+ (*SearchRoomsRequest)(nil), // 8: api.SearchRoomsRequest
+ (*SearchRoomsReply)(nil), // 9: api.SearchRoomsReply
+ (*Room)(nil), // 10: api.Room
+ (*News)(nil), // 11: api.News
+ (*ListNewsReply)(nil), // 12: api.ListNewsReply
+ (*ListNewsRequest)(nil), // 13: api.ListNewsRequest
+ (*ListNewsSourcesRequest)(nil), // 14: api.ListNewsSourcesRequest
+ (*ListNewsSourcesReply)(nil), // 15: api.ListNewsSourcesReply
+ (*NewsSource)(nil), // 16: api.NewsSource
+ (*ListNewsAlertsRequest)(nil), // 17: api.ListNewsAlertsRequest
+ (*ListNewsAlertsReply)(nil), // 18: api.ListNewsAlertsReply
+ (*NewsAlert)(nil), // 19: api.NewsAlert
+ (*ListCanteenRatingsRequest)(nil), // 20: api.ListCanteenRatingsRequest
+ (*ListCanteenRatingsReply)(nil), // 21: api.ListCanteenRatingsReply
+ (*GetDishRatingsRequest)(nil), // 22: api.GetDishRatingsRequest
+ (*GetDishRatingsReply)(nil), // 23: api.GetDishRatingsReply
+ (*SingleRatingReply)(nil), // 24: api.SingleRatingReply
+ (*CreateCanteenRatingReply)(nil), // 25: api.CreateCanteenRatingReply
+ (*CreateCanteenRatingRequest)(nil), // 26: api.CreateCanteenRatingRequest
+ (*CreateDishRatingReply)(nil), // 27: api.CreateDishRatingReply
+ (*CreateDishRatingRequest)(nil), // 28: api.CreateDishRatingRequest
+ (*ListAvailableDishTagsRequest)(nil), // 29: api.ListAvailableDishTagsRequest
+ (*ListAvailableDishTagsReply)(nil), // 30: api.ListAvailableDishTagsReply
+ (*ListNameTagsRequest)(nil), // 31: api.ListNameTagsRequest
+ (*ListNameTagsReply)(nil), // 32: api.ListNameTagsReply
+ (*ListAvailableCanteenTagsRequest)(nil), // 33: api.ListAvailableCanteenTagsRequest
+ (*ListAvailableCanteenTagsReply)(nil), // 34: api.ListAvailableCanteenTagsReply
+ (*TagsOverview)(nil), // 35: api.TagsOverview
+ (*RatingTag)(nil), // 36: api.RatingTag
+ (*RatingTagNewRequest)(nil), // 37: api.RatingTagNewRequest
+ (*RatingTagResult)(nil), // 38: api.RatingTagResult
+ (*ListCanteensRequest)(nil), // 39: api.ListCanteensRequest
+ (*ListCanteensReply)(nil), // 40: api.ListCanteensReply
+ (*Canteen)(nil), // 41: api.Canteen
+ (*ListDishesRequest)(nil), // 42: api.ListDishesRequest
+ (*ListDishesReply)(nil), // 43: api.ListDishesReply
+ (*ListResponsiblePersonRequest)(nil), // 44: api.ListResponsiblePersonRequest
+ (*ListResponsiblePersonReply)(nil), // 45: api.ListResponsiblePersonReply
+ (*ResponsiblePerson)(nil), // 46: api.ResponsiblePerson
+ (*RoomInformationElement)(nil), // 47: api.RoomInformationElement
+ (*ListMoreInformationRequest)(nil), // 48: api.ListMoreInformationRequest
+ (*ListMoreInformationReply)(nil), // 49: api.ListMoreInformationReply
+ (*ListOpeningTimesRequest)(nil), // 50: api.ListOpeningTimesRequest
+ (*ListOpeningTimesReply)(nil), // 51: api.ListOpeningTimesReply
+ (*OpeningTimesMsgElement)(nil), // 52: api.OpeningTimesMsgElement
+ (*GetUpdateNoteRequest)(nil), // 53: api.GetUpdateNoteRequest
+ (*GetUpdateNoteReply)(nil), // 54: api.GetUpdateNoteReply
+ (*ListStudyRoomsRequest)(nil), // 55: api.ListStudyRoomsRequest
+ (*ListStudyRoomsReply)(nil), // 56: api.ListStudyRoomsReply
+ (*StudyRoomMsgElement)(nil), // 57: api.StudyRoomMsgElement
+ (*StudyRoom)(nil), // 58: api.StudyRoom
+ (*ListMoviesRequest)(nil), // 59: api.ListMoviesRequest
+ (*ListMoviesReply)(nil), // 60: api.ListMoviesReply
+ (*Movie)(nil), // 61: api.Movie
+ (*CreateFeedbackRequest)(nil), // 62: api.CreateFeedbackRequest
+ (*Coordinate)(nil), // 63: api.Coordinate
+ (*CreateFeedbackReply)(nil), // 64: api.CreateFeedbackReply
+ (*CreateFeedbackImageReply)(nil), // 65: api.CreateFeedbackImageReply
+ (*CreateFeedbackImageRequest)(nil), // 66: api.CreateFeedbackImageRequest
+ (*GetMemberRequest)(nil), // 67: api.GetMemberRequest
+ (*GetMemberReply)(nil), // 68: api.GetMemberReply
+ (*GetUploadStatusRequest)(nil), // 69: api.GetUploadStatusRequest
+ (*GetUploadStatusReply)(nil), // 70: api.GetUploadStatusReply
+ (*GetNotificationRequest)(nil), // 71: api.GetNotificationRequest
+ (*GetNotificationReply)(nil), // 72: api.GetNotificationReply
+ (*GetNotificationConfirmRequest)(nil), // 73: api.GetNotificationConfirmRequest
+ (*GetNotificationConfirmReply)(nil), // 74: api.GetNotificationConfirmReply
+ (*GetCanteenHeadCountRequest)(nil), // 75: api.GetCanteenHeadCountRequest
+ (*GetCanteenHeadCountReply)(nil), // 76: api.GetCanteenHeadCountReply
+ (*ListMoreInformationReply_MoreInformation)(nil), // 77: api.ListMoreInformationReply.MoreInformation
+ (*timestamppb.Timestamp)(nil), // 78: google.protobuf.Timestamp
}
var file_tumdev_campus_backend_proto_depIdxs = []int32{
- 0, // 0: api.RegisterDeviceRequest.deviceType:type_name -> api.DeviceType
- 0, // 1: api.RemoveDeviceRequest.deviceType:type_name -> api.DeviceType
- 74, // 2: api.GetRoomScheduleRequest.start:type_name -> google.protobuf.Timestamp
- 74, // 3: api.GetRoomScheduleRequest.end:type_name -> google.protobuf.Timestamp
- 71, // 4: api.GetRoomScheduleReply.events:type_name -> api.GetRoomScheduleReply.RoomScheduleEvent
- 72, // 5: api.GetRoomMapsReply.maps:type_name -> api.GetRoomMapsReply.Map
- 73, // 6: api.GetLocationsReply.locations:type_name -> api.GetLocationsReply.Location
- 17, // 7: api.SearchRoomsReply.rooms:type_name -> api.Room
- 19, // 8: api.NewsSourceReply.sources:type_name -> api.NewsSource
- 74, // 9: api.GetTopNewsReply.created:type_name -> google.protobuf.Timestamp
- 74, // 10: api.GetTopNewsReply.from:type_name -> google.protobuf.Timestamp
- 74, // 11: api.GetTopNewsReply.to:type_name -> google.protobuf.Timestamp
- 74, // 12: api.CafeteriaRatingRequest.from:type_name -> google.protobuf.Timestamp
- 74, // 13: api.CafeteriaRatingRequest.to:type_name -> google.protobuf.Timestamp
- 74, // 14: api.DishRatingRequest.from:type_name -> google.protobuf.Timestamp
- 74, // 15: api.DishRatingRequest.to:type_name -> google.protobuf.Timestamp
- 25, // 16: api.CafeteriaRatingReply.rating:type_name -> api.SingleRatingReply
- 32, // 17: api.CafeteriaRatingReply.ratingTags:type_name -> api.RatingTagResult
- 25, // 18: api.DishRatingReply.rating:type_name -> api.SingleRatingReply
- 32, // 19: api.DishRatingReply.ratingTags:type_name -> api.RatingTagResult
- 32, // 20: api.DishRatingReply.nameTags:type_name -> api.RatingTagResult
- 31, // 21: api.SingleRatingReply.ratingTags:type_name -> api.RatingTagNewRequest
- 74, // 22: api.SingleRatingReply.visited:type_name -> google.protobuf.Timestamp
- 30, // 23: api.NewCafeteriaRatingRequest.ratingTags:type_name -> api.RatingTag
- 30, // 24: api.NewDishRatingRequest.ratingTags:type_name -> api.RatingTag
- 29, // 25: api.GetTagsReply.ratingTags:type_name -> api.TagsOverview
- 34, // 26: api.GetCafeteriaReply.cafeteria:type_name -> api.Cafeteria
- 38, // 27: api.GetResponsiblePersonReply.responsiblePerson:type_name -> api.ResponsiblePersonElement
- 40, // 28: api.GetBuilding2GpsReply.building2Gps:type_name -> api.Building2GpsElement
- 44, // 29: api.GetAreaFacilitiesByBuildingNrReply.areaFacilitiesByBuildingNr:type_name -> api.RoomInformationElement
- 44, // 30: api.GetListOfToiletsReply.listOfToilets:type_name -> api.RoomInformationElement
- 44, // 31: api.GetListOfElevatorsReply.listOfElevators:type_name -> api.RoomInformationElement
- 47, // 32: api.GetMoreInformationReply.information:type_name -> api.MoreInformationElement
- 50, // 33: api.GetOpeningTimesReply.facilities:type_name -> api.OpeningTimesMsgElement
- 54, // 34: api.GetStudyRoomListReply.rooms:type_name -> api.StudyRoomMsgElement
- 55, // 35: api.StudyRoomMsgElement.rooms:type_name -> api.StudyRoom
- 58, // 36: api.GetKinoReply.kinos:type_name -> api.KinoMsgElement
- 74, // 37: api.KinoMsgElement.date:type_name -> google.protobuf.Timestamp
- 74, // 38: api.KinoMsgElement.created:type_name -> google.protobuf.Timestamp
- 74, // 39: api.GetCanteenHeadCountReply.timestamp:type_name -> google.protobuf.Timestamp
- 74, // 40: api.GetRoomScheduleReply.RoomScheduleEvent.start:type_name -> google.protobuf.Timestamp
- 74, // 41: api.GetRoomScheduleReply.RoomScheduleEvent.end:type_name -> google.protobuf.Timestamp
- 75, // 42: api.Campus.GetTopNews:input_type -> google.protobuf.Empty
- 75, // 43: api.Campus.GetNewsSources:input_type -> google.protobuf.Empty
- 15, // 44: api.Campus.SearchRooms:input_type -> api.SearchRoomsRequest
- 13, // 45: api.Campus.GetLocations:input_type -> api.GetLocationsRequest
- 11, // 46: api.Campus.GetRoomMaps:input_type -> api.GetRoomMapsRequest
- 9, // 47: api.Campus.GetRoomCoordinates:input_type -> api.GetRoomCoordinatesRequest
- 7, // 48: api.Campus.GetRoomSchedule:input_type -> api.GetRoomScheduleRequest
- 21, // 49: api.Campus.GetCafeteriaRatings:input_type -> api.CafeteriaRatingRequest
- 22, // 50: api.Campus.GetDishRatings:input_type -> api.DishRatingRequest
- 26, // 51: api.Campus.NewCafeteriaRating:input_type -> api.NewCafeteriaRatingRequest
- 27, // 52: api.Campus.NewDishRating:input_type -> api.NewDishRatingRequest
- 75, // 53: api.Campus.GetAvailableDishTags:input_type -> google.protobuf.Empty
- 75, // 54: api.Campus.GetNameTags:input_type -> google.protobuf.Empty
- 75, // 55: api.Campus.GetAvailableCafeteriaTags:input_type -> google.protobuf.Empty
- 75, // 56: api.Campus.GetCafeterias:input_type -> google.protobuf.Empty
- 35, // 57: api.Campus.GetDishes:input_type -> api.GetDishesRequest
- 75, // 58: api.Campus.GetResponsiblePerson:input_type -> google.protobuf.Empty
- 75, // 59: api.Campus.GetBuilding2Gps:input_type -> google.protobuf.Empty
- 42, // 60: api.Campus.GetAreaFacilitiesByBuildingNr:input_type -> api.GetAreaFacilitiesByBuildingNrRequest
- 75, // 61: api.Campus.GetListOfToilets:input_type -> google.protobuf.Empty
- 75, // 62: api.Campus.GetListOfElevators:input_type -> google.protobuf.Empty
- 75, // 63: api.Campus.GetMoreInformation:input_type -> google.protobuf.Empty
- 48, // 64: api.Campus.GetOpeningTimes:input_type -> api.GetOpeningTimesRequest
- 51, // 65: api.Campus.GetUpdateNote:input_type -> api.GetUpdateNoteRequest
- 75, // 66: api.Campus.GetStudyRoomList:input_type -> google.protobuf.Empty
- 56, // 67: api.Campus.GetKino:input_type -> api.GetKinoRequest
- 59, // 68: api.Campus.SendFeedback:input_type -> api.SendFeedbackRequest
- 61, // 69: api.Campus.SendFeedbackImage:input_type -> api.SendFeedbackImageRequest
- 64, // 70: api.Campus.GetUploadStatus:input_type -> api.GetUploadStatusRequest
- 67, // 71: api.Campus.GetNotification:input_type -> api.NotificationsRequest
- 67, // 72: api.Campus.GetNotificationConfirm:input_type -> api.NotificationsRequest
- 62, // 73: api.Campus.GetMembers:input_type -> api.GetMembersRequest
- 69, // 74: api.Campus.GetCanteenHeadCount:input_type -> api.GetCanteenHeadCountRequest
- 5, // 75: api.Campus.IOSDeviceRequestResponse:input_type -> api.IOSDeviceRequestResponseRequest
- 1, // 76: api.Campus.RegisterDevice:input_type -> api.RegisterDeviceRequest
- 3, // 77: api.Campus.RemoveDevice:input_type -> api.RemoveDeviceRequest
- 20, // 78: api.Campus.GetTopNews:output_type -> api.GetTopNewsReply
- 18, // 79: api.Campus.GetNewsSources:output_type -> api.NewsSourceReply
- 16, // 80: api.Campus.SearchRooms:output_type -> api.SearchRoomsReply
- 14, // 81: api.Campus.GetLocations:output_type -> api.GetLocationsReply
- 12, // 82: api.Campus.GetRoomMaps:output_type -> api.GetRoomMapsReply
- 10, // 83: api.Campus.GetRoomCoordinates:output_type -> api.GetRoomCoordinatesReply
- 8, // 84: api.Campus.GetRoomSchedule:output_type -> api.GetRoomScheduleReply
- 23, // 85: api.Campus.GetCafeteriaRatings:output_type -> api.CafeteriaRatingReply
- 24, // 86: api.Campus.GetDishRatings:output_type -> api.DishRatingReply
- 75, // 87: api.Campus.NewCafeteriaRating:output_type -> google.protobuf.Empty
- 75, // 88: api.Campus.NewDishRating:output_type -> google.protobuf.Empty
- 28, // 89: api.Campus.GetAvailableDishTags:output_type -> api.GetTagsReply
- 28, // 90: api.Campus.GetNameTags:output_type -> api.GetTagsReply
- 28, // 91: api.Campus.GetAvailableCafeteriaTags:output_type -> api.GetTagsReply
- 33, // 92: api.Campus.GetCafeterias:output_type -> api.GetCafeteriaReply
- 36, // 93: api.Campus.GetDishes:output_type -> api.GetDishesReply
- 37, // 94: api.Campus.GetResponsiblePerson:output_type -> api.GetResponsiblePersonReply
- 39, // 95: api.Campus.GetBuilding2Gps:output_type -> api.GetBuilding2GpsReply
- 41, // 96: api.Campus.GetAreaFacilitiesByBuildingNr:output_type -> api.GetAreaFacilitiesByBuildingNrReply
- 43, // 97: api.Campus.GetListOfToilets:output_type -> api.GetListOfToiletsReply
- 45, // 98: api.Campus.GetListOfElevators:output_type -> api.GetListOfElevatorsReply
- 46, // 99: api.Campus.GetMoreInformation:output_type -> api.GetMoreInformationReply
- 49, // 100: api.Campus.GetOpeningTimes:output_type -> api.GetOpeningTimesReply
- 52, // 101: api.Campus.GetUpdateNote:output_type -> api.GetUpdateNoteReply
- 53, // 102: api.Campus.GetStudyRoomList:output_type -> api.GetStudyRoomListReply
- 57, // 103: api.Campus.GetKino:output_type -> api.GetKinoReply
- 60, // 104: api.Campus.SendFeedback:output_type -> api.SendFeedbackImageReply
- 60, // 105: api.Campus.SendFeedbackImage:output_type -> api.SendFeedbackImageReply
- 65, // 106: api.Campus.GetUploadStatus:output_type -> api.GetUploadStatusReply
- 66, // 107: api.Campus.GetNotification:output_type -> api.GetNotificationsReply
- 68, // 108: api.Campus.GetNotificationConfirm:output_type -> api.GetNotificationsConfirmReply
- 63, // 109: api.Campus.GetMembers:output_type -> api.GetMembersReply
- 70, // 110: api.Campus.GetCanteenHeadCount:output_type -> api.GetCanteenHeadCountReply
- 6, // 111: api.Campus.IOSDeviceRequestResponse:output_type -> api.IOSDeviceRequestResponseReply
- 2, // 112: api.Campus.RegisterDevice:output_type -> api.RegisterDeviceReply
- 4, // 113: api.Campus.RemoveDevice:output_type -> api.RemoveDeviceReply
- 78, // [78:114] is the sub-list for method output_type
- 42, // [42:78] is the sub-list for method input_type
- 42, // [42:42] is the sub-list for extension type_name
- 42, // [42:42] is the sub-list for extension extendee
- 0, // [0:42] is the sub-list for field type_name
+ 0, // 0: api.CreateDeviceRequest.device_type:type_name -> api.DeviceType
+ 0, // 1: api.DeleteDeviceRequest.device_type:type_name -> api.DeviceType
+ 10, // 2: api.SearchRoomsReply.rooms:type_name -> api.Room
+ 78, // 3: api.News.created:type_name -> google.protobuf.Timestamp
+ 78, // 4: api.News.date:type_name -> google.protobuf.Timestamp
+ 11, // 5: api.ListNewsReply.news:type_name -> api.News
+ 78, // 6: api.ListNewsRequest.oldest_date_at:type_name -> google.protobuf.Timestamp
+ 16, // 7: api.ListNewsSourcesReply.sources:type_name -> api.NewsSource
+ 19, // 8: api.ListNewsAlertsReply.alerts:type_name -> api.NewsAlert
+ 78, // 9: api.NewsAlert.created:type_name -> google.protobuf.Timestamp
+ 78, // 10: api.NewsAlert.from:type_name -> google.protobuf.Timestamp
+ 78, // 11: api.NewsAlert.to:type_name -> google.protobuf.Timestamp
+ 78, // 12: api.ListCanteenRatingsRequest.from:type_name -> google.protobuf.Timestamp
+ 78, // 13: api.ListCanteenRatingsRequest.to:type_name -> google.protobuf.Timestamp
+ 24, // 14: api.ListCanteenRatingsReply.rating:type_name -> api.SingleRatingReply
+ 38, // 15: api.ListCanteenRatingsReply.rating_tags:type_name -> api.RatingTagResult
+ 78, // 16: api.GetDishRatingsRequest.from:type_name -> google.protobuf.Timestamp
+ 78, // 17: api.GetDishRatingsRequest.to:type_name -> google.protobuf.Timestamp
+ 24, // 18: api.GetDishRatingsReply.rating:type_name -> api.SingleRatingReply
+ 38, // 19: api.GetDishRatingsReply.rating_tags:type_name -> api.RatingTagResult
+ 38, // 20: api.GetDishRatingsReply.name_tags:type_name -> api.RatingTagResult
+ 37, // 21: api.SingleRatingReply.rating_tags:type_name -> api.RatingTagNewRequest
+ 78, // 22: api.SingleRatingReply.visited:type_name -> google.protobuf.Timestamp
+ 36, // 23: api.CreateCanteenRatingRequest.rating_tags:type_name -> api.RatingTag
+ 36, // 24: api.CreateDishRatingRequest.rating_tags:type_name -> api.RatingTag
+ 35, // 25: api.ListAvailableDishTagsReply.rating_tags:type_name -> api.TagsOverview
+ 35, // 26: api.ListNameTagsReply.rating_tags:type_name -> api.TagsOverview
+ 35, // 27: api.ListAvailableCanteenTagsReply.rating_tags:type_name -> api.TagsOverview
+ 41, // 28: api.ListCanteensReply.canteen:type_name -> api.Canteen
+ 46, // 29: api.ListResponsiblePersonReply.responsible_person:type_name -> api.ResponsiblePerson
+ 77, // 30: api.ListMoreInformationReply.infos:type_name -> api.ListMoreInformationReply.MoreInformation
+ 52, // 31: api.ListOpeningTimesReply.facilities:type_name -> api.OpeningTimesMsgElement
+ 57, // 32: api.ListStudyRoomsReply.rooms:type_name -> api.StudyRoomMsgElement
+ 58, // 33: api.StudyRoomMsgElement.rooms:type_name -> api.StudyRoom
+ 78, // 34: api.ListMoviesRequest.oldest_date_at:type_name -> google.protobuf.Timestamp
+ 61, // 35: api.ListMoviesReply.movies:type_name -> api.Movie
+ 78, // 36: api.Movie.date:type_name -> google.protobuf.Timestamp
+ 78, // 37: api.Movie.created:type_name -> google.protobuf.Timestamp
+ 1, // 38: api.CreateFeedbackRequest.recipient:type_name -> api.CreateFeedbackRequest.Recipient
+ 63, // 39: api.CreateFeedbackRequest.location:type_name -> api.Coordinate
+ 78, // 40: api.GetCanteenHeadCountReply.timestamp:type_name -> google.protobuf.Timestamp
+ 17, // 41: api.Campus.ListNewsAlerts:input_type -> api.ListNewsAlertsRequest
+ 14, // 42: api.Campus.ListNewsSources:input_type -> api.ListNewsSourcesRequest
+ 13, // 43: api.Campus.ListNews:input_type -> api.ListNewsRequest
+ 8, // 44: api.Campus.SearchRooms:input_type -> api.SearchRoomsRequest
+ 20, // 45: api.Campus.ListCanteenRatings:input_type -> api.ListCanteenRatingsRequest
+ 22, // 46: api.Campus.GetDishRatings:input_type -> api.GetDishRatingsRequest
+ 26, // 47: api.Campus.CreateCanteenRating:input_type -> api.CreateCanteenRatingRequest
+ 28, // 48: api.Campus.CreateDishRating:input_type -> api.CreateDishRatingRequest
+ 29, // 49: api.Campus.ListAvailableDishTags:input_type -> api.ListAvailableDishTagsRequest
+ 31, // 50: api.Campus.ListNameTags:input_type -> api.ListNameTagsRequest
+ 33, // 51: api.Campus.ListAvailableCanteenTags:input_type -> api.ListAvailableCanteenTagsRequest
+ 39, // 52: api.Campus.ListCanteens:input_type -> api.ListCanteensRequest
+ 42, // 53: api.Campus.ListDishes:input_type -> api.ListDishesRequest
+ 44, // 54: api.Campus.ListResponsiblePerson:input_type -> api.ListResponsiblePersonRequest
+ 48, // 55: api.Campus.ListMoreInformation:input_type -> api.ListMoreInformationRequest
+ 50, // 56: api.Campus.ListOpeningTimes:input_type -> api.ListOpeningTimesRequest
+ 53, // 57: api.Campus.GetUpdateNote:input_type -> api.GetUpdateNoteRequest
+ 55, // 58: api.Campus.ListStudyRooms:input_type -> api.ListStudyRoomsRequest
+ 59, // 59: api.Campus.ListMovies:input_type -> api.ListMoviesRequest
+ 62, // 60: api.Campus.CreateFeedback:input_type -> api.CreateFeedbackRequest
+ 69, // 61: api.Campus.GetUploadStatus:input_type -> api.GetUploadStatusRequest
+ 71, // 62: api.Campus.GetNotification:input_type -> api.GetNotificationRequest
+ 73, // 63: api.Campus.GetNotificationConfirm:input_type -> api.GetNotificationConfirmRequest
+ 67, // 64: api.Campus.GetMember:input_type -> api.GetMemberRequest
+ 75, // 65: api.Campus.GetCanteenHeadCount:input_type -> api.GetCanteenHeadCountRequest
+ 6, // 66: api.Campus.IOSDeviceRequestResponse:input_type -> api.IOSDeviceRequestResponseRequest
+ 2, // 67: api.Campus.CreateDevice:input_type -> api.CreateDeviceRequest
+ 4, // 68: api.Campus.DeleteDevice:input_type -> api.DeleteDeviceRequest
+ 18, // 69: api.Campus.ListNewsAlerts:output_type -> api.ListNewsAlertsReply
+ 15, // 70: api.Campus.ListNewsSources:output_type -> api.ListNewsSourcesReply
+ 12, // 71: api.Campus.ListNews:output_type -> api.ListNewsReply
+ 9, // 72: api.Campus.SearchRooms:output_type -> api.SearchRoomsReply
+ 21, // 73: api.Campus.ListCanteenRatings:output_type -> api.ListCanteenRatingsReply
+ 23, // 74: api.Campus.GetDishRatings:output_type -> api.GetDishRatingsReply
+ 25, // 75: api.Campus.CreateCanteenRating:output_type -> api.CreateCanteenRatingReply
+ 27, // 76: api.Campus.CreateDishRating:output_type -> api.CreateDishRatingReply
+ 30, // 77: api.Campus.ListAvailableDishTags:output_type -> api.ListAvailableDishTagsReply
+ 32, // 78: api.Campus.ListNameTags:output_type -> api.ListNameTagsReply
+ 34, // 79: api.Campus.ListAvailableCanteenTags:output_type -> api.ListAvailableCanteenTagsReply
+ 40, // 80: api.Campus.ListCanteens:output_type -> api.ListCanteensReply
+ 43, // 81: api.Campus.ListDishes:output_type -> api.ListDishesReply
+ 45, // 82: api.Campus.ListResponsiblePerson:output_type -> api.ListResponsiblePersonReply
+ 49, // 83: api.Campus.ListMoreInformation:output_type -> api.ListMoreInformationReply
+ 51, // 84: api.Campus.ListOpeningTimes:output_type -> api.ListOpeningTimesReply
+ 54, // 85: api.Campus.GetUpdateNote:output_type -> api.GetUpdateNoteReply
+ 56, // 86: api.Campus.ListStudyRooms:output_type -> api.ListStudyRoomsReply
+ 60, // 87: api.Campus.ListMovies:output_type -> api.ListMoviesReply
+ 64, // 88: api.Campus.CreateFeedback:output_type -> api.CreateFeedbackReply
+ 70, // 89: api.Campus.GetUploadStatus:output_type -> api.GetUploadStatusReply
+ 72, // 90: api.Campus.GetNotification:output_type -> api.GetNotificationReply
+ 74, // 91: api.Campus.GetNotificationConfirm:output_type -> api.GetNotificationConfirmReply
+ 68, // 92: api.Campus.GetMember:output_type -> api.GetMemberReply
+ 76, // 93: api.Campus.GetCanteenHeadCount:output_type -> api.GetCanteenHeadCountReply
+ 7, // 94: api.Campus.IOSDeviceRequestResponse:output_type -> api.IOSDeviceRequestResponseReply
+ 3, // 95: api.Campus.CreateDevice:output_type -> api.CreateDeviceReply
+ 5, // 96: api.Campus.DeleteDevice:output_type -> api.DeleteDeviceReply
+ 69, // [69:97] is the sub-list for method output_type
+ 41, // [41:69] is the sub-list for method input_type
+ 41, // [41:41] is the sub-list for extension type_name
+ 41, // [41:41] is the sub-list for extension extendee
+ 0, // [0:41] is the sub-list for field type_name
}
func init() { file_tumdev_campus_backend_proto_init() }
@@ -5749,7 +5711,7 @@ func file_tumdev_campus_backend_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_tumdev_campus_backend_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RegisterDeviceRequest); i {
+ switch v := v.(*CreateDeviceRequest); i {
case 0:
return &v.state
case 1:
@@ -5761,7 +5723,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RegisterDeviceReply); i {
+ switch v := v.(*CreateDeviceReply); i {
case 0:
return &v.state
case 1:
@@ -5773,7 +5735,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RemoveDeviceRequest); i {
+ switch v := v.(*DeleteDeviceRequest); i {
case 0:
return &v.state
case 1:
@@ -5785,7 +5747,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RemoveDeviceReply); i {
+ switch v := v.(*DeleteDeviceReply); i {
case 0:
return &v.state
case 1:
@@ -5821,7 +5783,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRoomScheduleRequest); i {
+ switch v := v.(*SearchRoomsRequest); i {
case 0:
return &v.state
case 1:
@@ -5833,7 +5795,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRoomScheduleReply); i {
+ switch v := v.(*SearchRoomsReply); i {
case 0:
return &v.state
case 1:
@@ -5845,7 +5807,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRoomCoordinatesRequest); i {
+ switch v := v.(*Room); i {
case 0:
return &v.state
case 1:
@@ -5857,7 +5819,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRoomCoordinatesReply); i {
+ switch v := v.(*News); i {
case 0:
return &v.state
case 1:
@@ -5869,7 +5831,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRoomMapsRequest); i {
+ switch v := v.(*ListNewsReply); i {
case 0:
return &v.state
case 1:
@@ -5881,7 +5843,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRoomMapsReply); i {
+ switch v := v.(*ListNewsRequest); i {
case 0:
return &v.state
case 1:
@@ -5893,7 +5855,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetLocationsRequest); i {
+ switch v := v.(*ListNewsSourcesRequest); i {
case 0:
return &v.state
case 1:
@@ -5905,7 +5867,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetLocationsReply); i {
+ switch v := v.(*ListNewsSourcesReply); i {
case 0:
return &v.state
case 1:
@@ -5917,7 +5879,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SearchRoomsRequest); i {
+ switch v := v.(*NewsSource); i {
case 0:
return &v.state
case 1:
@@ -5929,7 +5891,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SearchRoomsReply); i {
+ switch v := v.(*ListNewsAlertsRequest); i {
case 0:
return &v.state
case 1:
@@ -5941,7 +5903,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Room); i {
+ switch v := v.(*ListNewsAlertsReply); i {
case 0:
return &v.state
case 1:
@@ -5953,7 +5915,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*NewsSourceReply); i {
+ switch v := v.(*NewsAlert); i {
case 0:
return &v.state
case 1:
@@ -5965,7 +5927,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*NewsSource); i {
+ switch v := v.(*ListCanteenRatingsRequest); i {
case 0:
return &v.state
case 1:
@@ -5977,7 +5939,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTopNewsReply); i {
+ switch v := v.(*ListCanteenRatingsReply); i {
case 0:
return &v.state
case 1:
@@ -5989,7 +5951,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CafeteriaRatingRequest); i {
+ switch v := v.(*GetDishRatingsRequest); i {
case 0:
return &v.state
case 1:
@@ -6001,7 +5963,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DishRatingRequest); i {
+ switch v := v.(*GetDishRatingsReply); i {
case 0:
return &v.state
case 1:
@@ -6013,7 +5975,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CafeteriaRatingReply); i {
+ switch v := v.(*SingleRatingReply); i {
case 0:
return &v.state
case 1:
@@ -6025,7 +5987,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DishRatingReply); i {
+ switch v := v.(*CreateCanteenRatingReply); i {
case 0:
return &v.state
case 1:
@@ -6037,7 +5999,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SingleRatingReply); i {
+ switch v := v.(*CreateCanteenRatingRequest); i {
case 0:
return &v.state
case 1:
@@ -6049,7 +6011,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*NewCafeteriaRatingRequest); i {
+ switch v := v.(*CreateDishRatingReply); i {
case 0:
return &v.state
case 1:
@@ -6061,7 +6023,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*NewDishRatingRequest); i {
+ switch v := v.(*CreateDishRatingRequest); i {
case 0:
return &v.state
case 1:
@@ -6073,7 +6035,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetTagsReply); i {
+ switch v := v.(*ListAvailableDishTagsRequest); i {
case 0:
return &v.state
case 1:
@@ -6085,7 +6047,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*TagsOverview); i {
+ switch v := v.(*ListAvailableDishTagsReply); i {
case 0:
return &v.state
case 1:
@@ -6097,7 +6059,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RatingTag); i {
+ switch v := v.(*ListNameTagsRequest); i {
case 0:
return &v.state
case 1:
@@ -6109,7 +6071,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RatingTagNewRequest); i {
+ switch v := v.(*ListNameTagsReply); i {
case 0:
return &v.state
case 1:
@@ -6121,7 +6083,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RatingTagResult); i {
+ switch v := v.(*ListAvailableCanteenTagsRequest); i {
case 0:
return &v.state
case 1:
@@ -6133,7 +6095,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetCafeteriaReply); i {
+ switch v := v.(*ListAvailableCanteenTagsReply); i {
case 0:
return &v.state
case 1:
@@ -6145,7 +6107,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Cafeteria); i {
+ switch v := v.(*TagsOverview); i {
case 0:
return &v.state
case 1:
@@ -6157,7 +6119,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetDishesRequest); i {
+ switch v := v.(*RatingTag); i {
case 0:
return &v.state
case 1:
@@ -6169,7 +6131,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetDishesReply); i {
+ switch v := v.(*RatingTagNewRequest); i {
case 0:
return &v.state
case 1:
@@ -6181,7 +6143,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetResponsiblePersonReply); i {
+ switch v := v.(*RatingTagResult); i {
case 0:
return &v.state
case 1:
@@ -6193,7 +6155,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ResponsiblePersonElement); i {
+ switch v := v.(*ListCanteensRequest); i {
case 0:
return &v.state
case 1:
@@ -6205,7 +6167,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetBuilding2GpsReply); i {
+ switch v := v.(*ListCanteensReply); i {
case 0:
return &v.state
case 1:
@@ -6217,7 +6179,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Building2GpsElement); i {
+ switch v := v.(*Canteen); i {
case 0:
return &v.state
case 1:
@@ -6229,7 +6191,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetAreaFacilitiesByBuildingNrReply); i {
+ switch v := v.(*ListDishesRequest); i {
case 0:
return &v.state
case 1:
@@ -6241,7 +6203,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetAreaFacilitiesByBuildingNrRequest); i {
+ switch v := v.(*ListDishesReply); i {
case 0:
return &v.state
case 1:
@@ -6253,7 +6215,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetListOfToiletsReply); i {
+ switch v := v.(*ListResponsiblePersonRequest); i {
case 0:
return &v.state
case 1:
@@ -6265,7 +6227,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*RoomInformationElement); i {
+ switch v := v.(*ListResponsiblePersonReply); i {
case 0:
return &v.state
case 1:
@@ -6277,7 +6239,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetListOfElevatorsReply); i {
+ switch v := v.(*ResponsiblePerson); i {
case 0:
return &v.state
case 1:
@@ -6289,7 +6251,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMoreInformationReply); i {
+ switch v := v.(*RoomInformationElement); i {
case 0:
return &v.state
case 1:
@@ -6301,7 +6263,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*MoreInformationElement); i {
+ switch v := v.(*ListMoreInformationRequest); i {
case 0:
return &v.state
case 1:
@@ -6313,7 +6275,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetOpeningTimesRequest); i {
+ switch v := v.(*ListMoreInformationReply); i {
case 0:
return &v.state
case 1:
@@ -6325,7 +6287,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetOpeningTimesReply); i {
+ switch v := v.(*ListOpeningTimesRequest); i {
case 0:
return &v.state
case 1:
@@ -6337,7 +6299,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*OpeningTimesMsgElement); i {
+ switch v := v.(*ListOpeningTimesReply); i {
case 0:
return &v.state
case 1:
@@ -6349,7 +6311,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUpdateNoteRequest); i {
+ switch v := v.(*OpeningTimesMsgElement); i {
case 0:
return &v.state
case 1:
@@ -6361,7 +6323,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUpdateNoteReply); i {
+ switch v := v.(*GetUpdateNoteRequest); i {
case 0:
return &v.state
case 1:
@@ -6373,7 +6335,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetStudyRoomListReply); i {
+ switch v := v.(*GetUpdateNoteReply); i {
case 0:
return &v.state
case 1:
@@ -6385,7 +6347,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*StudyRoomMsgElement); i {
+ switch v := v.(*ListStudyRoomsRequest); i {
case 0:
return &v.state
case 1:
@@ -6397,7 +6359,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*StudyRoom); i {
+ switch v := v.(*ListStudyRoomsReply); i {
case 0:
return &v.state
case 1:
@@ -6409,7 +6371,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetKinoRequest); i {
+ switch v := v.(*StudyRoomMsgElement); i {
case 0:
return &v.state
case 1:
@@ -6421,7 +6383,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetKinoReply); i {
+ switch v := v.(*StudyRoom); i {
case 0:
return &v.state
case 1:
@@ -6433,7 +6395,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*KinoMsgElement); i {
+ switch v := v.(*ListMoviesRequest); i {
case 0:
return &v.state
case 1:
@@ -6445,7 +6407,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SendFeedbackRequest); i {
+ switch v := v.(*ListMoviesReply); i {
case 0:
return &v.state
case 1:
@@ -6457,7 +6419,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SendFeedbackImageReply); i {
+ switch v := v.(*Movie); i {
case 0:
return &v.state
case 1:
@@ -6469,7 +6431,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*SendFeedbackImageRequest); i {
+ switch v := v.(*CreateFeedbackRequest); i {
case 0:
return &v.state
case 1:
@@ -6481,7 +6443,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMembersRequest); i {
+ switch v := v.(*Coordinate); i {
case 0:
return &v.state
case 1:
@@ -6493,7 +6455,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetMembersReply); i {
+ switch v := v.(*CreateFeedbackReply); i {
case 0:
return &v.state
case 1:
@@ -6505,7 +6467,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUploadStatusRequest); i {
+ switch v := v.(*CreateFeedbackImageReply); i {
case 0:
return &v.state
case 1:
@@ -6517,7 +6479,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[64].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetUploadStatusReply); i {
+ switch v := v.(*CreateFeedbackImageRequest); i {
case 0:
return &v.state
case 1:
@@ -6529,7 +6491,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[65].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetNotificationsReply); i {
+ switch v := v.(*GetMemberRequest); i {
case 0:
return &v.state
case 1:
@@ -6541,7 +6503,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[66].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*NotificationsRequest); i {
+ switch v := v.(*GetMemberReply); i {
case 0:
return &v.state
case 1:
@@ -6553,7 +6515,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[67].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetNotificationsConfirmReply); i {
+ switch v := v.(*GetUploadStatusRequest); i {
case 0:
return &v.state
case 1:
@@ -6565,7 +6527,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[68].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetCanteenHeadCountRequest); i {
+ switch v := v.(*GetUploadStatusReply); i {
case 0:
return &v.state
case 1:
@@ -6577,7 +6539,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[69].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetCanteenHeadCountReply); i {
+ switch v := v.(*GetNotificationRequest); i {
case 0:
return &v.state
case 1:
@@ -6589,7 +6551,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[70].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRoomScheduleReply_RoomScheduleEvent); i {
+ switch v := v.(*GetNotificationReply); i {
case 0:
return &v.state
case 1:
@@ -6601,7 +6563,7 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[71].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetRoomMapsReply_Map); i {
+ switch v := v.(*GetNotificationConfirmRequest); i {
case 0:
return &v.state
case 1:
@@ -6613,7 +6575,43 @@ func file_tumdev_campus_backend_proto_init() {
}
}
file_tumdev_campus_backend_proto_msgTypes[72].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetLocationsReply_Location); i {
+ switch v := v.(*GetNotificationConfirmReply); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_tumdev_campus_backend_proto_msgTypes[73].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetCanteenHeadCountRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_tumdev_campus_backend_proto_msgTypes[74].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetCanteenHeadCountReply); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_tumdev_campus_backend_proto_msgTypes[75].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListMoreInformationReply_MoreInformation); i {
case 0:
return &v.state
case 1:
@@ -6631,8 +6629,8 @@ func file_tumdev_campus_backend_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_tumdev_campus_backend_proto_rawDesc,
- NumEnums: 1,
- NumMessages: 73,
+ NumEnums: 2,
+ NumMessages: 76,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/server/api/tumdev/campus_backend.pb.gw.go b/server/api/tumdev/campus_backend.pb.gw.go
index a143fd43..25d28d4b 100644
--- a/server/api/tumdev/campus_backend.pb.gw.go
+++ b/server/api/tumdev/campus_backend.pb.gw.go
@@ -21,7 +21,6 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
- "google.golang.org/protobuf/types/known/emptypb"
)
// Suppress "imported and not used" errors
@@ -32,198 +31,98 @@ var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
-func request_Campus_GetTopNews_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := client.GetTopNews(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-
-}
-
-func local_request_Campus_GetTopNews_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := server.GetTopNews(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
-func request_Campus_GetNewsSources_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := client.GetNewsSources(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-
-}
-
-func local_request_Campus_GetNewsSources_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := server.GetNewsSources(ctx, &protoReq)
- return msg, metadata, err
-
-}
+var (
+ filter_Campus_ListNewsAlerts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
-func request_Campus_SearchRooms_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq SearchRoomsRequest
+func request_Campus_ListNewsAlerts_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListNewsAlertsRequest
var metadata runtime.ServerMetadata
- newReader, berr := utilities.IOReaderFactory(req.Body)
- if berr != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_ListNewsAlerts_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.SearchRooms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListNewsAlerts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_SearchRooms_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq SearchRoomsRequest
+func local_request_Campus_ListNewsAlerts_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListNewsAlertsRequest
var metadata runtime.ServerMetadata
- newReader, berr := utilities.IOReaderFactory(req.Body)
- if berr != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_ListNewsAlerts_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.SearchRooms(ctx, &protoReq)
+ msg, err := server.ListNewsAlerts(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetLocations_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetLocationsRequest
+func request_Campus_ListNewsSources_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListNewsSourcesRequest
var metadata runtime.ServerMetadata
- var (
- val string
- ok bool
- err error
- _ = err
- )
-
- val, ok = pathParams["location"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "location")
- }
-
- protoReq.Location, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "location", err)
- }
-
- msg, err := client.GetLocations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListNewsSources(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetLocations_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetLocationsRequest
+func local_request_Campus_ListNewsSources_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListNewsSourcesRequest
var metadata runtime.ServerMetadata
- var (
- val string
- ok bool
- err error
- _ = err
- )
-
- val, ok = pathParams["location"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "location")
- }
-
- protoReq.Location, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "location", err)
- }
-
- msg, err := server.GetLocations(ctx, &protoReq)
+ msg, err := server.ListNewsSources(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetRoomMaps_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetRoomMapsRequest
- var metadata runtime.ServerMetadata
-
- newReader, berr := utilities.IOReaderFactory(req.Body)
- if berr != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
- }
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
-
- msg, err := client.GetRoomMaps(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-
-}
+var (
+ filter_Campus_ListNews_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
-func local_request_Campus_GetRoomMaps_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetRoomMapsRequest
+func request_Campus_ListNews_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListNewsRequest
var metadata runtime.ServerMetadata
- newReader, berr := utilities.IOReaderFactory(req.Body)
- if berr != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
- }
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
-
- msg, err := server.GetRoomMaps(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
-func request_Campus_GetRoomCoordinates_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetRoomCoordinatesRequest
- var metadata runtime.ServerMetadata
-
- newReader, berr := utilities.IOReaderFactory(req.Body)
- if berr != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
- }
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_ListNews_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.GetRoomCoordinates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListNews(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetRoomCoordinates_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetRoomCoordinatesRequest
+func local_request_Campus_ListNews_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListNewsRequest
var metadata runtime.ServerMetadata
- newReader, berr := utilities.IOReaderFactory(req.Body)
- if berr != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_ListNews_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.GetRoomCoordinates(ctx, &protoReq)
+ msg, err := server.ListNews(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetRoomSchedule_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetRoomScheduleRequest
+func request_Campus_SearchRooms_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq SearchRoomsRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -234,13 +133,13 @@ func request_Campus_GetRoomSchedule_0(ctx context.Context, marshaler runtime.Mar
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.GetRoomSchedule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.SearchRooms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetRoomSchedule_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetRoomScheduleRequest
+func local_request_Campus_SearchRooms_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq SearchRoomsRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -251,13 +150,13 @@ func local_request_Campus_GetRoomSchedule_0(ctx context.Context, marshaler runti
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.GetRoomSchedule(ctx, &protoReq)
+ msg, err := server.SearchRooms(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetCafeteriaRatings_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq CafeteriaRatingRequest
+func request_Campus_ListCanteenRatings_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListCanteenRatingsRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -268,13 +167,13 @@ func request_Campus_GetCafeteriaRatings_0(ctx context.Context, marshaler runtime
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.GetCafeteriaRatings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListCanteenRatings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetCafeteriaRatings_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq CafeteriaRatingRequest
+func local_request_Campus_ListCanteenRatings_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListCanteenRatingsRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -285,13 +184,13 @@ func local_request_Campus_GetCafeteriaRatings_0(ctx context.Context, marshaler r
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.GetCafeteriaRatings(ctx, &protoReq)
+ msg, err := server.ListCanteenRatings(ctx, &protoReq)
return msg, metadata, err
}
func request_Campus_GetDishRatings_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq DishRatingRequest
+ var protoReq GetDishRatingsRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -308,7 +207,7 @@ func request_Campus_GetDishRatings_0(ctx context.Context, marshaler runtime.Mars
}
func local_request_Campus_GetDishRatings_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq DishRatingRequest
+ var protoReq GetDishRatingsRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -324,8 +223,8 @@ func local_request_Campus_GetDishRatings_0(ctx context.Context, marshaler runtim
}
-func request_Campus_NewCafeteriaRating_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq NewCafeteriaRatingRequest
+func request_Campus_CreateCanteenRating_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateCanteenRatingRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -336,13 +235,13 @@ func request_Campus_NewCafeteriaRating_0(ctx context.Context, marshaler runtime.
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.NewCafeteriaRating(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.CreateCanteenRating(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_NewCafeteriaRating_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq NewCafeteriaRatingRequest
+func local_request_Campus_CreateCanteenRating_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateCanteenRatingRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -353,13 +252,13 @@ func local_request_Campus_NewCafeteriaRating_0(ctx context.Context, marshaler ru
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.NewCafeteriaRating(ctx, &protoReq)
+ msg, err := server.CreateCanteenRating(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_NewDishRating_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq NewDishRatingRequest
+func request_Campus_CreateDishRating_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateDishRatingRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -370,13 +269,13 @@ func request_Campus_NewDishRating_0(ctx context.Context, marshaler runtime.Marsh
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.NewDishRating(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.CreateDishRating(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_NewDishRating_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq NewDishRatingRequest
+func local_request_Campus_CreateDishRating_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateDishRatingRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -387,247 +286,157 @@ func local_request_Campus_NewDishRating_0(ctx context.Context, marshaler runtime
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.NewDishRating(ctx, &protoReq)
+ msg, err := server.CreateDishRating(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetAvailableDishTags_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func request_Campus_ListAvailableDishTags_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListAvailableDishTagsRequest
var metadata runtime.ServerMetadata
- msg, err := client.GetAvailableDishTags(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListAvailableDishTags(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetAvailableDishTags_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func local_request_Campus_ListAvailableDishTags_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListAvailableDishTagsRequest
var metadata runtime.ServerMetadata
- msg, err := server.GetAvailableDishTags(ctx, &protoReq)
+ msg, err := server.ListAvailableDishTags(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetNameTags_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func request_Campus_ListNameTags_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListNameTagsRequest
var metadata runtime.ServerMetadata
- msg, err := client.GetNameTags(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListNameTags(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetNameTags_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func local_request_Campus_ListNameTags_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListNameTagsRequest
var metadata runtime.ServerMetadata
- msg, err := server.GetNameTags(ctx, &protoReq)
+ msg, err := server.ListNameTags(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetAvailableCafeteriaTags_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func request_Campus_ListAvailableCanteenTags_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListAvailableCanteenTagsRequest
var metadata runtime.ServerMetadata
- msg, err := client.GetAvailableCafeteriaTags(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListAvailableCanteenTags(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetAvailableCafeteriaTags_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func local_request_Campus_ListAvailableCanteenTags_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListAvailableCanteenTagsRequest
var metadata runtime.ServerMetadata
- msg, err := server.GetAvailableCafeteriaTags(ctx, &protoReq)
+ msg, err := server.ListAvailableCanteenTags(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetCafeterias_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func request_Campus_ListCanteens_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListCanteensRequest
var metadata runtime.ServerMetadata
- msg, err := client.GetCafeterias(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListCanteens(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetCafeterias_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func local_request_Campus_ListCanteens_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListCanteensRequest
var metadata runtime.ServerMetadata
- msg, err := server.GetCafeterias(ctx, &protoReq)
+ msg, err := server.ListCanteens(ctx, &protoReq)
return msg, metadata, err
}
var (
- filter_Campus_GetDishes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+ filter_Campus_ListDishes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
-func request_Campus_GetDishes_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetDishesRequest
+func request_Campus_ListDishes_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListDishesRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_GetDishes_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_ListDishes_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.GetDishes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListDishes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetDishes_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetDishesRequest
+func local_request_Campus_ListDishes_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListDishesRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_GetDishes_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_ListDishes_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.GetDishes(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
-func request_Campus_GetResponsiblePerson_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := client.GetResponsiblePerson(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-
-}
-
-func local_request_Campus_GetResponsiblePerson_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := server.GetResponsiblePerson(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
-func request_Campus_GetBuilding2Gps_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := client.GetBuilding2Gps(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := server.ListDishes(ctx, &protoReq)
return msg, metadata, err
}
-func local_request_Campus_GetBuilding2Gps_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func request_Campus_ListResponsiblePerson_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListResponsiblePersonRequest
var metadata runtime.ServerMetadata
- msg, err := server.GetBuilding2Gps(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
-var (
- filter_Campus_GetAreaFacilitiesByBuildingNr_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
-)
-
-func request_Campus_GetAreaFacilitiesByBuildingNr_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetAreaFacilitiesByBuildingNrRequest
- var metadata runtime.ServerMetadata
-
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_GetAreaFacilitiesByBuildingNr_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
-
- msg, err := client.GetAreaFacilitiesByBuildingNr(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListResponsiblePerson(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetAreaFacilitiesByBuildingNr_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetAreaFacilitiesByBuildingNrRequest
+func local_request_Campus_ListResponsiblePerson_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListResponsiblePersonRequest
var metadata runtime.ServerMetadata
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_GetAreaFacilitiesByBuildingNr_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
-
- msg, err := server.GetAreaFacilitiesByBuildingNr(ctx, &protoReq)
+ msg, err := server.ListResponsiblePerson(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetListOfToilets_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func request_Campus_ListMoreInformation_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListMoreInformationRequest
var metadata runtime.ServerMetadata
- msg, err := client.GetListOfToilets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListMoreInformation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetListOfToilets_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func local_request_Campus_ListMoreInformation_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListMoreInformationRequest
var metadata runtime.ServerMetadata
- msg, err := server.GetListOfToilets(ctx, &protoReq)
+ msg, err := server.ListMoreInformation(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetListOfElevators_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := client.GetListOfElevators(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-
-}
-
-func local_request_Campus_GetListOfElevators_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := server.GetListOfElevators(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
-func request_Campus_GetMoreInformation_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := client.GetMoreInformation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-
-}
-
-func local_request_Campus_GetMoreInformation_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
- var metadata runtime.ServerMetadata
-
- msg, err := server.GetMoreInformation(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
-func request_Campus_GetOpeningTimes_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetOpeningTimesRequest
+func request_Campus_ListOpeningTimes_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListOpeningTimesRequest
var metadata runtime.ServerMetadata
var (
@@ -647,13 +456,13 @@ func request_Campus_GetOpeningTimes_0(ctx context.Context, marshaler runtime.Mar
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "language", err)
}
- msg, err := client.GetOpeningTimes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListOpeningTimes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetOpeningTimes_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetOpeningTimesRequest
+func local_request_Campus_ListOpeningTimes_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListOpeningTimesRequest
var metadata runtime.ServerMetadata
var (
@@ -673,7 +482,7 @@ func local_request_Campus_GetOpeningTimes_0(ctx context.Context, marshaler runti
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "language", err)
}
- msg, err := server.GetOpeningTimes(ctx, &protoReq)
+ msg, err := server.ListOpeningTimes(ctx, &protoReq)
return msg, metadata, err
}
@@ -694,7 +503,7 @@ func request_Campus_GetUpdateNote_0(ctx context.Context, marshaler runtime.Marsh
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version")
}
- protoReq.Version, err = runtime.Int32(val)
+ protoReq.Version, err = runtime.Int64(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err)
}
@@ -720,7 +529,7 @@ func local_request_Campus_GetUpdateNote_0(ctx context.Context, marshaler runtime
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version")
}
- protoReq.Version, err = runtime.Int32(val)
+ protoReq.Version, err = runtime.Int64(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version", err)
}
@@ -730,52 +539,30 @@ func local_request_Campus_GetUpdateNote_0(ctx context.Context, marshaler runtime
}
-func request_Campus_GetStudyRoomList_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func request_Campus_ListStudyRooms_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListStudyRoomsRequest
var metadata runtime.ServerMetadata
- msg, err := client.GetStudyRoomList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.ListStudyRooms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetStudyRoomList_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq emptypb.Empty
+func local_request_Campus_ListStudyRooms_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListStudyRoomsRequest
var metadata runtime.ServerMetadata
- msg, err := server.GetStudyRoomList(ctx, &protoReq)
+ msg, err := server.ListStudyRooms(ctx, &protoReq)
return msg, metadata, err
}
-func request_Campus_GetKino_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetKinoRequest
- var metadata runtime.ServerMetadata
-
- var (
- val string
- ok bool
- err error
- _ = err
- )
-
- val, ok = pathParams["lastId"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lastId")
- }
-
- protoReq.LastId, err = runtime.Int32(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lastId", err)
- }
-
- msg, err := client.GetKino(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-
-}
+var (
+ filter_Campus_ListMovies_0 = &utilities.DoubleArray{Encoding: map[string]int{"last_id": 0, "lastId": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
+)
-func local_request_Campus_GetKino_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetKinoRequest
+func request_Campus_ListMovies_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListMoviesRequest
var metadata runtime.ServerMetadata
var (
@@ -785,59 +572,30 @@ func local_request_Campus_GetKino_0(ctx context.Context, marshaler runtime.Marsh
_ = err
)
- val, ok = pathParams["lastId"]
+ val, ok = pathParams["last_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lastId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "last_id")
}
protoReq.LastId, err = runtime.Int32(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lastId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "last_id", err)
}
- msg, err := server.GetKino(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
-var (
- filter_Campus_SendFeedback_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
-)
-
-func request_Campus_SendFeedback_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq SendFeedbackRequest
- var metadata runtime.ServerMetadata
-
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_SendFeedback_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
-
- msg, err := client.SendFeedback(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
- return msg, metadata, err
-
-}
-
-func local_request_Campus_SendFeedback_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq SendFeedbackRequest
- var metadata runtime.ServerMetadata
-
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_SendFeedback_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_ListMovies_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.SendFeedback(ctx, &protoReq)
+ msg, err := client.ListMovies(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func request_Campus_SendFeedbackImage_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq SendFeedbackImageRequest
+func local_request_Campus_ListMovies_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListMoviesRequest
var metadata runtime.ServerMetadata
var (
@@ -847,63 +605,68 @@ func request_Campus_SendFeedbackImage_0(ctx context.Context, marshaler runtime.M
_ = err
)
- val, ok = pathParams["id"]
+ val, ok = pathParams["last_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "last_id")
}
- protoReq.Id, err = runtime.Int32(val)
+ protoReq.LastId, err = runtime.Int32(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "last_id", err)
}
- val, ok = pathParams["imageNr"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "imageNr")
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
-
- protoReq.ImageNr, err = runtime.Int32(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "imageNr", err)
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_ListMovies_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.SendFeedbackImage(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := server.ListMovies(ctx, &protoReq)
return msg, metadata, err
}
-func local_request_Campus_SendFeedbackImage_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq SendFeedbackImageRequest
+func request_Campus_CreateFeedback_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var metadata runtime.ServerMetadata
-
- var (
- val string
- ok bool
- err error
- _ = err
- )
-
- val, ok = pathParams["id"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
- }
-
- protoReq.Id, err = runtime.Int32(val)
+ stream, err := client.CreateFeedback(ctx)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
+ grpclog.Infof("Failed to start streaming: %v", err)
+ return nil, metadata, err
}
-
- val, ok = pathParams["imageNr"]
- if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "imageNr")
+ dec := marshaler.NewDecoder(req.Body)
+ for {
+ var protoReq CreateFeedbackRequest
+ err = dec.Decode(&protoReq)
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ grpclog.Infof("Failed to decode request: %v", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err = stream.Send(&protoReq); err != nil {
+ if err == io.EOF {
+ break
+ }
+ grpclog.Infof("Failed to send request: %v", err)
+ return nil, metadata, err
+ }
}
- protoReq.ImageNr, err = runtime.Int32(val)
+ if err := stream.CloseSend(); err != nil {
+ grpclog.Infof("Failed to terminate client stream: %v", err)
+ return nil, metadata, err
+ }
+ header, err := stream.Header()
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "imageNr", err)
+ grpclog.Infof("Failed to get header from client: %v", err)
+ return nil, metadata, err
}
+ metadata.HeaderMD = header
- msg, err := server.SendFeedbackImage(ctx, &protoReq)
+ msg, err := stream.CloseAndRecv()
+ metadata.TrailerMD = stream.Trailer()
return msg, metadata, err
}
@@ -919,14 +682,14 @@ func request_Campus_GetUploadStatus_0(ctx context.Context, marshaler runtime.Mar
_ = err
)
- val, ok = pathParams["lrzId"]
+ val, ok = pathParams["lrz_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lrzId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lrz_id")
}
protoReq.LrzId, err = runtime.String(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lrzId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lrz_id", err)
}
msg, err := client.GetUploadStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -945,14 +708,14 @@ func local_request_Campus_GetUploadStatus_0(ctx context.Context, marshaler runti
_ = err
)
- val, ok = pathParams["lrzId"]
+ val, ok = pathParams["lrz_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lrzId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lrz_id")
}
protoReq.LrzId, err = runtime.String(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lrzId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lrz_id", err)
}
msg, err := server.GetUploadStatus(ctx, &protoReq)
@@ -961,7 +724,7 @@ func local_request_Campus_GetUploadStatus_0(ctx context.Context, marshaler runti
}
func request_Campus_GetNotification_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq NotificationsRequest
+ var protoReq GetNotificationRequest
var metadata runtime.ServerMetadata
var (
@@ -971,14 +734,14 @@ func request_Campus_GetNotification_0(ctx context.Context, marshaler runtime.Mar
_ = err
)
- val, ok = pathParams["notificationId"]
+ val, ok = pathParams["notification_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "notificationId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "notification_id")
}
protoReq.NotificationId, err = runtime.Int32(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "notificationId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "notification_id", err)
}
msg, err := client.GetNotification(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -987,7 +750,7 @@ func request_Campus_GetNotification_0(ctx context.Context, marshaler runtime.Mar
}
func local_request_Campus_GetNotification_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq NotificationsRequest
+ var protoReq GetNotificationRequest
var metadata runtime.ServerMetadata
var (
@@ -997,14 +760,14 @@ func local_request_Campus_GetNotification_0(ctx context.Context, marshaler runti
_ = err
)
- val, ok = pathParams["notificationId"]
+ val, ok = pathParams["notification_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "notificationId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "notification_id")
}
protoReq.NotificationId, err = runtime.Int32(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "notificationId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "notification_id", err)
}
msg, err := server.GetNotification(ctx, &protoReq)
@@ -1013,7 +776,7 @@ func local_request_Campus_GetNotification_0(ctx context.Context, marshaler runti
}
func request_Campus_GetNotificationConfirm_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq NotificationsRequest
+ var protoReq GetNotificationConfirmRequest
var metadata runtime.ServerMetadata
var (
@@ -1023,14 +786,14 @@ func request_Campus_GetNotificationConfirm_0(ctx context.Context, marshaler runt
_ = err
)
- val, ok = pathParams["notificationId"]
+ val, ok = pathParams["notification_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "notificationId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "notification_id")
}
protoReq.NotificationId, err = runtime.Int32(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "notificationId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "notification_id", err)
}
msg, err := client.GetNotificationConfirm(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -1039,7 +802,7 @@ func request_Campus_GetNotificationConfirm_0(ctx context.Context, marshaler runt
}
func local_request_Campus_GetNotificationConfirm_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq NotificationsRequest
+ var protoReq GetNotificationConfirmRequest
var metadata runtime.ServerMetadata
var (
@@ -1049,14 +812,14 @@ func local_request_Campus_GetNotificationConfirm_0(ctx context.Context, marshale
_ = err
)
- val, ok = pathParams["notificationId"]
+ val, ok = pathParams["notification_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "notificationId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "notification_id")
}
protoReq.NotificationId, err = runtime.Int32(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "notificationId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "notification_id", err)
}
msg, err := server.GetNotificationConfirm(ctx, &protoReq)
@@ -1064,8 +827,8 @@ func local_request_Campus_GetNotificationConfirm_0(ctx context.Context, marshale
}
-func request_Campus_GetMembers_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetMembersRequest
+func request_Campus_GetMember_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetMemberRequest
var metadata runtime.ServerMetadata
var (
@@ -1075,23 +838,23 @@ func request_Campus_GetMembers_0(ctx context.Context, marshaler runtime.Marshale
_ = err
)
- val, ok = pathParams["lrzId"]
+ val, ok = pathParams["lrz_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lrzId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lrz_id")
}
protoReq.LrzId, err = runtime.String(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lrzId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lrz_id", err)
}
- msg, err := client.GetMembers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.GetMember(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_GetMembers_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq GetMembersRequest
+func local_request_Campus_GetMember_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetMemberRequest
var metadata runtime.ServerMetadata
var (
@@ -1101,17 +864,17 @@ func local_request_Campus_GetMembers_0(ctx context.Context, marshaler runtime.Ma
_ = err
)
- val, ok = pathParams["lrzId"]
+ val, ok = pathParams["lrz_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lrzId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "lrz_id")
}
protoReq.LrzId, err = runtime.String(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lrzId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "lrz_id", err)
}
- msg, err := server.GetMembers(ctx, &protoReq)
+ msg, err := server.GetMember(ctx, &protoReq)
return msg, metadata, err
}
@@ -1127,14 +890,14 @@ func request_Campus_GetCanteenHeadCount_0(ctx context.Context, marshaler runtime
_ = err
)
- val, ok = pathParams["canteenId"]
+ val, ok = pathParams["canteen_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "canteenId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "canteen_id")
}
protoReq.CanteenId, err = runtime.String(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "canteenId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "canteen_id", err)
}
msg, err := client.GetCanteenHeadCount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -1153,14 +916,14 @@ func local_request_Campus_GetCanteenHeadCount_0(ctx context.Context, marshaler r
_ = err
)
- val, ok = pathParams["canteenId"]
+ val, ok = pathParams["canteen_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "canteenId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "canteen_id")
}
protoReq.CanteenId, err = runtime.String(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "canteenId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "canteen_id", err)
}
msg, err := server.GetCanteenHeadCount(ctx, &protoReq)
@@ -1202,8 +965,8 @@ func local_request_Campus_IOSDeviceRequestResponse_0(ctx context.Context, marsha
}
-func request_Campus_RegisterDevice_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq RegisterDeviceRequest
+func request_Campus_CreateDevice_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateDeviceRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -1214,13 +977,13 @@ func request_Campus_RegisterDevice_0(ctx context.Context, marshaler runtime.Mars
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.RegisterDevice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.CreateDevice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_RegisterDevice_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq RegisterDeviceRequest
+func local_request_Campus_CreateDevice_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateDeviceRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
@@ -1231,17 +994,17 @@ func local_request_Campus_RegisterDevice_0(ctx context.Context, marshaler runtim
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := server.RegisterDevice(ctx, &protoReq)
+ msg, err := server.CreateDevice(ctx, &protoReq)
return msg, metadata, err
}
var (
- filter_Campus_RemoveDevice_0 = &utilities.DoubleArray{Encoding: map[string]int{"deviceId": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}}
+ filter_Campus_DeleteDevice_0 = &utilities.DoubleArray{Encoding: map[string]int{"device_id": 0, "deviceId": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
)
-func request_Campus_RemoveDevice_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq RemoveDeviceRequest
+func request_Campus_DeleteDevice_0(ctx context.Context, marshaler runtime.Marshaler, client CampusClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteDeviceRequest
var metadata runtime.ServerMetadata
var (
@@ -1251,30 +1014,30 @@ func request_Campus_RemoveDevice_0(ctx context.Context, marshaler runtime.Marsha
_ = err
)
- val, ok = pathParams["deviceId"]
+ val, ok = pathParams["device_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "deviceId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_id")
}
protoReq.DeviceId, err = runtime.String(val)
if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "deviceId", err)
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_id", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_RemoveDevice_0); err != nil {
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_DeleteDevice_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
- msg, err := client.RemoveDevice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ msg, err := client.DeleteDevice(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
-func local_request_Campus_RemoveDevice_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
- var protoReq RemoveDeviceRequest
+func local_request_Campus_DeleteDevice_0(ctx context.Context, marshaler runtime.Marshaler, server CampusServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteDeviceRequest
var metadata runtime.ServerMetadata
var (
@@ -1284,210 +1047,35 @@ func local_request_Campus_RemoveDevice_0(ctx context.Context, marshaler runtime.
_ = err
)
- val, ok = pathParams["deviceId"]
+ val, ok = pathParams["device_id"]
if !ok {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "deviceId")
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "device_id")
}
protoReq.DeviceId, err = runtime.String(val)
- if err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "deviceId", err)
- }
-
- if err := req.ParseForm(); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
- if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_RemoveDevice_0); err != nil {
- return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
- }
-
- msg, err := server.RemoveDevice(ctx, &protoReq)
- return msg, metadata, err
-
-}
-
-// RegisterCampusHandlerServer registers the http handlers for service Campus to "mux".
-// UnaryRPC :call CampusServer directly.
-// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
-// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCampusHandlerFromEndpoint instead.
-func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CampusServer) error {
-
- mux.Handle("GET", pattern_Campus_GetTopNews_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetTopNews", runtime.WithHTTPPathPattern("/news/top"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_Campus_GetTopNews_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetTopNews_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("GET", pattern_Campus_GetNewsSources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetNewsSources", runtime.WithHTTPPathPattern("/news/sources"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_Campus_GetNewsSources_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetNewsSources_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetNewsSources_0{resp}, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("POST", pattern_Campus_SearchRooms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/SearchRooms", runtime.WithHTTPPathPattern("/roomfinder/room/search"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_Campus_SearchRooms_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_SearchRooms_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_SearchRooms_0{resp}, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("GET", pattern_Campus_GetLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetLocations", runtime.WithHTTPPathPattern("/locations/{location}"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_Campus_GetLocations_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetLocations_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetLocations_0{resp}, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("POST", pattern_Campus_GetRoomMaps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetRoomMaps", runtime.WithHTTPPathPattern("/roomfinder/maps"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_Campus_GetRoomMaps_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetRoomMaps_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetRoomMaps_0{resp}, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("POST", pattern_Campus_GetRoomCoordinates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetRoomCoordinates", runtime.WithHTTPPathPattern("/roomfinder/room/coordinates"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_Campus_GetRoomCoordinates_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetRoomCoordinates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("POST", pattern_Campus_GetRoomSchedule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetRoomSchedule", runtime.WithHTTPPathPattern("/roomfinder/room/scheduleById"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_Campus_GetRoomSchedule_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "device_id", err)
+ }
- forward_Campus_GetRoomSchedule_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetRoomSchedule_0{resp}, mux.GetForwardResponseOptions()...)
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Campus_DeleteDevice_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
- })
+ msg, err := server.DeleteDevice(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+// RegisterCampusHandlerServer registers the http handlers for service Campus to "mux".
+// UnaryRPC :call CampusServer directly.
+// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
+// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCampusHandlerFromEndpoint instead.
+func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CampusServer) error {
- mux.Handle("POST", pattern_Campus_GetCafeteriaRatings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListNewsAlerts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1495,12 +1083,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetCafeteriaRatings", runtime.WithHTTPPathPattern("/cafeteria/rating/get"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListNewsAlerts", runtime.WithHTTPPathPattern("/news/alerts"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetCafeteriaRatings_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListNewsAlerts_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1508,11 +1096,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetCafeteriaRatings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListNewsAlerts_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListNewsAlerts_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_GetDishRatings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListNewsSources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1520,12 +1108,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetDishRatings", runtime.WithHTTPPathPattern("/dish/rating/get"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListNewsSources", runtime.WithHTTPPathPattern("/news/sources"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetDishRatings_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListNewsSources_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1533,11 +1121,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetDishRatings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListNewsSources_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListNewsSources_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_NewCafeteriaRating_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListNews_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1545,12 +1133,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/NewCafeteriaRating", runtime.WithHTTPPathPattern("/cafeteria/rating/new"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListNews", runtime.WithHTTPPathPattern("/news"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_NewCafeteriaRating_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListNews_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1558,11 +1146,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_NewCafeteriaRating_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListNews_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListNews_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_NewDishRating_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_SearchRooms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1570,12 +1158,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/NewDishRating", runtime.WithHTTPPathPattern("/dish/rating/new"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/SearchRooms", runtime.WithHTTPPathPattern("/roomfinder/room/search"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_NewDishRating_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_SearchRooms_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1583,11 +1171,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_NewDishRating_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_SearchRooms_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_SearchRooms_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetAvailableDishTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_ListCanteenRatings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1595,12 +1183,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetAvailableDishTags", runtime.WithHTTPPathPattern("/dish/rating/allRatingTags"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListCanteenRatings", runtime.WithHTTPPathPattern("/canteen/rating/get"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetAvailableDishTags_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListCanteenRatings_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1608,11 +1196,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetAvailableDishTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetAvailableDishTags_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListCanteenRatings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetNameTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_GetDishRatings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1620,12 +1208,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetNameTags", runtime.WithHTTPPathPattern("/dish/rating/allDishTags"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetDishRatings", runtime.WithHTTPPathPattern("/dish/rating/get"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetNameTags_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_GetDishRatings_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1633,11 +1221,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetNameTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetNameTags_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_GetDishRatings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetAvailableCafeteriaTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_CreateCanteenRating_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1645,12 +1233,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetAvailableCafeteriaTags", runtime.WithHTTPPathPattern("/cafeteria/rating/allRatingTags"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/CreateCanteenRating", runtime.WithHTTPPathPattern("/canteen/rating/new"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetAvailableCafeteriaTags_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_CreateCanteenRating_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1658,11 +1246,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetAvailableCafeteriaTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetAvailableCafeteriaTags_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_CreateCanteenRating_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetCafeterias_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_CreateDishRating_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1670,12 +1258,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetCafeterias", runtime.WithHTTPPathPattern("/cafeteria/allCafeterias"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/CreateDishRating", runtime.WithHTTPPathPattern("/dish/rating/new"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetCafeterias_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_CreateDishRating_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1683,11 +1271,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetCafeterias_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetCafeterias_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_CreateDishRating_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetDishes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListAvailableDishTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1695,12 +1283,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetDishes", runtime.WithHTTPPathPattern("/dish/allDishes"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListAvailableDishTags", runtime.WithHTTPPathPattern("/dish/rating/allRatingTags"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetDishes_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListAvailableDishTags_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1708,11 +1296,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetDishes_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetDishes_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListAvailableDishTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListAvailableDishTags_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetResponsiblePerson_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListNameTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1720,12 +1308,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetResponsiblePerson", runtime.WithHTTPPathPattern("/barrierfree/contacts"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListNameTags", runtime.WithHTTPPathPattern("/dish/rating/allDishTags"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetResponsiblePerson_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListNameTags_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1733,11 +1321,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetResponsiblePerson_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListNameTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListNameTags_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetBuilding2Gps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListAvailableCanteenTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1745,12 +1333,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetBuilding2Gps", runtime.WithHTTPPathPattern("/barrierfree/building2Gps"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListAvailableCanteenTags", runtime.WithHTTPPathPattern("/canteen/rating/allRatingTags"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetBuilding2Gps_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListAvailableCanteenTags_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1758,11 +1346,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetBuilding2Gps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListAvailableCanteenTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListAvailableCanteenTags_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetAreaFacilitiesByBuildingNr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListCanteens_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1770,12 +1358,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetAreaFacilitiesByBuildingNr", runtime.WithHTTPPathPattern("/barrierfree/nearby"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListCanteens", runtime.WithHTTPPathPattern("/canteen/allCanteens"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetAreaFacilitiesByBuildingNr_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListCanteens_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1783,11 +1371,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetAreaFacilitiesByBuildingNr_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListCanteens_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListCanteens_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetListOfToilets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListDishes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1795,12 +1383,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetListOfToilets", runtime.WithHTTPPathPattern("/barrierfree/toilets"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListDishes", runtime.WithHTTPPathPattern("/dish/allDishes"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetListOfToilets_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListDishes_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1808,11 +1396,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetListOfToilets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListDishes_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListDishes_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetListOfElevators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListResponsiblePerson_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1820,12 +1408,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetListOfElevators", runtime.WithHTTPPathPattern("/barrierfree/elevators"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListResponsiblePerson", runtime.WithHTTPPathPattern("/barrierfree/contacts"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetListOfElevators_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListResponsiblePerson_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1833,11 +1421,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetListOfElevators_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListResponsiblePerson_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetMoreInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListMoreInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1845,12 +1433,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetMoreInformation", runtime.WithHTTPPathPattern("/barrierfree/moreInformation"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListMoreInformation", runtime.WithHTTPPathPattern("/barrierfree/moreInformation"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetMoreInformation_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListMoreInformation_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1858,11 +1446,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetMoreInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListMoreInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetOpeningTimes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListOpeningTimes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1870,12 +1458,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetOpeningTimes", runtime.WithHTTPPathPattern("/openingtimes/{language}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListOpeningTimes", runtime.WithHTTPPathPattern("/openingtimes/{language}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetOpeningTimes_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListOpeningTimes_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1883,7 +1471,7 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetOpeningTimes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListOpeningTimes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -1912,32 +1500,7 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
})
- mux.Handle("GET", pattern_Campus_GetStudyRoomList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetStudyRoomList", runtime.WithHTTPPathPattern("/studyrooms"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_Campus_GetStudyRoomList_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetStudyRoomList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("GET", pattern_Campus_GetKino_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListStudyRooms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1945,12 +1508,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetKino", runtime.WithHTTPPathPattern("/kino/{lastId}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListStudyRooms", runtime.WithHTTPPathPattern("/studyrooms"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetKino_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListStudyRooms_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1958,11 +1521,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetKino_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListStudyRooms_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_SendFeedback_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListMovies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -1970,12 +1533,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/SendFeedback", runtime.WithHTTPPathPattern("/feedback"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/ListMovies", runtime.WithHTTPPathPattern("/movies/{last_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_SendFeedback_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_ListMovies_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -1983,33 +1546,15 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_SendFeedback_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListMovies_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_SendFeedbackImage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- var stream runtime.ServerTransportStream
- ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/SendFeedbackImage", runtime.WithHTTPPathPattern("/feedback/{id}/{imageNr}"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := local_request_Campus_SendFeedbackImage_0(annotatedContext, inboundMarshaler, server, req, pathParams)
- md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_SendFeedbackImage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
+ mux.Handle("POST", pattern_Campus_CreateFeedback_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport")
+ _, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
})
mux.Handle("GET", pattern_Campus_GetUploadStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -2020,7 +1565,7 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetUploadStatus", runtime.WithHTTPPathPattern("/device/uploaded/{lrzId}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetUploadStatus", runtime.WithHTTPPathPattern("/device/uploaded/{lrz_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -2045,7 +1590,7 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetNotification", runtime.WithHTTPPathPattern("/notifications/{notificationId}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetNotification", runtime.WithHTTPPathPattern("/notifications/{notification_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -2070,7 +1615,7 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetNotificationConfirm", runtime.WithHTTPPathPattern("/notifications/confirm/{notificationId}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetNotificationConfirm", runtime.WithHTTPPathPattern("/notifications/confirm/{notification_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -2087,7 +1632,7 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
})
- mux.Handle("GET", pattern_Campus_GetMembers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_GetMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -2095,12 +1640,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetMembers", runtime.WithHTTPPathPattern("/members/{lrzId}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetMember", runtime.WithHTTPPathPattern("/members/{lrz_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_GetMembers_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_GetMember_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -2108,7 +1653,7 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_GetMembers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_GetMember_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2120,7 +1665,7 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetCanteenHeadCount", runtime.WithHTTPPathPattern("/canteen/headCount/{canteenId}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/GetCanteenHeadCount", runtime.WithHTTPPathPattern("/canteen/headCount/{canteen_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -2162,7 +1707,7 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
})
- mux.Handle("POST", pattern_Campus_RegisterDevice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_CreateDevice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -2170,12 +1715,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/RegisterDevice", runtime.WithHTTPPathPattern("/device"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/CreateDevice", runtime.WithHTTPPathPattern("/device"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_RegisterDevice_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_CreateDevice_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -2183,11 +1728,11 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_RegisterDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_CreateDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("DELETE", pattern_Campus_RemoveDevice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("DELETE", pattern_Campus_DeleteDevice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
@@ -2195,12 +1740,12 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/RemoveDevice", runtime.WithHTTPPathPattern("/device/{deviceId}"))
+ annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/api.Campus/DeleteDevice", runtime.WithHTTPPathPattern("/device/{device_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := local_request_Campus_RemoveDevice_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ resp, md, err := local_request_Campus_DeleteDevice_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
@@ -2208,7 +1753,7 @@ func RegisterCampusHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser
return
}
- forward_Campus_RemoveDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_DeleteDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2253,179 +1798,113 @@ func RegisterCampusHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp
// "CampusClient" to call the correct interceptors.
func RegisterCampusHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CampusClient) error {
- mux.Handle("GET", pattern_Campus_GetTopNews_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetTopNews", runtime.WithHTTPPathPattern("/news/top"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_Campus_GetTopNews_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetTopNews_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("GET", pattern_Campus_GetNewsSources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetNewsSources", runtime.WithHTTPPathPattern("/news/sources"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_Campus_GetNewsSources_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetNewsSources_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetNewsSources_0{resp}, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("POST", pattern_Campus_SearchRooms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/SearchRooms", runtime.WithHTTPPathPattern("/roomfinder/room/search"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_Campus_SearchRooms_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_SearchRooms_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_SearchRooms_0{resp}, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("GET", pattern_Campus_GetLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListNewsAlerts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetLocations", runtime.WithHTTPPathPattern("/locations/{location}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListNewsAlerts", runtime.WithHTTPPathPattern("/news/alerts"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetLocations_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListNewsAlerts_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetLocations_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetLocations_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListNewsAlerts_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListNewsAlerts_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_GetRoomMaps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListNewsSources_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetRoomMaps", runtime.WithHTTPPathPattern("/roomfinder/maps"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListNewsSources", runtime.WithHTTPPathPattern("/news/sources"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetRoomMaps_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListNewsSources_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetRoomMaps_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetRoomMaps_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListNewsSources_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListNewsSources_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_GetRoomCoordinates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListNews_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetRoomCoordinates", runtime.WithHTTPPathPattern("/roomfinder/room/coordinates"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListNews", runtime.WithHTTPPathPattern("/news"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetRoomCoordinates_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListNews_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetRoomCoordinates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListNews_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListNews_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_GetRoomSchedule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_SearchRooms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetRoomSchedule", runtime.WithHTTPPathPattern("/roomfinder/room/scheduleById"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/SearchRooms", runtime.WithHTTPPathPattern("/roomfinder/room/search"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetRoomSchedule_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_SearchRooms_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetRoomSchedule_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetRoomSchedule_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_SearchRooms_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_SearchRooms_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_GetCafeteriaRatings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_ListCanteenRatings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetCafeteriaRatings", runtime.WithHTTPPathPattern("/cafeteria/rating/get"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListCanteenRatings", runtime.WithHTTPPathPattern("/canteen/rating/get"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetCafeteriaRatings_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListCanteenRatings_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetCafeteriaRatings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListCanteenRatings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2451,311 +1930,223 @@ func RegisterCampusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
})
- mux.Handle("POST", pattern_Campus_NewCafeteriaRating_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/NewCafeteriaRating", runtime.WithHTTPPathPattern("/cafeteria/rating/new"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_Campus_NewCafeteriaRating_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_NewCafeteriaRating_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("POST", pattern_Campus_NewDishRating_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/NewDishRating", runtime.WithHTTPPathPattern("/dish/rating/new"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_Campus_NewDishRating_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_NewDishRating_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("GET", pattern_Campus_GetAvailableDishTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetAvailableDishTags", runtime.WithHTTPPathPattern("/dish/rating/allRatingTags"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_Campus_GetAvailableDishTags_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetAvailableDishTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetAvailableDishTags_0{resp}, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("GET", pattern_Campus_GetNameTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetNameTags", runtime.WithHTTPPathPattern("/dish/rating/allDishTags"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_Campus_GetNameTags_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetNameTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetNameTags_0{resp}, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("GET", pattern_Campus_GetAvailableCafeteriaTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_CreateCanteenRating_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetAvailableCafeteriaTags", runtime.WithHTTPPathPattern("/cafeteria/rating/allRatingTags"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/CreateCanteenRating", runtime.WithHTTPPathPattern("/canteen/rating/new"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetAvailableCafeteriaTags_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_CreateCanteenRating_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetAvailableCafeteriaTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetAvailableCafeteriaTags_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_CreateCanteenRating_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetCafeterias_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_CreateDishRating_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetCafeterias", runtime.WithHTTPPathPattern("/cafeteria/allCafeterias"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/CreateDishRating", runtime.WithHTTPPathPattern("/dish/rating/new"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetCafeterias_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_CreateDishRating_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetCafeterias_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetCafeterias_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_CreateDishRating_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetDishes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListAvailableDishTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetDishes", runtime.WithHTTPPathPattern("/dish/allDishes"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListAvailableDishTags", runtime.WithHTTPPathPattern("/dish/rating/allRatingTags"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetDishes_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListAvailableDishTags_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetDishes_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_GetDishes_0{resp}, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListAvailableDishTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListAvailableDishTags_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetResponsiblePerson_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListNameTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetResponsiblePerson", runtime.WithHTTPPathPattern("/barrierfree/contacts"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListNameTags", runtime.WithHTTPPathPattern("/dish/rating/allDishTags"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetResponsiblePerson_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListNameTags_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetResponsiblePerson_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListNameTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListNameTags_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetBuilding2Gps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListAvailableCanteenTags_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetBuilding2Gps", runtime.WithHTTPPathPattern("/barrierfree/building2Gps"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListAvailableCanteenTags", runtime.WithHTTPPathPattern("/canteen/rating/allRatingTags"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetBuilding2Gps_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListAvailableCanteenTags_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetBuilding2Gps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListAvailableCanteenTags_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListAvailableCanteenTags_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetAreaFacilitiesByBuildingNr_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListCanteens_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetAreaFacilitiesByBuildingNr", runtime.WithHTTPPathPattern("/barrierfree/nearby"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListCanteens", runtime.WithHTTPPathPattern("/canteen/allCanteens"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetAreaFacilitiesByBuildingNr_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListCanteens_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetAreaFacilitiesByBuildingNr_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListCanteens_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListCanteens_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetListOfToilets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListDishes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetListOfToilets", runtime.WithHTTPPathPattern("/barrierfree/toilets"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListDishes", runtime.WithHTTPPathPattern("/dish/allDishes"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetListOfToilets_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListDishes_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetListOfToilets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListDishes_0(annotatedContext, mux, outboundMarshaler, w, req, response_Campus_ListDishes_0{resp}, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetListOfElevators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListResponsiblePerson_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetListOfElevators", runtime.WithHTTPPathPattern("/barrierfree/elevators"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListResponsiblePerson", runtime.WithHTTPPathPattern("/barrierfree/contacts"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetListOfElevators_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListResponsiblePerson_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetListOfElevators_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListResponsiblePerson_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetMoreInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListMoreInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetMoreInformation", runtime.WithHTTPPathPattern("/barrierfree/moreInformation"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListMoreInformation", runtime.WithHTTPPathPattern("/barrierfree/moreInformation"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetMoreInformation_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListMoreInformation_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetMoreInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListMoreInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("GET", pattern_Campus_GetOpeningTimes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListOpeningTimes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetOpeningTimes", runtime.WithHTTPPathPattern("/openingtimes/{language}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListOpeningTimes", runtime.WithHTTPPathPattern("/openingtimes/{language}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetOpeningTimes_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListOpeningTimes_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetOpeningTimes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListOpeningTimes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2781,91 +2172,69 @@ func RegisterCampusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
})
- mux.Handle("GET", pattern_Campus_GetStudyRoomList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
- ctx, cancel := context.WithCancel(req.Context())
- defer cancel()
- inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
- var err error
- var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetStudyRoomList", runtime.WithHTTPPathPattern("/studyrooms"))
- if err != nil {
- runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
- return
- }
- resp, md, err := request_Campus_GetStudyRoomList_0(annotatedContext, inboundMarshaler, client, req, pathParams)
- annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
- if err != nil {
- runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
- return
- }
-
- forward_Campus_GetStudyRoomList_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
- })
-
- mux.Handle("GET", pattern_Campus_GetKino_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListStudyRooms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetKino", runtime.WithHTTPPathPattern("/kino/{lastId}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListStudyRooms", runtime.WithHTTPPathPattern("/studyrooms"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetKino_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListStudyRooms_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetKino_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListStudyRooms_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_SendFeedback_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_ListMovies_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/SendFeedback", runtime.WithHTTPPathPattern("/feedback"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/ListMovies", runtime.WithHTTPPathPattern("/movies/{last_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_SendFeedback_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_ListMovies_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_SendFeedback_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_ListMovies_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("POST", pattern_Campus_SendFeedbackImage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_CreateFeedback_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/SendFeedbackImage", runtime.WithHTTPPathPattern("/feedback/{id}/{imageNr}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/CreateFeedback", runtime.WithHTTPPathPattern("/feedback"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_SendFeedbackImage_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_CreateFeedback_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_SendFeedbackImage_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_CreateFeedback_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2875,7 +2244,7 @@ func RegisterCampusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetUploadStatus", runtime.WithHTTPPathPattern("/device/uploaded/{lrzId}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetUploadStatus", runtime.WithHTTPPathPattern("/device/uploaded/{lrz_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -2897,7 +2266,7 @@ func RegisterCampusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetNotification", runtime.WithHTTPPathPattern("/notifications/{notificationId}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetNotification", runtime.WithHTTPPathPattern("/notifications/{notification_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -2919,7 +2288,7 @@ func RegisterCampusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetNotificationConfirm", runtime.WithHTTPPathPattern("/notifications/confirm/{notificationId}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetNotificationConfirm", runtime.WithHTTPPathPattern("/notifications/confirm/{notification_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -2935,25 +2304,25 @@ func RegisterCampusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
})
- mux.Handle("GET", pattern_Campus_GetMembers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("GET", pattern_Campus_GetMember_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetMembers", runtime.WithHTTPPathPattern("/members/{lrzId}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetMember", runtime.WithHTTPPathPattern("/members/{lrz_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_GetMembers_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_GetMember_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_GetMembers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_GetMember_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -2963,7 +2332,7 @@ func RegisterCampusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetCanteenHeadCount", runtime.WithHTTPPathPattern("/canteen/headCount/{canteenId}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/GetCanteenHeadCount", runtime.WithHTTPPathPattern("/canteen/headCount/{canteen_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -3001,273 +2370,232 @@ func RegisterCampusHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli
})
- mux.Handle("POST", pattern_Campus_RegisterDevice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("POST", pattern_Campus_CreateDevice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/RegisterDevice", runtime.WithHTTPPathPattern("/device"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/CreateDevice", runtime.WithHTTPPathPattern("/device"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_RegisterDevice_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_CreateDevice_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_RegisterDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_CreateDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
- mux.Handle("DELETE", pattern_Campus_RemoveDevice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ mux.Handle("DELETE", pattern_Campus_DeleteDevice_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
- annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/RemoveDevice", runtime.WithHTTPPathPattern("/device/{deviceId}"))
+ annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/api.Campus/DeleteDevice", runtime.WithHTTPPathPattern("/device/{device_id}"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
- resp, md, err := request_Campus_RemoveDevice_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ resp, md, err := request_Campus_DeleteDevice_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
- forward_Campus_RemoveDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ forward_Campus_DeleteDevice_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
-type response_Campus_GetNewsSources_0 struct {
- proto.Message
-}
-
-func (m response_Campus_GetNewsSources_0) XXX_ResponseBody() interface{} {
- response := m.Message.(*NewsSourceReply)
- return response.Sources
-}
-
-type response_Campus_SearchRooms_0 struct {
+type response_Campus_ListNewsAlerts_0 struct {
proto.Message
}
-func (m response_Campus_SearchRooms_0) XXX_ResponseBody() interface{} {
- response := m.Message.(*SearchRoomsReply)
- return response.Rooms
+func (m response_Campus_ListNewsAlerts_0) XXX_ResponseBody() interface{} {
+ response := m.Message.(*ListNewsAlertsReply)
+ return response.Alerts
}
-type response_Campus_GetLocations_0 struct {
+type response_Campus_ListNewsSources_0 struct {
proto.Message
}
-func (m response_Campus_GetLocations_0) XXX_ResponseBody() interface{} {
- response := m.Message.(*GetLocationsReply)
- return response.Locations
+func (m response_Campus_ListNewsSources_0) XXX_ResponseBody() interface{} {
+ response := m.Message.(*ListNewsSourcesReply)
+ return response.Sources
}
-type response_Campus_GetRoomMaps_0 struct {
+type response_Campus_ListNews_0 struct {
proto.Message
}
-func (m response_Campus_GetRoomMaps_0) XXX_ResponseBody() interface{} {
- response := m.Message.(*GetRoomMapsReply)
- return response.Maps
+func (m response_Campus_ListNews_0) XXX_ResponseBody() interface{} {
+ response := m.Message.(*ListNewsReply)
+ return response.News
}
-type response_Campus_GetRoomSchedule_0 struct {
+type response_Campus_SearchRooms_0 struct {
proto.Message
}
-func (m response_Campus_GetRoomSchedule_0) XXX_ResponseBody() interface{} {
- response := m.Message.(*GetRoomScheduleReply)
- return response.Events
+func (m response_Campus_SearchRooms_0) XXX_ResponseBody() interface{} {
+ response := m.Message.(*SearchRoomsReply)
+ return response.Rooms
}
-type response_Campus_GetAvailableDishTags_0 struct {
+type response_Campus_ListAvailableDishTags_0 struct {
proto.Message
}
-func (m response_Campus_GetAvailableDishTags_0) XXX_ResponseBody() interface{} {
- response := m.Message.(*GetTagsReply)
+func (m response_Campus_ListAvailableDishTags_0) XXX_ResponseBody() interface{} {
+ response := m.Message.(*ListAvailableDishTagsReply)
return response.RatingTags
}
-type response_Campus_GetNameTags_0 struct {
+type response_Campus_ListNameTags_0 struct {
proto.Message
}
-func (m response_Campus_GetNameTags_0) XXX_ResponseBody() interface{} {
- response := m.Message.(*GetTagsReply)
+func (m response_Campus_ListNameTags_0) XXX_ResponseBody() interface{} {
+ response := m.Message.(*ListNameTagsReply)
return response.RatingTags
}
-type response_Campus_GetAvailableCafeteriaTags_0 struct {
+type response_Campus_ListAvailableCanteenTags_0 struct {
proto.Message
}
-func (m response_Campus_GetAvailableCafeteriaTags_0) XXX_ResponseBody() interface{} {
- response := m.Message.(*GetTagsReply)
+func (m response_Campus_ListAvailableCanteenTags_0) XXX_ResponseBody() interface{} {
+ response := m.Message.(*ListAvailableCanteenTagsReply)
return response.RatingTags
}
-type response_Campus_GetCafeterias_0 struct {
+type response_Campus_ListCanteens_0 struct {
proto.Message
}
-func (m response_Campus_GetCafeterias_0) XXX_ResponseBody() interface{} {
- response := m.Message.(*GetCafeteriaReply)
- return response.Cafeteria
+func (m response_Campus_ListCanteens_0) XXX_ResponseBody() interface{} {
+ response := m.Message.(*ListCanteensReply)
+ return response.Canteen
}
-type response_Campus_GetDishes_0 struct {
+type response_Campus_ListDishes_0 struct {
proto.Message
}
-func (m response_Campus_GetDishes_0) XXX_ResponseBody() interface{} {
- response := m.Message.(*GetDishesReply)
+func (m response_Campus_ListDishes_0) XXX_ResponseBody() interface{} {
+ response := m.Message.(*ListDishesReply)
return response.Dish
}
var (
- pattern_Campus_GetTopNews_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"news", "top"}, ""))
-
- pattern_Campus_GetNewsSources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"news", "sources"}, ""))
-
- pattern_Campus_SearchRooms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"roomfinder", "room", "search"}, ""))
-
- pattern_Campus_GetLocations_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"locations", "location"}, ""))
+ pattern_Campus_ListNewsAlerts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"news", "alerts"}, ""))
- pattern_Campus_GetRoomMaps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"roomfinder", "maps"}, ""))
+ pattern_Campus_ListNewsSources_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"news", "sources"}, ""))
- pattern_Campus_GetRoomCoordinates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"roomfinder", "room", "coordinates"}, ""))
+ pattern_Campus_ListNews_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"news"}, ""))
- pattern_Campus_GetRoomSchedule_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"roomfinder", "room", "scheduleById"}, ""))
+ pattern_Campus_SearchRooms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"roomfinder", "room", "search"}, ""))
- pattern_Campus_GetCafeteriaRatings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"cafeteria", "rating", "get"}, ""))
+ pattern_Campus_ListCanteenRatings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"canteen", "rating", "get"}, ""))
pattern_Campus_GetDishRatings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"dish", "rating", "get"}, ""))
- pattern_Campus_NewCafeteriaRating_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"cafeteria", "rating", "new"}, ""))
-
- pattern_Campus_NewDishRating_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"dish", "rating", "new"}, ""))
-
- pattern_Campus_GetAvailableDishTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"dish", "rating", "allRatingTags"}, ""))
-
- pattern_Campus_GetNameTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"dish", "rating", "allDishTags"}, ""))
+ pattern_Campus_CreateCanteenRating_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"canteen", "rating", "new"}, ""))
- pattern_Campus_GetAvailableCafeteriaTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"cafeteria", "rating", "allRatingTags"}, ""))
+ pattern_Campus_CreateDishRating_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"dish", "rating", "new"}, ""))
- pattern_Campus_GetCafeterias_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"cafeteria", "allCafeterias"}, ""))
+ pattern_Campus_ListAvailableDishTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"dish", "rating", "allRatingTags"}, ""))
- pattern_Campus_GetDishes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"dish", "allDishes"}, ""))
+ pattern_Campus_ListNameTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"dish", "rating", "allDishTags"}, ""))
- pattern_Campus_GetResponsiblePerson_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"barrierfree", "contacts"}, ""))
+ pattern_Campus_ListAvailableCanteenTags_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"canteen", "rating", "allRatingTags"}, ""))
- pattern_Campus_GetBuilding2Gps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"barrierfree", "building2Gps"}, ""))
+ pattern_Campus_ListCanteens_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"canteen", "allCanteens"}, ""))
- pattern_Campus_GetAreaFacilitiesByBuildingNr_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"barrierfree", "nearby"}, ""))
+ pattern_Campus_ListDishes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"dish", "allDishes"}, ""))
- pattern_Campus_GetListOfToilets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"barrierfree", "toilets"}, ""))
+ pattern_Campus_ListResponsiblePerson_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"barrierfree", "contacts"}, ""))
- pattern_Campus_GetListOfElevators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"barrierfree", "elevators"}, ""))
+ pattern_Campus_ListMoreInformation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"barrierfree", "moreInformation"}, ""))
- pattern_Campus_GetMoreInformation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"barrierfree", "moreInformation"}, ""))
-
- pattern_Campus_GetOpeningTimes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"openingtimes", "language"}, ""))
+ pattern_Campus_ListOpeningTimes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"openingtimes", "language"}, ""))
pattern_Campus_GetUpdateNote_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"updatenote", "version"}, ""))
- pattern_Campus_GetStudyRoomList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"studyrooms"}, ""))
-
- pattern_Campus_GetKino_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"kino", "lastId"}, ""))
+ pattern_Campus_ListStudyRooms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"studyrooms"}, ""))
- pattern_Campus_SendFeedback_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"feedback"}, ""))
+ pattern_Campus_ListMovies_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"movies", "last_id"}, ""))
- pattern_Campus_SendFeedbackImage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 1, 0, 4, 1, 5, 2}, []string{"feedback", "id", "imageNr"}, ""))
+ pattern_Campus_CreateFeedback_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"feedback"}, ""))
- pattern_Campus_GetUploadStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"device", "uploaded", "lrzId"}, ""))
+ pattern_Campus_GetUploadStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"device", "uploaded", "lrz_id"}, ""))
- pattern_Campus_GetNotification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"notifications", "notificationId"}, ""))
+ pattern_Campus_GetNotification_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"notifications", "notification_id"}, ""))
- pattern_Campus_GetNotificationConfirm_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"notifications", "confirm", "notificationId"}, ""))
+ pattern_Campus_GetNotificationConfirm_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"notifications", "confirm", "notification_id"}, ""))
- pattern_Campus_GetMembers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"members", "lrzId"}, ""))
+ pattern_Campus_GetMember_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"members", "lrz_id"}, ""))
- pattern_Campus_GetCanteenHeadCount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"canteen", "headCount", "canteenId"}, ""))
+ pattern_Campus_GetCanteenHeadCount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"canteen", "headCount", "canteen_id"}, ""))
pattern_Campus_IOSDeviceRequestResponse_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ios", "notifications", "deviceRequestResponse"}, ""))
- pattern_Campus_RegisterDevice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"device"}, ""))
+ pattern_Campus_CreateDevice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"device"}, ""))
- pattern_Campus_RemoveDevice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"device", "deviceId"}, ""))
+ pattern_Campus_DeleteDevice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"device", "device_id"}, ""))
)
var (
- forward_Campus_GetTopNews_0 = runtime.ForwardResponseMessage
-
- forward_Campus_GetNewsSources_0 = runtime.ForwardResponseMessage
-
- forward_Campus_SearchRooms_0 = runtime.ForwardResponseMessage
-
- forward_Campus_GetLocations_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListNewsAlerts_0 = runtime.ForwardResponseMessage
- forward_Campus_GetRoomMaps_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListNewsSources_0 = runtime.ForwardResponseMessage
- forward_Campus_GetRoomCoordinates_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListNews_0 = runtime.ForwardResponseMessage
- forward_Campus_GetRoomSchedule_0 = runtime.ForwardResponseMessage
+ forward_Campus_SearchRooms_0 = runtime.ForwardResponseMessage
- forward_Campus_GetCafeteriaRatings_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListCanteenRatings_0 = runtime.ForwardResponseMessage
forward_Campus_GetDishRatings_0 = runtime.ForwardResponseMessage
- forward_Campus_NewCafeteriaRating_0 = runtime.ForwardResponseMessage
-
- forward_Campus_NewDishRating_0 = runtime.ForwardResponseMessage
+ forward_Campus_CreateCanteenRating_0 = runtime.ForwardResponseMessage
- forward_Campus_GetAvailableDishTags_0 = runtime.ForwardResponseMessage
+ forward_Campus_CreateDishRating_0 = runtime.ForwardResponseMessage
- forward_Campus_GetNameTags_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListAvailableDishTags_0 = runtime.ForwardResponseMessage
- forward_Campus_GetAvailableCafeteriaTags_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListNameTags_0 = runtime.ForwardResponseMessage
- forward_Campus_GetCafeterias_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListAvailableCanteenTags_0 = runtime.ForwardResponseMessage
- forward_Campus_GetDishes_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListCanteens_0 = runtime.ForwardResponseMessage
- forward_Campus_GetResponsiblePerson_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListDishes_0 = runtime.ForwardResponseMessage
- forward_Campus_GetBuilding2Gps_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListResponsiblePerson_0 = runtime.ForwardResponseMessage
- forward_Campus_GetAreaFacilitiesByBuildingNr_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListMoreInformation_0 = runtime.ForwardResponseMessage
- forward_Campus_GetListOfToilets_0 = runtime.ForwardResponseMessage
-
- forward_Campus_GetListOfElevators_0 = runtime.ForwardResponseMessage
-
- forward_Campus_GetMoreInformation_0 = runtime.ForwardResponseMessage
-
- forward_Campus_GetOpeningTimes_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListOpeningTimes_0 = runtime.ForwardResponseMessage
forward_Campus_GetUpdateNote_0 = runtime.ForwardResponseMessage
- forward_Campus_GetStudyRoomList_0 = runtime.ForwardResponseMessage
-
- forward_Campus_GetKino_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListStudyRooms_0 = runtime.ForwardResponseMessage
- forward_Campus_SendFeedback_0 = runtime.ForwardResponseMessage
+ forward_Campus_ListMovies_0 = runtime.ForwardResponseMessage
- forward_Campus_SendFeedbackImage_0 = runtime.ForwardResponseMessage
+ forward_Campus_CreateFeedback_0 = runtime.ForwardResponseMessage
forward_Campus_GetUploadStatus_0 = runtime.ForwardResponseMessage
@@ -3275,13 +2603,13 @@ var (
forward_Campus_GetNotificationConfirm_0 = runtime.ForwardResponseMessage
- forward_Campus_GetMembers_0 = runtime.ForwardResponseMessage
+ forward_Campus_GetMember_0 = runtime.ForwardResponseMessage
forward_Campus_GetCanteenHeadCount_0 = runtime.ForwardResponseMessage
forward_Campus_IOSDeviceRequestResponse_0 = runtime.ForwardResponseMessage
- forward_Campus_RegisterDevice_0 = runtime.ForwardResponseMessage
+ forward_Campus_CreateDevice_0 = runtime.ForwardResponseMessage
- forward_Campus_RemoveDevice_0 = runtime.ForwardResponseMessage
+ forward_Campus_DeleteDevice_0 = runtime.ForwardResponseMessage
)
diff --git a/server/api/tumdev/campus_backend.proto b/server/api/tumdev/campus_backend.proto
index 59533555..94cd6985 100644
--- a/server/api/tumdev/campus_backend.proto
+++ b/server/api/tumdev/campus_backend.proto
@@ -1,267 +1,180 @@
syntax = "proto3";
-option go_package = "github.com/TUM-Dev/Campus-Backend/api";
-option java_multiple_files = true;
-option java_package = "app.tum.campus.api";
-option java_outer_classname = "CampusApiProto";
-option csharp_namespace = "CampusApiProto";
-
package api;
import "google/api/annotations.proto";
-import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
+option csharp_namespace = "CampusApiProto";
+option go_package = "github.com/TUM-Dev/Campus-Backend/api";
+option java_multiple_files = true;
+option java_outer_classname = "CampusApiProto";
+option java_package = "app.tum.campus.api";
+
service Campus {
- rpc GetTopNews (google.protobuf.Empty) returns (GetTopNewsReply) {
+ rpc ListNewsAlerts(ListNewsAlertsRequest) returns (ListNewsAlertsReply) {
option (google.api.http) = {
- get: "/news/top"
+ get: "/news/alerts"
+ response_body: "alerts"
};
}
- rpc GetNewsSources (google.protobuf.Empty) returns (NewsSourceReply) {
+ rpc ListNewsSources(ListNewsSourcesRequest) returns (ListNewsSourcesReply) {
option (google.api.http) = {
get: "/news/sources",
response_body: "sources"
};
}
- rpc SearchRooms (SearchRoomsRequest) returns (SearchRoomsReply) {
- option (google.api.http) = {
- post: "/roomfinder/room/search",
- body: "*",
- response_body: "rooms"
- };
- }
-
- // a location is a campus location/building, e.g. "Garching Forschungszentrum"
- rpc GetLocations (GetLocationsRequest) returns (GetLocationsReply) {
- option (google.api.http) = {
- get: "/locations/{location}",
- response_body: "locations"
- };
- }
-
- rpc GetRoomMaps (GetRoomMapsRequest) returns (GetRoomMapsReply) {
+ rpc ListNews(ListNewsRequest) returns (ListNewsReply) {
option (google.api.http) = {
- post: "/roomfinder/maps",
- body: "*",
- response_body: "maps"
+ get: "/news",
+ response_body: "news"
};
}
- rpc GetRoomCoordinates (GetRoomCoordinatesRequest) returns (GetRoomCoordinatesReply) {
+ rpc SearchRooms(SearchRoomsRequest) returns (SearchRoomsReply) {
option (google.api.http) = {
- post: "/roomfinder/room/coordinates",
- body: "*"
- };
- }
-
- rpc GetRoomSchedule (GetRoomScheduleRequest) returns (GetRoomScheduleReply) {
- option (google.api.http) = {
- post: "/roomfinder/room/scheduleById",
+ post: "/roomfinder/room/search",
body: "*",
- response_body: "events"
+ response_body: "rooms"
};
}
-
- // This endpoint retrieves Cafeteria Ratings from the Backend.
- rpc GetCafeteriaRatings (CafeteriaRatingRequest) returns (CafeteriaRatingReply) {
+ // This endpoint retrieves Canteen Ratings from the Backend.
+ rpc ListCanteenRatings(ListCanteenRatingsRequest) returns (ListCanteenRatingsReply) {
option (google.api.http) = {
- post: "/cafeteria/rating/get",
+ post: "/canteen/rating/get",
body: "*",
};
}
-
- rpc GetDishRatings (DishRatingRequest) returns (DishRatingReply) {
+ rpc GetDishRatings(GetDishRatingsRequest) returns (GetDishRatingsReply) {
option (google.api.http) = {
post: "/dish/rating/get",
body: "*",
};
}
-
-
- rpc NewCafeteriaRating (NewCafeteriaRatingRequest) returns (google.protobuf.Empty) {
+ rpc CreateCanteenRating(CreateCanteenRatingRequest) returns (CreateCanteenRatingReply) {
option (google.api.http) = {
- post: "/cafeteria/rating/new",
+ post: "/canteen/rating/new",
body: "*",
};
}
- rpc NewDishRating (NewDishRatingRequest) returns (google.protobuf.Empty) {
+ rpc CreateDishRating(CreateDishRatingRequest) returns (CreateDishRatingReply) {
option (google.api.http) = {
post: "/dish/rating/new",
body: "*",
};
}
- rpc GetAvailableDishTags (google.protobuf.Empty) returns (GetTagsReply) {
+ rpc ListAvailableDishTags(ListAvailableDishTagsRequest) returns (ListAvailableDishTagsReply) {
option (google.api.http) = {
get: "/dish/rating/allRatingTags",
- response_body: "ratingTags"
+ response_body: "rating_tags"
};
}
- rpc GetNameTags (google.protobuf.Empty) returns (GetTagsReply) {
+ rpc ListNameTags(ListNameTagsRequest) returns (ListNameTagsReply) {
option (google.api.http) = {
get: "/dish/rating/allDishTags",
- response_body: "ratingTags"
+ response_body: "rating_tags"
};
}
- rpc GetAvailableCafeteriaTags (google.protobuf.Empty) returns (GetTagsReply) {
+ rpc ListAvailableCanteenTags(ListAvailableCanteenTagsRequest) returns (ListAvailableCanteenTagsReply) {
option (google.api.http) = {
- get: "/cafeteria/rating/allRatingTags",
- response_body: "ratingTags"
+ get: "/canteen/rating/allRatingTags",
+ response_body: "rating_tags"
};
}
- rpc GetCafeterias (google.protobuf.Empty) returns (GetCafeteriaReply) {
+ rpc ListCanteens(ListCanteensRequest) returns (ListCanteensReply) {
option (google.api.http) = {
- get: "/cafeteria/allCafeterias",
- response_body: "cafeteria"
+ get: "/canteen/allCanteens",
+ response_body: "canteen"
};
}
- rpc GetDishes (GetDishesRequest) returns (GetDishesReply) {
+ rpc ListDishes(ListDishesRequest) returns (ListDishesReply) {
option (google.api.http) = {
get: "/dish/allDishes",
response_body: "dish"
};
}
-
- rpc GetResponsiblePerson (google.protobuf.Empty) returns (GetResponsiblePersonReply) {
- option (google.api.http) = {
- get: "/barrierfree/contacts",
- };
+ rpc ListResponsiblePerson(ListResponsiblePersonRequest) returns (ListResponsiblePersonReply) {
+ option (google.api.http) = {get: "/barrierfree/contacts"};
}
- rpc GetBuilding2Gps (google.protobuf.Empty) returns (GetBuilding2GpsReply) {
- option (google.api.http) = {
- get: "/barrierfree/building2Gps",
- };
+ rpc ListMoreInformation(ListMoreInformationRequest) returns (ListMoreInformationReply) {
+ option (google.api.http) = {get: "/barrierfree/moreInformation"};
}
- rpc GetAreaFacilitiesByBuildingNr (GetAreaFacilitiesByBuildingNrRequest) returns (GetAreaFacilitiesByBuildingNrReply) {
- option (google.api.http) = {
- get: "/barrierfree/nearby",
- };
+ rpc ListOpeningTimes(ListOpeningTimesRequest) returns (ListOpeningTimesReply) {
+ option (google.api.http) = {get: "/openingtimes/{language}"};
}
- rpc GetListOfToilets (google.protobuf.Empty) returns (GetListOfToiletsReply) {
- option (google.api.http) = {
- get: "/barrierfree/toilets",
- };
+ rpc GetUpdateNote(GetUpdateNoteRequest) returns (GetUpdateNoteReply) {
+ option (google.api.http) = {get: "/updatenote/{version}"};
}
- rpc GetListOfElevators (google.protobuf.Empty) returns (GetListOfElevatorsReply) {
- option (google.api.http) = {
- get: "/barrierfree/elevators",
- };
+ rpc ListStudyRooms(ListStudyRoomsRequest) returns (ListStudyRoomsReply) {
+ option (google.api.http) = {get: "/studyrooms"};
}
- rpc GetMoreInformation (google.protobuf.Empty) returns (GetMoreInformationReply) {
- option (google.api.http) = {
- get: "/barrierfree/moreInformation",
- };
+ rpc ListMovies(ListMoviesRequest) returns (ListMoviesReply) {
+ option (google.api.http) = {get: "/movies/{last_id}"};
}
-
- rpc GetOpeningTimes (GetOpeningTimesRequest) returns (GetOpeningTimesReply) {
- option (google.api.http) = {
- get: "/openingtimes/{language}",
- };
- }
-
-
- rpc GetUpdateNote (GetUpdateNoteRequest) returns (GetUpdateNoteReply) {
- option (google.api.http) = {
- get: "/updatenote/{version}",
- };
- }
-
-
- rpc GetStudyRoomList (google.protobuf.Empty) returns (GetStudyRoomListReply) {
- option (google.api.http) = {
- get: "/studyrooms",
- };
- }
-
-
- rpc GetKino(GetKinoRequest) returns (GetKinoReply) {
- option (google.api.http) = {
- get: "/kino/{lastId}",
- };
- }
-
- rpc SendFeedback(SendFeedbackRequest) returns (SendFeedbackImageReply) {
+ rpc CreateFeedback(stream CreateFeedbackRequest) returns (CreateFeedbackReply) {
option (google.api.http) = {
post: "/feedback",
- };
- }
-
- rpc SendFeedbackImage(SendFeedbackImageRequest) returns (SendFeedbackImageReply) {
- option (google.api.http) = {
- post: "/feedback/{id}/{imageNr}",
+ body: "attachment",
};
}
rpc GetUploadStatus(GetUploadStatusRequest) returns (GetUploadStatusReply) {
- option (google.api.http) = {
- get: "/device/uploaded/{lrzId}",
- };
+ option (google.api.http) = {get: "/device/uploaded/{lrz_id}"};
}
-
- rpc GetNotification(NotificationsRequest) returns (GetNotificationsReply) {
- option (google.api.http) = {
- get: "/notifications/{notificationId}",
- };
+ rpc GetNotification(GetNotificationRequest) returns (GetNotificationReply) {
+ option (google.api.http) = {get: "/notifications/{notification_id}"};
}
- rpc GetNotificationConfirm(NotificationsRequest) returns (GetNotificationsConfirmReply) {
- option (google.api.http) = {
- get: "/notifications/confirm/{notificationId}",
- };
+ rpc GetNotificationConfirm(GetNotificationConfirmRequest) returns (GetNotificationConfirmReply) {
+ option (google.api.http) = {get: "/notifications/confirm/{notification_id}"};
}
- rpc GetMembers(GetMembersRequest) returns (GetMembersReply) {
- option (google.api.http) = {
- get: "/members/{lrzId}",
- };
+ rpc GetMember(GetMemberRequest) returns (GetMemberReply) {
+ option (google.api.http) = {get: "/members/{lrz_id}"};
}
rpc GetCanteenHeadCount(GetCanteenHeadCountRequest) returns (GetCanteenHeadCountReply) {
- option (google.api.http) = {
- get: "/canteen/headCount/{canteenId}",
- };
+ option (google.api.http) = {get: "/canteen/headCount/{canteen_id}"};
}
// Endpoint for the iOS app to respond to background notifications requests
- rpc IOSDeviceRequestResponse(IOSDeviceRequestResponseRequest) returns (IOSDeviceRequestResponseReply) {
+ rpc IOSDeviceRequestResponse(IOSDeviceRequestResponseRequest) returns (IOSDeviceRequestResponseReply) { // TODO naming
option (google.api.http) = {
post: "/ios/notifications/deviceRequestResponse",
body: "*",
};
}
- // Register an Android, iOS or Windows device for push notifications
- rpc RegisterDevice(RegisterDeviceRequest) returns (RegisterDeviceReply) {
+ // Create an device (Android/iOS/Windows) for push notifications
+ rpc CreateDevice(CreateDeviceRequest) returns (CreateDeviceReply) {
option (google.api.http) = {
post: "/device",
body: "*",
};
}
- // Unregister it from push notifications
- rpc RemoveDevice(RemoveDeviceRequest) returns (RemoveDeviceReply) {
- option (google.api.http) = {
- delete: "/device/{deviceId}",
- };
+ // Delete a device from push notifications
+ rpc DeleteDevice(DeleteDeviceRequest) returns (DeleteDeviceReply) {
+ option (google.api.http) = {delete: "/device/{device_id}"};
}
}
@@ -271,27 +184,27 @@ enum DeviceType {
WINDOWS = 2;
}
-message RegisterDeviceRequest {
- string deviceId = 1;
- optional string publicKey = 2;
- DeviceType deviceType = 3;
+message CreateDeviceRequest {
+ string device_id = 1;
+ optional string public_key = 2;
+ DeviceType device_type = 3;
}
-message RegisterDeviceReply {
- string deviceId = 1;
+message CreateDeviceReply {
+ string device_id = 1;
}
-message RemoveDeviceRequest {
- string deviceId = 1;
- DeviceType deviceType = 2;
+message DeleteDeviceRequest {
+ string device_id = 1;
+ DeviceType device_type = 2;
}
-message RemoveDeviceReply {
- string deviceId = 1;
+message DeleteDeviceReply {
+ string device_id = 1;
}
message IOSDeviceRequestResponseRequest {
- string requestId = 1;
+ string request_id = 1;
string payload = 2;
}
@@ -299,63 +212,6 @@ message IOSDeviceRequestResponseReply {
string message = 1;
}
-message GetRoomScheduleRequest {
- int32 room = 1;
- google.protobuf.Timestamp start = 2;
- google.protobuf.Timestamp end = 3;
-}
-
-message GetRoomScheduleReply {
- message RoomScheduleEvent {
- google.protobuf.Timestamp start = 1;
- google.protobuf.Timestamp end = 2;
- string title = 3;
- int32 event_id = 4;
- string course_code = 5;
- }
- repeated RoomScheduleEvent events = 1;
-}
-
-message GetRoomCoordinatesRequest {
- string arch_id = 1;
-}
-
-message GetRoomCoordinatesReply {
- string utm_zone = 1;
- float utm_easting = 2;
- float utm_northing = 3;
-}
-
-message GetRoomMapsRequest {
- string arch_id = 1;
-}
-
-message GetRoomMapsReply {
- message Map {
- int64 map_id = 1;
- string description = 2;
- int64 scale = 3;
- int64 width = 4;
- int64 height = 5;
- };
- repeated Map maps = 1;
-}
-
-message GetLocationsRequest {
- string location = 1;
-}
-
-message GetLocationsReply {
- message Location {
- string location = 1;
- string name = 2;
- string lon = 3;
- string lat = 4;
- string radius = 5;
- }
- repeated Location locations = 1;
-}
-
message SearchRoomsRequest {
string query = 1;
}
@@ -365,7 +221,7 @@ message SearchRoomsReply {
}
message Room {
- int32 roomId = 1;
+ int64 room_id = 1;
string room_code = 2;
string building_nr = 3;
string arch_id = 4;
@@ -376,17 +232,61 @@ message Room {
string name = 9;
}
-message NewsSourceReply {
+message News {
+ int64 id = 1;
+ string title = 2;
+ string text = 3;
+ string link = 4;
+ // where a news thumbnail is stored. empty string means no image is available
+ string image_url = 5;
+ // the id of the news source
+ string source_id = 6;
+ // where the icon can be found
+ string source_icon_url = 9;
+ // human readable title of the news source
+ string source_title = 10;
+ // when the news item was created in OUR database
+ google.protobuf.Timestamp created = 7;
+ // the date of the news item
+ google.protobuf.Timestamp date = 8;
+}
+
+message ListNewsReply {
+ repeated News news = 1;
+}
+
+message ListNewsRequest {
+ // the last id of the news item received. 0 to get all news items
+ int32 last_news_id = 1;
+ // filter by news source id. 0 to get all news items
+ int32 news_source = 2;
+ // the oldest time you want to be included in the response
+ google.protobuf.Timestamp oldest_date_at = 3;
+}
+
+message ListNewsSourcesRequest {}
+
+message ListNewsSourcesReply {
repeated NewsSource sources = 1;
}
message NewsSource {
string source = 1;
string title = 2;
- string icon = 3;
+ // where the icon can be found
+ string icon_url = 3;
}
-message GetTopNewsReply {
+message ListNewsAlertsRequest {
+ // the last id of the news item received. 0 to get all news items
+ int32 last_news_alert_id = 1;
+}
+
+message ListNewsAlertsReply {
+ repeated NewsAlert alerts = 1;
+}
+
+message NewsAlert {
string image_url = 1;
string link = 2;
google.protobuf.Timestamp created = 3;
@@ -394,9 +294,9 @@ message GetTopNewsReply {
google.protobuf.Timestamp to = 5;
}
-message CafeteriaRatingRequest {
- // cafeteriaId Mandatory Name of the cafeteria (EAT-API naming scheme "MENSA_GARCHING")
- string cafeteriaId = 1;
+message ListCanteenRatingsRequest {
+ // canteenId Mandatory Name of the canteen (EAT-API naming scheme "MENSA_GARCHING")
+ string canteen_id = 1;
// Optional Parameter to define an interval for the ratings (Lower bound)
google.protobuf.Timestamp from = 2;
// Optional Parameter to define an interval for the ratings (Upper bound)
@@ -405,10 +305,18 @@ message CafeteriaRatingRequest {
// Optional Parameter defines how many ratings are queried. If all ratings should be queried, enter "-1"
int32 limit = 4;
}
+message ListCanteenRatingsReply {
+ repeated SingleRatingReply rating = 1;
+ double avg = 2;
+ double std = 3;
+ int32 min = 4;
+ int32 max = 5;
+ repeated RatingTagResult rating_tags = 6;
+}
-message DishRatingRequest {
- // Mandatory Name of the cafeteria (EAT-API naming scheme "MENSA_GARCHING")
- string cafeteriaId = 1;
+message GetDishRatingsRequest {
+ // Mandatory Name of the canteen (EAT-API naming scheme "MENSA_GARCHING")
+ string canteen_id = 1;
// Mandatory Name of the dish (EAT-API naming scheme) Must be available int the given mensa
string dish = 2;
// Optional Parameter to define an interval for the ratings (Lower bound)
@@ -419,104 +327,109 @@ message DishRatingRequest {
int32 limit = 5;
}
-message CafeteriaRatingReply {
- repeated SingleRatingReply rating = 1;
- double avg = 2;
- double std = 3;
- int32 min = 4;
- int32 max = 5;
- repeated RatingTagResult ratingTags = 6;
-}
-
-message DishRatingReply {
+message GetDishRatingsReply {
repeated SingleRatingReply rating = 1;
double avg = 2;
double std = 3;
int32 min = 4;
int32 max = 5;
- repeated RatingTagResult ratingTags = 6;
- repeated RatingTagResult nameTags = 7;
+ repeated RatingTagResult rating_tags = 6;
+ repeated RatingTagResult name_tags = 7;
}
-message SingleRatingReply{
+message SingleRatingReply {
// number in the range 1-5
int32 points = 1;
// Optional JPEG image in Base64
bytes image = 2;
// Optional comment (max 256 chars)
string comment = 3;
- repeated RatingTagNewRequest ratingTags = 4;
+ repeated RatingTagNewRequest rating_tags = 4;
google.protobuf.Timestamp visited = 5;
}
-message NewCafeteriaRatingRequest{
+message CreateCanteenRatingReply {}
+
+message CreateCanteenRatingRequest {
// number in the range 1-5
int32 points = 1;
- string cafeteriaId = 2;
+ string canteen_id = 2;
bytes image = 3;
- // Optional list of tag ratings add as many tags with a rating (1-5) of the list of cafeteriaRatingTags
- repeated RatingTag ratingTags = 4;
+ // Optional list of tag ratings add as many tags with a rating (1-5) of the list of canteenRatingTags
+ repeated RatingTag rating_tags = 4;
// Optional comment (max 256 chars)
string comment = 6;
}
-message NewDishRatingRequest{
+message CreateDishRatingReply {}
+message CreateDishRatingRequest {
// number in the range 1-5
int32 points = 1;
// Mandatory Name of the dish (EAT-API naming scheme "MENSA_GARCHING") Must be available int the given mensa
- string cafeteriaId = 2;
+ string canteen_id = 2;
// Mandatory Name of the dish (EAT-API naming scheme) Must be available int the given mensa
string dish = 3;
// Optional JPEG image in Base64
bytes image = 4;
// Optional list of tag ratings add as many tags with a rating (1-5) of the list of dishRatingTags
- repeated RatingTag ratingTags = 5;
+ repeated RatingTag rating_tags = 5;
// Optional comment (max 256 chars)
string comment = 7;
}
-message GetTagsReply{
- repeated TagsOverview ratingTags = 1;
+message ListAvailableDishTagsRequest {}
+message ListAvailableDishTagsReply {
+ repeated TagsOverview rating_tags = 1;
+}
+
+message ListNameTagsRequest {}
+message ListNameTagsReply {
+ repeated TagsOverview rating_tags = 1;
+}
+
+message ListAvailableCanteenTagsRequest {}
+message ListAvailableCanteenTagsReply {
+ repeated TagsOverview rating_tags = 1;
}
message TagsOverview {
- int32 tagId = 1;
+ int32 tag_id = 1;
string de = 2;
string en = 3;
}
message RatingTag {
- int32 tagId = 1;
+ int64 tag_id = 1;
double points = 2;
}
message RatingTagNewRequest {
- int32 tagId = 1;
+ int32 tag_id = 1;
int32 points = 2;
}
message RatingTagResult {
- int32 tagId = 1;
+ int32 tag_id = 1;
double avg = 2;
double std = 3;
int32 min = 4;
int32 max = 5;
}
-message GetCafeteriaReply{
- repeated Cafeteria cafeteria = 1;
+message ListCanteensRequest {}
+message ListCanteensReply {
+ repeated Canteen canteen = 1;
}
-message Cafeteria{
+message Canteen {
string id = 1;
string address = 2;
double longitude = 3;
double latitude = 4;
}
-
-message GetDishesRequest{
- string cafeteriaId = 1;
+message ListDishesRequest {
+ string canteen_id = 1;
// >=2022 until the current year
int32 year = 2;
// range 1 - 53
@@ -525,50 +438,25 @@ message GetDishesRequest{
int32 day = 4;
}
-message GetDishesReply{
+message ListDishesReply {
repeated string dish = 1;
}
-message GetResponsiblePersonReply {
- repeated ResponsiblePersonElement responsiblePerson = 1;
+message ListResponsiblePersonRequest {}
+message ListResponsiblePersonReply {
+ repeated ResponsiblePerson responsible_person = 1;
}
-message ResponsiblePersonElement{
+message ResponsiblePerson {
string name = 1;
string telephone = 2;
string email = 3;
string faculty = 4;
- string tumID = 5;
-
-}
-
-message GetBuilding2GpsReply {
- repeated Building2GpsElement building2Gps = 1;
-}
-
-message Building2GpsElement{
- string id = 1;
- string latitude = 2;
- string longitude = 3;
-
-}
-
-message GetAreaFacilitiesByBuildingNrReply {
- repeated RoomInformationElement areaFacilitiesByBuildingNr = 1;
+ string tum_id = 5;
}
-
-
-message GetAreaFacilitiesByBuildingNrRequest {
- string building_nr = 1;
-}
-
-message GetListOfToiletsReply {
- repeated RoomInformationElement listOfToilets = 1;
-}
-
-message RoomInformationElement{
- int32 roomId = 1;
+message RoomInformationElement {
+ int32 room_id = 1;
string room_code = 2;
string building_nr = 3;
string arch_id = 4;
@@ -579,141 +467,158 @@ message RoomInformationElement{
string name = 9;
}
-message GetListOfElevatorsReply {
- repeated RoomInformationElement listOfElevators = 1;
-}
-
-
-
-message GetMoreInformationReply {
- repeated MoreInformationElement information = 1;
-}
-
-message MoreInformationElement{
- string title = 1;
- string category = 2;
- string url = 3;
+message ListMoreInformationRequest {}
+message ListMoreInformationReply {
+ message MoreInformation {
+ string title = 1;
+ string category = 2;
+ string url = 3;
+ }
+ repeated MoreInformation infos = 1;
}
-
-message GetOpeningTimesRequest{
+message ListOpeningTimesRequest {
string language = 1;
}
-
-
-message GetOpeningTimesReply{
+message ListOpeningTimesReply {
repeated OpeningTimesMsgElement facilities = 1;
-
}
-message OpeningTimesMsgElement{
+message OpeningTimesMsgElement {
int32 id = 1;
string category = 2;
- string name = 3;
+ string name = 3;
string address = 4;
- string room = 5;
+ string room = 5;
string transport_station = 6;
string opening_hours = 7;
string infos = 8;
- string url = 9;
+ string url = 9;
string language = 10;
int32 reference_id = 11;
}
-message GetUpdateNoteRequest{
- int32 version = 1;
+message GetUpdateNoteRequest {
+ int64 version = 1;
}
-message GetUpdateNoteReply{
+message GetUpdateNoteReply {
string message = 1;
string version_name = 2;
}
-message GetStudyRoomListReply{
+message ListStudyRoomsRequest {}
+message ListStudyRoomsReply {
repeated StudyRoomMsgElement rooms = 1;
-
}
-message StudyRoomMsgElement{
+message StudyRoomMsgElement {
int32 id = 1;
- string name = 2;
- string details = 3;
+ string name = 2;
+ string details = 3;
repeated StudyRoom rooms = 4;
}
-message StudyRoom{
+message StudyRoom {
int32 group_id = 1;
- int32 roomId = 2;
+ int32 room_id = 2;
string room_code = 3;
string room_name = 4;
string building_name = 5;
}
-message GetKinoRequest{
- int32 lastId = 1;
+message ListMoviesRequest {
+ // the last Id you have requested. Use -1 to get all movies
+ int32 last_id = 1;
+ // the oldest time you want to be included in the response
+ google.protobuf.Timestamp oldest_date_at = 2;
}
-message GetKinoReply{
- repeated KinoMsgElement kinos = 1;
+message ListMoviesReply {
+ repeated Movie movies = 1;
}
-message KinoMsgElement{
- string name = 1;
- string path = 2;
- int32 kino = 3;
+message Movie {
+ reserved /*string cover_name = */ 1;
+ reserved /*string cover_path =*/ 2;
+ int64 movie_id = 3;
google.protobuf.Timestamp date = 4;
google.protobuf.Timestamp created = 5;
string title = 6;
- string year = 7;
+ // release year of the movie
+ string release_year = 7;
string runtime = 8;
string genre = 9;
string director = 10;
string actors = 11;
- string rating = 12;
+ // imdb rating
+ string imdb_rating = 12;
string description = 13;
- int32 cover = 14;
- string trailer = 15;
+ int64 cover_id = 14;
+ reserved /*string trailer*/ 15;
+ // Where to find additional information about this movie
string link = 16;
-}
-
-message SendFeedbackRequest{
- string topic = 1;
- string email = 2;
- string emailId = 3;
- string message = 4;
- int32 image_count = 5;
- double latitude = 6;
- double longitude = 7;
- string osVersion = 8;
- string appVersion = 9;
-}
-
-message SendFeedbackImageReply{
+ // Where to find a cover image for this movie
+ string cover_url = 17;
+}
+
+message CreateFeedbackRequest {
+ enum Recipient {
+ // Feedback for the TUM Dev Team
+ TUM_DEV = 0;
+ // Feedback for the general TUM Contact Form
+ TUM_CONTACT = 1;
+ }
+
+ // who is the feedback for
+ Recipient recipient = 1;
+ // the email address of the user
+ string from_email = 2;
+ // The actual message
+ string message = 3;
+ // Optional location which the user can choose (data protection) to attach or not
+ Coordinate location = 4;
+ // Optional os information which the user can choose (data protection) to attach or not
+ string os_version = 5;
+ // Optional app information which the user can choose (data protection) to attach or not
+ string app_version = 6;
+ // Optional file in Base64.
+ // Accepted file formats: jpeg, jpg, png, webp, md, txt, pdf
+ // Maximum file size 4MB as by Protobuf maximum per request message size
+ bytes attachment = 7;
+}
+message Coordinate {
+ double latitude = 1;
+ double longitude = 2;
+}
+
+message CreateFeedbackReply {}
+
+message CreateFeedbackImageReply {
string status = 1;
}
-message SendFeedbackImageRequest{
+message CreateFeedbackImageRequest {
int32 id = 1;
- int32 imageNr = 2;
+ int32 image_nr = 2;
//todo where does the file come from?
}
-
-message GetMembersRequest{
- string lrzId = 1;
+message GetMemberRequest {
+ string lrz_id = 1;
}
-message GetMembersReply{
- string lrzId = 1;
+message GetMemberReply {
+ string lrz_id = 1;
string name = 2;
- int32 memberId = 3;
+ int32 member_id = 3;
}
-message GetUploadStatusRequest{
- string lrzId = 1;
+message GetUploadStatusRequest {
+ string lrz_id = 1;
}
-message GetUploadStatusReply{
+message GetUploadStatusReply {
string fcm_token = 1;
string public_key = 2;
bool student_id = 3;
@@ -721,33 +626,34 @@ message GetUploadStatusReply{
bool external_id = 5;
}
-message GetNotificationsReply{
- int32 notificationId=1;
- int32 type=2;
- string title=3;
- string description=4;
- string signature=5;
+message GetNotificationRequest {
+ int32 notification_id = 1;
}
-
-
-message NotificationsRequest{
- int32 notificationId=1;
+message GetNotificationReply {
+ int32 notification_id = 1;
+ int32 type = 2;
+ string title = 3;
+ string description = 4;
+ string signature = 5;
}
-message GetNotificationsConfirmReply{
- string status=1;
+message GetNotificationConfirmRequest {
+ int32 notification_id = 1;
+}
+message GetNotificationConfirmReply {
+ string status = 1;
}
message GetCanteenHeadCountRequest {
// The requested canteen ID
- string canteenId = 1;
+ string canteen_id = 1;
}
message GetCanteenHeadCountReply {
// The absolut count of humans in the canteen. Only valid in case percent != -1.
uint32 count = 1;
// The maximum nunmber of humans in the canteen for the percent to be 100.00. Only valid in case percent != -1.
- uint32 maxCount = 2;
+ uint32 max_count = 2;
// Current capacity utilization of the canteen clamped to 0 and 100 or -1 in case no data is available.
float percent = 3;
// A time stamp indicating how up to date the response is. Only valid in case percent != -1.
diff --git a/server/api/tumdev/campus_backend.swagger.json b/server/api/tumdev/campus_backend.swagger.json
index 1600e2b6..188fc4c5 100644
--- a/server/api/tumdev/campus_backend.swagger.json
+++ b/server/api/tumdev/campus_backend.swagger.json
@@ -17,36 +17,14 @@
"application/json"
],
"paths": {
- "/barrierfree/building2Gps": {
- "get": {
- "operationId": "Campus_GetBuilding2Gps",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/apiGetBuilding2GpsReply"
- }
- },
- "default": {
- "description": "An unexpected error response.",
- "schema": {
- "$ref": "#/definitions/rpcStatus"
- }
- }
- },
- "tags": [
- "Campus"
- ]
- }
- },
"/barrierfree/contacts": {
"get": {
- "operationId": "Campus_GetResponsiblePerson",
+ "operationId": "Campus_ListResponsiblePerson",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiGetResponsiblePersonReply"
+ "$ref": "#/definitions/apiListResponsiblePersonReply"
}
},
"default": {
@@ -61,14 +39,14 @@
]
}
},
- "/barrierfree/elevators": {
+ "/barrierfree/moreInformation": {
"get": {
- "operationId": "Campus_GetListOfElevators",
+ "operationId": "Campus_ListMoreInformation",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiGetListOfElevatorsReply"
+ "$ref": "#/definitions/apiListMoreInformationReply"
}
},
"default": {
@@ -83,14 +61,18 @@
]
}
},
- "/barrierfree/moreInformation": {
+ "/canteen/allCanteens": {
"get": {
- "operationId": "Campus_GetMoreInformation",
+ "operationId": "Campus_ListCanteens",
"responses": {
"200": {
- "description": "A successful response.",
+ "description": "",
"schema": {
- "$ref": "#/definitions/apiGetMoreInformationReply"
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/definitions/apiCanteen"
+ }
}
},
"default": {
@@ -105,14 +87,14 @@
]
}
},
- "/barrierfree/nearby": {
+ "/canteen/headCount/{canteenId}": {
"get": {
- "operationId": "Campus_GetAreaFacilitiesByBuildingNr",
+ "operationId": "Campus_GetCanteenHeadCount",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiGetAreaFacilitiesByBuildingNrReply"
+ "$ref": "#/definitions/apiGetCanteenHeadCountReply"
}
},
"default": {
@@ -124,9 +106,10 @@
},
"parameters": [
{
- "name": "buildingNr",
- "in": "query",
- "required": false,
+ "name": "canteenId",
+ "description": "The requested canteen ID",
+ "in": "path",
+ "required": true,
"type": "string"
}
],
@@ -135,57 +118,9 @@
]
}
},
- "/barrierfree/toilets": {
- "get": {
- "operationId": "Campus_GetListOfToilets",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/apiGetListOfToiletsReply"
- }
- },
- "default": {
- "description": "An unexpected error response.",
- "schema": {
- "$ref": "#/definitions/rpcStatus"
- }
- }
- },
- "tags": [
- "Campus"
- ]
- }
- },
- "/cafeteria/allCafeterias": {
- "get": {
- "operationId": "Campus_GetCafeterias",
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/apiCafeteria"
- }
- }
- },
- "default": {
- "description": "An unexpected error response.",
- "schema": {
- "$ref": "#/definitions/rpcStatus"
- }
- }
- },
- "tags": [
- "Campus"
- ]
- }
- },
- "/cafeteria/rating/allRatingTags": {
+ "/canteen/rating/allRatingTags": {
"get": {
- "operationId": "Campus_GetAvailableCafeteriaTags",
+ "operationId": "Campus_ListAvailableCanteenTags",
"responses": {
"200": {
"description": "",
@@ -209,15 +144,15 @@
]
}
},
- "/cafeteria/rating/get": {
+ "/canteen/rating/get": {
"post": {
- "summary": "This endpoint retrieves Cafeteria Ratings from the Backend.",
- "operationId": "Campus_GetCafeteriaRatings",
+ "summary": "This endpoint retrieves Canteen Ratings from the Backend.",
+ "operationId": "Campus_ListCanteenRatings",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiCafeteriaRatingReply"
+ "$ref": "#/definitions/apiListCanteenRatingsReply"
}
},
"default": {
@@ -233,7 +168,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/apiCafeteriaRatingRequest"
+ "$ref": "#/definitions/apiListCanteenRatingsRequest"
}
}
],
@@ -242,15 +177,14 @@
]
}
},
- "/cafeteria/rating/new": {
+ "/canteen/rating/new": {
"post": {
- "operationId": "Campus_NewCafeteriaRating",
+ "operationId": "Campus_CreateCanteenRating",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "type": "object",
- "properties": {}
+ "$ref": "#/definitions/apiCreateCanteenRatingReply"
}
},
"default": {
@@ -266,40 +200,9 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/apiNewCafeteriaRatingRequest"
- }
- }
- ],
- "tags": [
- "Campus"
- ]
- }
- },
- "/canteen/headCount/{canteenId}": {
- "get": {
- "operationId": "Campus_GetCanteenHeadCount",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/apiGetCanteenHeadCountReply"
- }
- },
- "default": {
- "description": "An unexpected error response.",
- "schema": {
- "$ref": "#/definitions/rpcStatus"
+ "$ref": "#/definitions/apiCreateCanteenRatingRequest"
}
}
- },
- "parameters": [
- {
- "name": "canteenId",
- "description": "The requested canteen ID",
- "in": "path",
- "required": true,
- "type": "string"
- }
],
"tags": [
"Campus"
@@ -308,13 +211,13 @@
},
"/device": {
"post": {
- "summary": "Register an Android, iOS or Windows device for push notifications",
- "operationId": "Campus_RegisterDevice",
+ "summary": "Create an device (Android/iOS/Windows) for push notifications",
+ "operationId": "Campus_CreateDevice",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiRegisterDeviceReply"
+ "$ref": "#/definitions/apiCreateDeviceReply"
}
},
"default": {
@@ -330,7 +233,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/apiRegisterDeviceRequest"
+ "$ref": "#/definitions/apiCreateDeviceRequest"
}
}
],
@@ -371,13 +274,13 @@
},
"/device/{deviceId}": {
"delete": {
- "summary": "Unregister it from push notifications",
- "operationId": "Campus_RemoveDevice",
+ "summary": "Delete a device from push notifications",
+ "operationId": "Campus_DeleteDevice",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiRemoveDeviceReply"
+ "$ref": "#/definitions/apiDeleteDeviceReply"
}
},
"default": {
@@ -414,7 +317,7 @@
},
"/dish/allDishes": {
"get": {
- "operationId": "Campus_GetDishes",
+ "operationId": "Campus_ListDishes",
"responses": {
"200": {
"description": "",
@@ -434,7 +337,7 @@
},
"parameters": [
{
- "name": "cafeteriaId",
+ "name": "canteenId",
"in": "query",
"required": false,
"type": "string"
@@ -471,7 +374,7 @@
},
"/dish/rating/allDishTags": {
"get": {
- "operationId": "Campus_GetNameTags",
+ "operationId": "Campus_ListNameTags",
"responses": {
"200": {
"description": "",
@@ -497,7 +400,7 @@
},
"/dish/rating/allRatingTags": {
"get": {
- "operationId": "Campus_GetAvailableDishTags",
+ "operationId": "Campus_ListAvailableDishTags",
"responses": {
"200": {
"description": "",
@@ -528,7 +431,7 @@
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiDishRatingReply"
+ "$ref": "#/definitions/apiGetDishRatingsReply"
}
},
"default": {
@@ -544,7 +447,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/apiDishRatingRequest"
+ "$ref": "#/definitions/apiGetDishRatingsRequest"
}
}
],
@@ -555,13 +458,12 @@
},
"/dish/rating/new": {
"post": {
- "operationId": "Campus_NewDishRating",
+ "operationId": "Campus_CreateDishRating",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "type": "object",
- "properties": {}
+ "$ref": "#/definitions/apiCreateDishRatingReply"
}
},
"default": {
@@ -577,7 +479,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/apiNewDishRatingRequest"
+ "$ref": "#/definitions/apiCreateDishRatingRequest"
}
}
],
@@ -588,12 +490,12 @@
},
"/feedback": {
"post": {
- "operationId": "Campus_SendFeedback",
+ "operationId": "Campus_CreateFeedback",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiSendFeedbackImageReply"
+ "$ref": "#/definitions/apiCreateFeedbackReply"
}
},
"default": {
@@ -605,45 +507,50 @@
},
"parameters": [
{
- "name": "topic",
- "in": "query",
- "required": false,
- "type": "string"
+ "name": "attachment",
+ "description": "Optional file in Base64.\nAccepted file formats: jpeg, jpg, png, webp, md, txt, pdf\nMaximum file size 4MB as by Protobuf maximum per request message size (streaming inputs)",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "byte"
+ }
},
{
- "name": "email",
+ "name": "recipient",
+ "description": "who is the feedback for\n\n - TUM_DEV: Feedback for the TUM Dev Team\n - TUM_CONTACT: Feedback for the general TUM Contact Form",
"in": "query",
"required": false,
- "type": "string"
+ "type": "string",
+ "enum": [
+ "TUM_DEV",
+ "TUM_CONTACT"
+ ],
+ "default": "TUM_DEV"
},
{
- "name": "emailId",
+ "name": "fromEmail",
+ "description": "the email address of the user",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "message",
+ "description": "The actual message",
"in": "query",
"required": false,
"type": "string"
},
{
- "name": "imageCount",
- "in": "query",
- "required": false,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "latitude",
+ "name": "location.latitude",
"in": "query",
"required": false,
"type": "number",
"format": "double"
},
{
- "name": "longitude",
+ "name": "location.longitude",
"in": "query",
"required": false,
"type": "number",
@@ -651,12 +558,14 @@
},
{
"name": "osVersion",
+ "description": "Optional os information which the user can choose (data protection) to attach or not",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "appVersion",
+ "description": "Optional app information which the user can choose (data protection) to attach or not",
"in": "query",
"required": false,
"type": "string"
@@ -667,14 +576,16 @@
]
}
},
- "/feedback/{id}/{imageNr}": {
+ "/ios/notifications/deviceRequestResponse": {
"post": {
- "operationId": "Campus_SendFeedbackImage",
+ "summary": "Endpoint for the iOS app to respond to background notifications requests",
+ "description": "TODO naming",
+ "operationId": "Campus_IOSDeviceRequestResponse",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiSendFeedbackImageReply"
+ "$ref": "#/definitions/apiIOSDeviceRequestResponseReply"
}
},
"default": {
@@ -686,19 +597,12 @@
},
"parameters": [
{
- "name": "id",
- "in": "path",
- "required": true,
- "type": "integer",
- "format": "int32"
- },
- {
- "name": "imageNr",
- "description": "todo where does the file come from?",
- "in": "path",
+ "name": "body",
+ "in": "body",
"required": true,
- "type": "integer",
- "format": "int32"
+ "schema": {
+ "$ref": "#/definitions/apiIOSDeviceRequestResponseRequest"
+ }
}
],
"tags": [
@@ -706,15 +610,14 @@
]
}
},
- "/ios/notifications/deviceRequestResponse": {
- "post": {
- "summary": "Endpoint for the iOS app to respond to background notifications requests",
- "operationId": "Campus_IOSDeviceRequestResponse",
+ "/members/{lrzId}": {
+ "get": {
+ "operationId": "Campus_GetMember",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiIOSDeviceRequestResponseReply"
+ "$ref": "#/definitions/apiGetMemberReply"
}
},
"default": {
@@ -726,12 +629,10 @@
},
"parameters": [
{
- "name": "body",
- "in": "body",
+ "name": "lrzId",
+ "in": "path",
"required": true,
- "schema": {
- "$ref": "#/definitions/apiIOSDeviceRequestResponseRequest"
- }
+ "type": "string"
}
],
"tags": [
@@ -739,14 +640,14 @@
]
}
},
- "/kino/{lastId}": {
+ "/movies/{lastId}": {
"get": {
- "operationId": "Campus_GetKino",
+ "operationId": "Campus_ListMovies",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiGetKinoReply"
+ "$ref": "#/definitions/apiListMoviesReply"
}
},
"default": {
@@ -759,10 +660,19 @@
"parameters": [
{
"name": "lastId",
+ "description": "the last Id you have requested. Use -1 to get all movies",
"in": "path",
"required": true,
"type": "integer",
"format": "int32"
+ },
+ {
+ "name": "oldestDateAt",
+ "description": "the oldest time you want to be included in the response",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
}
],
"tags": [
@@ -770,10 +680,9 @@
]
}
},
- "/locations/{location}": {
+ "/news": {
"get": {
- "summary": "a location is a campus location/building, e.g. \"Garching Forschungszentrum\"",
- "operationId": "Campus_GetLocations",
+ "operationId": "Campus_ListNews",
"responses": {
"200": {
"description": "",
@@ -781,7 +690,7 @@
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/apiGetLocationsReplyLocation"
+ "$ref": "#/definitions/apiNews"
}
}
},
@@ -794,10 +703,28 @@
},
"parameters": [
{
- "name": "location",
- "in": "path",
- "required": true,
- "type": "string"
+ "name": "lastNewsId",
+ "description": "the last id of the news item received. 0 to get all news items",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "newsSource",
+ "description": "filter by news source id. 0 to get all news items",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
+ },
+ {
+ "name": "oldestDateAt",
+ "description": "the oldest time you want to be included in the response",
+ "in": "query",
+ "required": false,
+ "type": "string",
+ "format": "date-time"
}
],
"tags": [
@@ -805,14 +732,18 @@
]
}
},
- "/members/{lrzId}": {
+ "/news/alerts": {
"get": {
- "operationId": "Campus_GetMembers",
+ "operationId": "Campus_ListNewsAlerts",
"responses": {
"200": {
- "description": "A successful response.",
+ "description": "",
"schema": {
- "$ref": "#/definitions/apiGetMembersReply"
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/definitions/apiNewsAlert"
+ }
}
},
"default": {
@@ -824,10 +755,12 @@
},
"parameters": [
{
- "name": "lrzId",
- "in": "path",
- "required": true,
- "type": "string"
+ "name": "lastNewsAlertId",
+ "description": "the last id of the news item received. 0 to get all news items",
+ "in": "query",
+ "required": false,
+ "type": "integer",
+ "format": "int32"
}
],
"tags": [
@@ -837,7 +770,7 @@
},
"/news/sources": {
"get": {
- "operationId": "Campus_GetNewsSources",
+ "operationId": "Campus_ListNewsSources",
"responses": {
"200": {
"description": "",
@@ -861,28 +794,6 @@
]
}
},
- "/news/top": {
- "get": {
- "operationId": "Campus_GetTopNews",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/apiGetTopNewsReply"
- }
- },
- "default": {
- "description": "An unexpected error response.",
- "schema": {
- "$ref": "#/definitions/rpcStatus"
- }
- }
- },
- "tags": [
- "Campus"
- ]
- }
- },
"/notifications/confirm/{notificationId}": {
"get": {
"operationId": "Campus_GetNotificationConfirm",
@@ -890,7 +801,7 @@
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiGetNotificationsConfirmReply"
+ "$ref": "#/definitions/apiGetNotificationConfirmReply"
}
},
"default": {
@@ -921,7 +832,7 @@
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiGetNotificationsReply"
+ "$ref": "#/definitions/apiGetNotificationReply"
}
},
"default": {
@@ -947,12 +858,12 @@
},
"/openingtimes/{language}": {
"get": {
- "operationId": "Campus_GetOpeningTimes",
+ "operationId": "Campus_ListOpeningTimes",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiGetOpeningTimesReply"
+ "$ref": "#/definitions/apiListOpeningTimesReply"
}
},
"default": {
@@ -975,9 +886,9 @@
]
}
},
- "/roomfinder/maps": {
+ "/roomfinder/room/search": {
"post": {
- "operationId": "Campus_GetRoomMaps",
+ "operationId": "Campus_SearchRooms",
"responses": {
"200": {
"description": "",
@@ -985,7 +896,7 @@
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/GetRoomMapsReplyMap"
+ "$ref": "#/definitions/apiRoom"
}
}
},
@@ -1002,7 +913,7 @@
"in": "body",
"required": true,
"schema": {
- "$ref": "#/definitions/apiGetRoomMapsRequest"
+ "$ref": "#/definitions/apiSearchRoomsRequest"
}
}
],
@@ -1011,14 +922,14 @@
]
}
},
- "/roomfinder/room/coordinates": {
- "post": {
- "operationId": "Campus_GetRoomCoordinates",
+ "/studyrooms": {
+ "get": {
+ "operationId": "Campus_ListStudyRooms",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
- "$ref": "#/definitions/apiGetRoomCoordinatesReply"
+ "$ref": "#/definitions/apiListStudyRoomsReply"
}
},
"default": {
@@ -1028,33 +939,19 @@
}
}
},
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/apiGetRoomCoordinatesRequest"
- }
- }
- ],
"tags": [
"Campus"
]
}
},
- "/roomfinder/room/scheduleById": {
- "post": {
- "operationId": "Campus_GetRoomSchedule",
+ "/updatenote/{version}": {
+ "get": {
+ "operationId": "Campus_GetUpdateNote",
"responses": {
"200": {
- "description": "",
+ "description": "A successful response.",
"schema": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/GetRoomScheduleReplyRoomScheduleEvent"
- }
+ "$ref": "#/definitions/apiGetUpdateNoteReply"
}
},
"default": {
@@ -1066,101 +963,11 @@
},
"parameters": [
{
- "name": "body",
- "in": "body",
+ "name": "version",
+ "in": "path",
"required": true,
- "schema": {
- "$ref": "#/definitions/apiGetRoomScheduleRequest"
- }
- }
- ],
- "tags": [
- "Campus"
- ]
- }
- },
- "/roomfinder/room/search": {
- "post": {
- "operationId": "Campus_SearchRooms",
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/apiRoom"
- }
- }
- },
- "default": {
- "description": "An unexpected error response.",
- "schema": {
- "$ref": "#/definitions/rpcStatus"
- }
- }
- },
- "parameters": [
- {
- "name": "body",
- "in": "body",
- "required": true,
- "schema": {
- "$ref": "#/definitions/apiSearchRoomsRequest"
- }
- }
- ],
- "tags": [
- "Campus"
- ]
- }
- },
- "/studyrooms": {
- "get": {
- "operationId": "Campus_GetStudyRoomList",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/apiGetStudyRoomListReply"
- }
- },
- "default": {
- "description": "An unexpected error response.",
- "schema": {
- "$ref": "#/definitions/rpcStatus"
- }
- }
- },
- "tags": [
- "Campus"
- ]
- }
- },
- "/updatenote/{version}": {
- "get": {
- "operationId": "Campus_GetUpdateNote",
- "responses": {
- "200": {
- "description": "A successful response.",
- "schema": {
- "$ref": "#/definitions/apiGetUpdateNoteReply"
- }
- },
- "default": {
- "description": "An unexpected error response.",
- "schema": {
- "$ref": "#/definitions/rpcStatus"
- }
- }
- },
- "parameters": [
- {
- "name": "version",
- "in": "path",
- "required": true,
- "type": "integer",
- "format": "int32"
+ "type": "string",
+ "format": "int64"
}
],
"tags": [
@@ -1170,68 +977,30 @@
}
},
"definitions": {
- "GetRoomMapsReplyMap": {
- "type": "object",
- "properties": {
- "mapId": {
- "type": "string",
- "format": "int64"
- },
- "description": {
- "type": "string"
- },
- "scale": {
- "type": "string",
- "format": "int64"
- },
- "width": {
- "type": "string",
- "format": "int64"
- },
- "height": {
- "type": "string",
- "format": "int64"
- }
- }
+ "CreateFeedbackRequestRecipient": {
+ "type": "string",
+ "enum": [
+ "TUM_DEV",
+ "TUM_CONTACT"
+ ],
+ "default": "TUM_DEV",
+ "title": "- TUM_DEV: Feedback for the TUM Dev Team\n - TUM_CONTACT: Feedback for the general TUM Contact Form"
},
- "GetRoomScheduleReplyRoomScheduleEvent": {
+ "ListMoreInformationReplyMoreInformation": {
"type": "object",
"properties": {
- "start": {
- "type": "string",
- "format": "date-time"
- },
- "end": {
- "type": "string",
- "format": "date-time"
- },
"title": {
"type": "string"
},
- "eventId": {
- "type": "integer",
- "format": "int32"
- },
- "courseCode": {
- "type": "string"
- }
- }
- },
- "apiBuilding2GpsElement": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "latitude": {
+ "category": {
"type": "string"
},
- "longitude": {
+ "url": {
"type": "string"
}
}
},
- "apiCafeteria": {
+ "apiCanteen": {
"type": "object",
"properties": {
"id": {
@@ -1250,62 +1019,119 @@
}
}
},
- "apiCafeteriaRatingReply": {
+ "apiCoordinate": {
"type": "object",
"properties": {
- "rating": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/apiSingleRatingReply"
- }
- },
- "avg": {
+ "latitude": {
"type": "number",
"format": "double"
},
- "std": {
+ "longitude": {
"type": "number",
"format": "double"
- },
- "min": {
+ }
+ }
+ },
+ "apiCreateCanteenRatingReply": {
+ "type": "object"
+ },
+ "apiCreateCanteenRatingRequest": {
+ "type": "object",
+ "properties": {
+ "points": {
"type": "integer",
- "format": "int32"
+ "format": "int32",
+ "title": "number in the range 1-5"
},
- "max": {
- "type": "integer",
- "format": "int32"
+ "canteenId": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string",
+ "format": "byte"
},
"ratingTags": {
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/apiRatingTagResult"
- }
+ "$ref": "#/definitions/apiRatingTag"
+ },
+ "title": "Optional list of tag ratings add as many tags with a rating (1-5) of the list of canteenRatingTags"
+ },
+ "comment": {
+ "type": "string",
+ "title": "Optional comment (max 256 chars)"
}
}
},
- "apiCafeteriaRatingRequest": {
+ "apiCreateDeviceReply": {
"type": "object",
"properties": {
- "cafeteriaId": {
+ "deviceId": {
+ "type": "string"
+ }
+ }
+ },
+ "apiCreateDeviceRequest": {
+ "type": "object",
+ "properties": {
+ "deviceId": {
+ "type": "string"
+ },
+ "publicKey": {
+ "type": "string"
+ },
+ "deviceType": {
+ "$ref": "#/definitions/apiDeviceType"
+ }
+ }
+ },
+ "apiCreateDishRatingReply": {
+ "type": "object"
+ },
+ "apiCreateDishRatingRequest": {
+ "type": "object",
+ "properties": {
+ "points": {
+ "type": "integer",
+ "format": "int32",
+ "title": "number in the range 1-5"
+ },
+ "canteenId": {
"type": "string",
- "title": "cafeteriaId Mandatory Name of the cafeteria (EAT-API naming scheme \"MENSA_GARCHING\")"
+ "title": "Mandatory Name of the dish (EAT-API naming scheme \"MENSA_GARCHING\") Must be available int the given mensa"
},
- "from": {
+ "dish": {
"type": "string",
- "format": "date-time",
- "title": "Optional Parameter to define an interval for the ratings (Lower bound)"
+ "title": "Mandatory Name of the dish (EAT-API naming scheme) Must be available int the given mensa"
},
- "to": {
+ "image": {
"type": "string",
- "format": "date-time",
- "title": "Optional Parameter to define an interval for the ratings (Upper bound)"
+ "format": "byte",
+ "title": "Optional JPEG image in Base64"
},
- "limit": {
- "type": "integer",
- "format": "int32",
- "title": "Optional Parameter defines how many ratings are queried. If all ratings should be queried, enter \"-1\""
+ "ratingTags": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/definitions/apiRatingTag"
+ },
+ "title": "Optional list of tag ratings add as many tags with a rating (1-5) of the list of dishRatingTags"
+ },
+ "comment": {
+ "type": "string",
+ "title": "Optional comment (max 256 chars)"
+ }
+ }
+ },
+ "apiCreateFeedbackReply": {
+ "type": "object"
+ },
+ "apiDeleteDeviceReply": {
+ "type": "object",
+ "properties": {
+ "deviceId": {
+ "type": "string"
}
}
},
@@ -1318,7 +1144,32 @@
],
"default": "IOS"
},
- "apiDishRatingReply": {
+ "apiGetCanteenHeadCountReply": {
+ "type": "object",
+ "properties": {
+ "count": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The absolut count of humans in the canteen. Only valid in case percent != -1."
+ },
+ "maxCount": {
+ "type": "integer",
+ "format": "int64",
+ "description": "The maximum nunmber of humans in the canteen for the percent to be 100.00. Only valid in case percent != -1."
+ },
+ "percent": {
+ "type": "number",
+ "format": "float",
+ "description": "Current capacity utilization of the canteen clamped to 0 and 100 or -1 in case no data is available."
+ },
+ "timestamp": {
+ "type": "string",
+ "format": "date-time",
+ "description": "A time stamp indicating how up to date the response is. Only valid in case percent != -1."
+ }
+ }
+ },
+ "apiGetDishRatingsReply": {
"type": "object",
"properties": {
"rating": {
@@ -1360,12 +1211,12 @@
}
}
},
- "apiDishRatingRequest": {
+ "apiGetDishRatingsRequest": {
"type": "object",
"properties": {
- "cafeteriaId": {
+ "canteenId": {
"type": "string",
- "title": "Mandatory Name of the cafeteria (EAT-API naming scheme \"MENSA_GARCHING\")"
+ "title": "Mandatory Name of the canteen (EAT-API naming scheme \"MENSA_GARCHING\")"
},
"dish": {
"type": "string",
@@ -1388,409 +1239,321 @@
}
}
},
- "apiGetAreaFacilitiesByBuildingNrReply": {
+ "apiGetMemberReply": {
"type": "object",
"properties": {
- "areaFacilitiesByBuildingNr": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/apiRoomInformationElement"
- }
+ "lrzId": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "memberId": {
+ "type": "integer",
+ "format": "int32"
}
}
},
- "apiGetBuilding2GpsReply": {
+ "apiGetNotificationConfirmReply": {
"type": "object",
"properties": {
- "building2Gps": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/apiBuilding2GpsElement"
- }
+ "status": {
+ "type": "string"
}
}
},
- "apiGetCafeteriaReply": {
+ "apiGetNotificationReply": {
"type": "object",
"properties": {
- "cafeteria": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/apiCafeteria"
- }
+ "notificationId": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "type": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "title": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "signature": {
+ "type": "string"
}
}
},
- "apiGetCanteenHeadCountReply": {
+ "apiGetUpdateNoteReply": {
"type": "object",
"properties": {
- "count": {
- "type": "integer",
- "format": "int64",
- "description": "The absolut count of humans in the canteen. Only valid in case percent != -1."
+ "message": {
+ "type": "string"
},
- "maxCount": {
- "type": "integer",
- "format": "int64",
- "description": "The maximum nunmber of humans in the canteen for the percent to be 100.00. Only valid in case percent != -1."
+ "versionName": {
+ "type": "string"
+ }
+ }
+ },
+ "apiGetUploadStatusReply": {
+ "type": "object",
+ "properties": {
+ "fcmToken": {
+ "type": "string"
},
- "percent": {
- "type": "number",
- "format": "float",
- "description": "Current capacity utilization of the canteen clamped to 0 and 100 or -1 in case no data is available."
+ "publicKey": {
+ "type": "string"
},
- "timestamp": {
- "type": "string",
- "format": "date-time",
- "description": "A time stamp indicating how up to date the response is. Only valid in case percent != -1."
+ "studentId": {
+ "type": "boolean"
+ },
+ "employeeId": {
+ "type": "boolean"
+ },
+ "externalId": {
+ "type": "boolean"
}
}
},
- "apiGetDishesReply": {
+ "apiIOSDeviceRequestResponseReply": {
"type": "object",
"properties": {
- "dish": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "message": {
+ "type": "string"
}
}
},
- "apiGetKinoReply": {
+ "apiIOSDeviceRequestResponseRequest": {
"type": "object",
"properties": {
- "kinos": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/apiKinoMsgElement"
- }
+ "requestId": {
+ "type": "string"
+ },
+ "payload": {
+ "type": "string"
}
}
},
- "apiGetListOfElevatorsReply": {
+ "apiListAvailableCanteenTagsReply": {
"type": "object",
"properties": {
- "listOfElevators": {
+ "ratingTags": {
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/apiRoomInformationElement"
+ "$ref": "#/definitions/apiTagsOverview"
}
}
}
},
- "apiGetListOfToiletsReply": {
+ "apiListAvailableDishTagsReply": {
"type": "object",
"properties": {
- "listOfToilets": {
+ "ratingTags": {
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/apiRoomInformationElement"
+ "$ref": "#/definitions/apiTagsOverview"
}
}
}
},
- "apiGetLocationsReply": {
+ "apiListCanteenRatingsReply": {
"type": "object",
"properties": {
- "locations": {
+ "rating": {
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/apiGetLocationsReplyLocation"
+ "$ref": "#/definitions/apiSingleRatingReply"
}
- }
- }
- },
- "apiGetLocationsReplyLocation": {
- "type": "object",
- "properties": {
- "location": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "lon": {
- "type": "string"
},
- "lat": {
- "type": "string"
+ "avg": {
+ "type": "number",
+ "format": "double"
},
- "radius": {
- "type": "string"
- }
- }
- },
- "apiGetMembersReply": {
- "type": "object",
- "properties": {
- "lrzId": {
- "type": "string"
+ "std": {
+ "type": "number",
+ "format": "double"
},
- "name": {
- "type": "string"
+ "min": {
+ "type": "integer",
+ "format": "int32"
},
- "memberId": {
+ "max": {
"type": "integer",
"format": "int32"
- }
- }
- },
- "apiGetMoreInformationReply": {
- "type": "object",
- "properties": {
- "information": {
+ },
+ "ratingTags": {
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/apiMoreInformationElement"
+ "$ref": "#/definitions/apiRatingTagResult"
}
}
}
},
- "apiGetNotificationsConfirmReply": {
+ "apiListCanteenRatingsRequest": {
"type": "object",
"properties": {
- "status": {
- "type": "string"
- }
- }
- },
- "apiGetNotificationsReply": {
- "type": "object",
- "properties": {
- "notificationId": {
- "type": "integer",
- "format": "int32"
- },
- "type": {
- "type": "integer",
- "format": "int32"
+ "canteenId": {
+ "type": "string",
+ "title": "canteenId Mandatory Name of the canteen (EAT-API naming scheme \"MENSA_GARCHING\")"
},
- "title": {
- "type": "string"
+ "from": {
+ "type": "string",
+ "format": "date-time",
+ "title": "Optional Parameter to define an interval for the ratings (Lower bound)"
},
- "description": {
- "type": "string"
+ "to": {
+ "type": "string",
+ "format": "date-time",
+ "title": "Optional Parameter to define an interval for the ratings (Upper bound)"
},
- "signature": {
- "type": "string"
+ "limit": {
+ "type": "integer",
+ "format": "int32",
+ "title": "Optional Parameter defines how many ratings are queried. If all ratings should be queried, enter \"-1\""
}
}
},
- "apiGetOpeningTimesReply": {
+ "apiListCanteensReply": {
"type": "object",
"properties": {
- "facilities": {
+ "canteen": {
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/apiOpeningTimesMsgElement"
+ "$ref": "#/definitions/apiCanteen"
}
}
}
},
- "apiGetResponsiblePersonReply": {
+ "apiListDishesReply": {
"type": "object",
"properties": {
- "responsiblePerson": {
+ "dish": {
"type": "array",
"items": {
- "type": "object",
- "$ref": "#/definitions/apiResponsiblePersonElement"
+ "type": "string"
}
}
}
},
- "apiGetRoomCoordinatesReply": {
+ "apiListMoreInformationReply": {
"type": "object",
"properties": {
- "utmZone": {
- "type": "string"
- },
- "utmEasting": {
- "type": "number",
- "format": "float"
- },
- "utmNorthing": {
- "type": "number",
- "format": "float"
- }
- }
- },
- "apiGetRoomCoordinatesRequest": {
- "type": "object",
- "properties": {
- "archId": {
- "type": "string"
- }
- }
- },
- "apiGetRoomMapsReply": {
- "type": "object",
- "properties": {
- "maps": {
+ "infos": {
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/GetRoomMapsReplyMap"
+ "$ref": "#/definitions/ListMoreInformationReplyMoreInformation"
}
}
}
},
- "apiGetRoomMapsRequest": {
+ "apiListMoviesReply": {
"type": "object",
"properties": {
- "archId": {
- "type": "string"
- }
- }
- },
- "apiGetRoomScheduleReply": {
- "type": "object",
- "properties": {
- "events": {
+ "movies": {
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/GetRoomScheduleReplyRoomScheduleEvent"
+ "$ref": "#/definitions/apiMovie"
}
}
}
},
- "apiGetRoomScheduleRequest": {
+ "apiListNameTagsReply": {
"type": "object",
"properties": {
- "room": {
- "type": "integer",
- "format": "int32"
- },
- "start": {
- "type": "string",
- "format": "date-time"
- },
- "end": {
- "type": "string",
- "format": "date-time"
- }
- }
- },
- "apiGetStudyRoomListReply": {
- "type": "object",
- "properties": {
- "rooms": {
+ "ratingTags": {
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/apiStudyRoomMsgElement"
+ "$ref": "#/definitions/apiTagsOverview"
}
}
}
},
- "apiGetTagsReply": {
+ "apiListNewsAlertsReply": {
"type": "object",
"properties": {
- "ratingTags": {
+ "alerts": {
"type": "array",
"items": {
"type": "object",
- "$ref": "#/definitions/apiTagsOverview"
+ "$ref": "#/definitions/apiNewsAlert"
}
}
}
},
- "apiGetTopNewsReply": {
+ "apiListNewsReply": {
"type": "object",
"properties": {
- "imageUrl": {
- "type": "string"
- },
- "link": {
- "type": "string"
- },
- "created": {
- "type": "string",
- "format": "date-time"
- },
- "from": {
- "type": "string",
- "format": "date-time"
- },
- "to": {
- "type": "string",
- "format": "date-time"
+ "news": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/definitions/apiNews"
+ }
}
}
},
- "apiGetUpdateNoteReply": {
+ "apiListNewsSourcesReply": {
"type": "object",
"properties": {
- "message": {
- "type": "string"
- },
- "versionName": {
- "type": "string"
+ "sources": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/definitions/apiNewsSource"
+ }
}
}
},
- "apiGetUploadStatusReply": {
+ "apiListOpeningTimesReply": {
"type": "object",
"properties": {
- "fcmToken": {
- "type": "string"
- },
- "publicKey": {
- "type": "string"
- },
- "studentId": {
- "type": "boolean"
- },
- "employeeId": {
- "type": "boolean"
- },
- "externalId": {
- "type": "boolean"
+ "facilities": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/definitions/apiOpeningTimesMsgElement"
+ }
}
}
},
- "apiIOSDeviceRequestResponseReply": {
+ "apiListResponsiblePersonReply": {
"type": "object",
"properties": {
- "message": {
- "type": "string"
+ "responsiblePerson": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/definitions/apiResponsiblePerson"
+ }
}
}
},
- "apiIOSDeviceRequestResponseRequest": {
+ "apiListStudyRoomsReply": {
"type": "object",
"properties": {
- "requestId": {
- "type": "string"
- },
- "payload": {
- "type": "string"
+ "rooms": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/definitions/apiStudyRoomMsgElement"
+ }
}
}
},
- "apiKinoMsgElement": {
+ "apiMovie": {
"type": "object",
"properties": {
- "name": {
- "type": "string"
- },
- "path": {
- "type": "string"
- },
- "kino": {
- "type": "integer",
- "format": "int32"
+ "movieId": {
+ "type": "string",
+ "format": "int64"
},
"date": {
"type": "string",
@@ -1803,8 +1566,9 @@
"title": {
"type": "string"
},
- "year": {
- "type": "string"
+ "releaseYear": {
+ "type": "string",
+ "title": "release year of the movie"
},
"runtime": {
"type": "string"
@@ -1818,99 +1582,91 @@
"actors": {
"type": "string"
},
- "rating": {
- "type": "string"
+ "imdbRating": {
+ "type": "string",
+ "title": "imdb rating"
},
"description": {
"type": "string"
},
- "cover": {
- "type": "integer",
- "format": "int32"
- },
- "trailer": {
- "type": "string"
+ "coverId": {
+ "type": "string",
+ "format": "int64"
},
"link": {
- "type": "string"
+ "type": "string",
+ "title": "Where to find additional information about this movie"
+ },
+ "coverUrl": {
+ "type": "string",
+ "title": "Where to find a cover image for this movie"
}
}
},
- "apiMoreInformationElement": {
+ "apiNews": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string",
+ "format": "int64"
+ },
"title": {
"type": "string"
},
- "category": {
+ "text": {
"type": "string"
},
- "url": {
+ "link": {
"type": "string"
- }
- }
- },
- "apiNewCafeteriaRatingRequest": {
- "type": "object",
- "properties": {
- "points": {
- "type": "integer",
- "format": "int32",
- "title": "number in the range 1-5"
},
- "cafeteriaId": {
- "type": "string"
+ "imageUrl": {
+ "type": "string",
+ "title": "where a news thumbnail is stored. empty string means no image is available"
},
- "image": {
+ "sourceId": {
"type": "string",
- "format": "byte"
+ "title": "the id of the news source"
},
- "ratingTags": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/apiRatingTag"
- },
- "title": "Optional list of tag ratings add as many tags with a rating (1-5) of the list of cafeteriaRatingTags"
+ "sourceIconUrl": {
+ "type": "string",
+ "title": "where the icon can be found"
},
- "comment": {
+ "sourceTitle": {
"type": "string",
- "title": "Optional comment (max 256 chars)"
+ "title": "human readable title of the news source"
+ },
+ "created": {
+ "type": "string",
+ "format": "date-time",
+ "title": "when the news item was created in OUR database"
+ },
+ "date": {
+ "type": "string",
+ "format": "date-time",
+ "title": "the date of the news item"
}
}
},
- "apiNewDishRatingRequest": {
+ "apiNewsAlert": {
"type": "object",
"properties": {
- "points": {
- "type": "integer",
- "format": "int32",
- "title": "number in the range 1-5"
+ "imageUrl": {
+ "type": "string"
},
- "cafeteriaId": {
- "type": "string",
- "title": "Mandatory Name of the dish (EAT-API naming scheme \"MENSA_GARCHING\") Must be available int the given mensa"
+ "link": {
+ "type": "string"
},
- "dish": {
+ "created": {
"type": "string",
- "title": "Mandatory Name of the dish (EAT-API naming scheme) Must be available int the given mensa"
+ "format": "date-time"
},
- "image": {
+ "from": {
"type": "string",
- "format": "byte",
- "title": "Optional JPEG image in Base64"
- },
- "ratingTags": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/apiRatingTag"
- },
- "title": "Optional list of tag ratings add as many tags with a rating (1-5) of the list of dishRatingTags"
+ "format": "date-time"
},
- "comment": {
+ "to": {
"type": "string",
- "title": "Optional comment (max 256 chars)"
+ "format": "date-time"
}
}
},
@@ -1923,20 +1679,9 @@
"title": {
"type": "string"
},
- "icon": {
- "type": "string"
- }
- }
- },
- "apiNewsSourceReply": {
- "type": "object",
- "properties": {
- "sources": {
- "type": "array",
- "items": {
- "type": "object",
- "$ref": "#/definitions/apiNewsSource"
- }
+ "iconUrl": {
+ "type": "string",
+ "title": "where the icon can be found"
}
}
},
@@ -1984,8 +1729,8 @@
"type": "object",
"properties": {
"tagId": {
- "type": "integer",
- "format": "int32"
+ "type": "string",
+ "format": "int64"
},
"points": {
"type": "number",
@@ -2031,37 +1776,7 @@
}
}
},
- "apiRegisterDeviceReply": {
- "type": "object",
- "properties": {
- "deviceId": {
- "type": "string"
- }
- }
- },
- "apiRegisterDeviceRequest": {
- "type": "object",
- "properties": {
- "deviceId": {
- "type": "string"
- },
- "publicKey": {
- "type": "string"
- },
- "deviceType": {
- "$ref": "#/definitions/apiDeviceType"
- }
- }
- },
- "apiRemoveDeviceReply": {
- "type": "object",
- "properties": {
- "deviceId": {
- "type": "string"
- }
- }
- },
- "apiResponsiblePersonElement": {
+ "apiResponsiblePerson": {
"type": "object",
"properties": {
"name": {
@@ -2076,7 +1791,7 @@
"faculty": {
"type": "string"
},
- "tumID": {
+ "tumId": {
"type": "string"
}
}
@@ -2085,41 +1800,8 @@
"type": "object",
"properties": {
"roomId": {
- "type": "integer",
- "format": "int32"
- },
- "roomCode": {
- "type": "string"
- },
- "buildingNr": {
- "type": "string"
- },
- "archId": {
- "type": "string"
- },
- "info": {
- "type": "string"
- },
- "address": {
- "type": "string"
- },
- "purpose": {
- "type": "string"
- },
- "campus": {
- "type": "string"
- },
- "name": {
- "type": "string"
- }
- }
- },
- "apiRoomInformationElement": {
- "type": "object",
- "properties": {
- "roomId": {
- "type": "integer",
- "format": "int32"
+ "type": "string",
+ "format": "int64"
},
"roomCode": {
"type": "string"
@@ -2167,14 +1849,6 @@
}
}
},
- "apiSendFeedbackImageReply": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string"
- }
- }
- },
"apiSingleRatingReply": {
"type": "object",
"properties": {
diff --git a/server/api/tumdev/campus_backend_grpc.pb.go b/server/api/tumdev/campus_backend_grpc.pb.go
index 5fe93432..f68f154f 100644
--- a/server/api/tumdev/campus_backend_grpc.pb.go
+++ b/server/api/tumdev/campus_backend_grpc.pb.go
@@ -12,7 +12,6 @@ import (
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
- emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
@@ -21,89 +20,72 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
- Campus_GetTopNews_FullMethodName = "/api.Campus/GetTopNews"
- Campus_GetNewsSources_FullMethodName = "/api.Campus/GetNewsSources"
- Campus_SearchRooms_FullMethodName = "/api.Campus/SearchRooms"
- Campus_GetLocations_FullMethodName = "/api.Campus/GetLocations"
- Campus_GetRoomMaps_FullMethodName = "/api.Campus/GetRoomMaps"
- Campus_GetRoomCoordinates_FullMethodName = "/api.Campus/GetRoomCoordinates"
- Campus_GetRoomSchedule_FullMethodName = "/api.Campus/GetRoomSchedule"
- Campus_GetCafeteriaRatings_FullMethodName = "/api.Campus/GetCafeteriaRatings"
- Campus_GetDishRatings_FullMethodName = "/api.Campus/GetDishRatings"
- Campus_NewCafeteriaRating_FullMethodName = "/api.Campus/NewCafeteriaRating"
- Campus_NewDishRating_FullMethodName = "/api.Campus/NewDishRating"
- Campus_GetAvailableDishTags_FullMethodName = "/api.Campus/GetAvailableDishTags"
- Campus_GetNameTags_FullMethodName = "/api.Campus/GetNameTags"
- Campus_GetAvailableCafeteriaTags_FullMethodName = "/api.Campus/GetAvailableCafeteriaTags"
- Campus_GetCafeterias_FullMethodName = "/api.Campus/GetCafeterias"
- Campus_GetDishes_FullMethodName = "/api.Campus/GetDishes"
- Campus_GetResponsiblePerson_FullMethodName = "/api.Campus/GetResponsiblePerson"
- Campus_GetBuilding2Gps_FullMethodName = "/api.Campus/GetBuilding2Gps"
- Campus_GetAreaFacilitiesByBuildingNr_FullMethodName = "/api.Campus/GetAreaFacilitiesByBuildingNr"
- Campus_GetListOfToilets_FullMethodName = "/api.Campus/GetListOfToilets"
- Campus_GetListOfElevators_FullMethodName = "/api.Campus/GetListOfElevators"
- Campus_GetMoreInformation_FullMethodName = "/api.Campus/GetMoreInformation"
- Campus_GetOpeningTimes_FullMethodName = "/api.Campus/GetOpeningTimes"
- Campus_GetUpdateNote_FullMethodName = "/api.Campus/GetUpdateNote"
- Campus_GetStudyRoomList_FullMethodName = "/api.Campus/GetStudyRoomList"
- Campus_GetKino_FullMethodName = "/api.Campus/GetKino"
- Campus_SendFeedback_FullMethodName = "/api.Campus/SendFeedback"
- Campus_SendFeedbackImage_FullMethodName = "/api.Campus/SendFeedbackImage"
- Campus_GetUploadStatus_FullMethodName = "/api.Campus/GetUploadStatus"
- Campus_GetNotification_FullMethodName = "/api.Campus/GetNotification"
- Campus_GetNotificationConfirm_FullMethodName = "/api.Campus/GetNotificationConfirm"
- Campus_GetMembers_FullMethodName = "/api.Campus/GetMembers"
- Campus_GetCanteenHeadCount_FullMethodName = "/api.Campus/GetCanteenHeadCount"
- Campus_IOSDeviceRequestResponse_FullMethodName = "/api.Campus/IOSDeviceRequestResponse"
- Campus_RegisterDevice_FullMethodName = "/api.Campus/RegisterDevice"
- Campus_RemoveDevice_FullMethodName = "/api.Campus/RemoveDevice"
+ Campus_ListNewsAlerts_FullMethodName = "/api.Campus/ListNewsAlerts"
+ Campus_ListNewsSources_FullMethodName = "/api.Campus/ListNewsSources"
+ Campus_ListNews_FullMethodName = "/api.Campus/ListNews"
+ Campus_SearchRooms_FullMethodName = "/api.Campus/SearchRooms"
+ Campus_ListCanteenRatings_FullMethodName = "/api.Campus/ListCanteenRatings"
+ Campus_GetDishRatings_FullMethodName = "/api.Campus/GetDishRatings"
+ Campus_CreateCanteenRating_FullMethodName = "/api.Campus/CreateCanteenRating"
+ Campus_CreateDishRating_FullMethodName = "/api.Campus/CreateDishRating"
+ Campus_ListAvailableDishTags_FullMethodName = "/api.Campus/ListAvailableDishTags"
+ Campus_ListNameTags_FullMethodName = "/api.Campus/ListNameTags"
+ Campus_ListAvailableCanteenTags_FullMethodName = "/api.Campus/ListAvailableCanteenTags"
+ Campus_ListCanteens_FullMethodName = "/api.Campus/ListCanteens"
+ Campus_ListDishes_FullMethodName = "/api.Campus/ListDishes"
+ Campus_ListResponsiblePerson_FullMethodName = "/api.Campus/ListResponsiblePerson"
+ Campus_ListMoreInformation_FullMethodName = "/api.Campus/ListMoreInformation"
+ Campus_ListOpeningTimes_FullMethodName = "/api.Campus/ListOpeningTimes"
+ Campus_GetUpdateNote_FullMethodName = "/api.Campus/GetUpdateNote"
+ Campus_ListStudyRooms_FullMethodName = "/api.Campus/ListStudyRooms"
+ Campus_ListMovies_FullMethodName = "/api.Campus/ListMovies"
+ Campus_CreateFeedback_FullMethodName = "/api.Campus/CreateFeedback"
+ Campus_GetUploadStatus_FullMethodName = "/api.Campus/GetUploadStatus"
+ Campus_GetNotification_FullMethodName = "/api.Campus/GetNotification"
+ Campus_GetNotificationConfirm_FullMethodName = "/api.Campus/GetNotificationConfirm"
+ Campus_GetMember_FullMethodName = "/api.Campus/GetMember"
+ Campus_GetCanteenHeadCount_FullMethodName = "/api.Campus/GetCanteenHeadCount"
+ Campus_IOSDeviceRequestResponse_FullMethodName = "/api.Campus/IOSDeviceRequestResponse"
+ Campus_CreateDevice_FullMethodName = "/api.Campus/CreateDevice"
+ Campus_DeleteDevice_FullMethodName = "/api.Campus/DeleteDevice"
)
// CampusClient is the client API for Campus service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type CampusClient interface {
- GetTopNews(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetTopNewsReply, error)
- GetNewsSources(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NewsSourceReply, error)
+ ListNewsAlerts(ctx context.Context, in *ListNewsAlertsRequest, opts ...grpc.CallOption) (*ListNewsAlertsReply, error)
+ ListNewsSources(ctx context.Context, in *ListNewsSourcesRequest, opts ...grpc.CallOption) (*ListNewsSourcesReply, error)
+ ListNews(ctx context.Context, in *ListNewsRequest, opts ...grpc.CallOption) (*ListNewsReply, error)
SearchRooms(ctx context.Context, in *SearchRoomsRequest, opts ...grpc.CallOption) (*SearchRoomsReply, error)
- // a location is a campus location/building, e.g. "Garching Forschungszentrum"
- GetLocations(ctx context.Context, in *GetLocationsRequest, opts ...grpc.CallOption) (*GetLocationsReply, error)
- GetRoomMaps(ctx context.Context, in *GetRoomMapsRequest, opts ...grpc.CallOption) (*GetRoomMapsReply, error)
- GetRoomCoordinates(ctx context.Context, in *GetRoomCoordinatesRequest, opts ...grpc.CallOption) (*GetRoomCoordinatesReply, error)
- GetRoomSchedule(ctx context.Context, in *GetRoomScheduleRequest, opts ...grpc.CallOption) (*GetRoomScheduleReply, error)
- // This endpoint retrieves Cafeteria Ratings from the Backend.
- GetCafeteriaRatings(ctx context.Context, in *CafeteriaRatingRequest, opts ...grpc.CallOption) (*CafeteriaRatingReply, error)
- GetDishRatings(ctx context.Context, in *DishRatingRequest, opts ...grpc.CallOption) (*DishRatingReply, error)
- NewCafeteriaRating(ctx context.Context, in *NewCafeteriaRatingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
- NewDishRating(ctx context.Context, in *NewDishRatingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
- GetAvailableDishTags(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetTagsReply, error)
- GetNameTags(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetTagsReply, error)
- GetAvailableCafeteriaTags(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetTagsReply, error)
- GetCafeterias(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetCafeteriaReply, error)
- GetDishes(ctx context.Context, in *GetDishesRequest, opts ...grpc.CallOption) (*GetDishesReply, error)
- GetResponsiblePerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetResponsiblePersonReply, error)
- GetBuilding2Gps(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBuilding2GpsReply, error)
- GetAreaFacilitiesByBuildingNr(ctx context.Context, in *GetAreaFacilitiesByBuildingNrRequest, opts ...grpc.CallOption) (*GetAreaFacilitiesByBuildingNrReply, error)
- GetListOfToilets(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetListOfToiletsReply, error)
- GetListOfElevators(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetListOfElevatorsReply, error)
- GetMoreInformation(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMoreInformationReply, error)
- GetOpeningTimes(ctx context.Context, in *GetOpeningTimesRequest, opts ...grpc.CallOption) (*GetOpeningTimesReply, error)
+ // This endpoint retrieves Canteen Ratings from the Backend.
+ ListCanteenRatings(ctx context.Context, in *ListCanteenRatingsRequest, opts ...grpc.CallOption) (*ListCanteenRatingsReply, error)
+ GetDishRatings(ctx context.Context, in *GetDishRatingsRequest, opts ...grpc.CallOption) (*GetDishRatingsReply, error)
+ CreateCanteenRating(ctx context.Context, in *CreateCanteenRatingRequest, opts ...grpc.CallOption) (*CreateCanteenRatingReply, error)
+ CreateDishRating(ctx context.Context, in *CreateDishRatingRequest, opts ...grpc.CallOption) (*CreateDishRatingReply, error)
+ ListAvailableDishTags(ctx context.Context, in *ListAvailableDishTagsRequest, opts ...grpc.CallOption) (*ListAvailableDishTagsReply, error)
+ ListNameTags(ctx context.Context, in *ListNameTagsRequest, opts ...grpc.CallOption) (*ListNameTagsReply, error)
+ ListAvailableCanteenTags(ctx context.Context, in *ListAvailableCanteenTagsRequest, opts ...grpc.CallOption) (*ListAvailableCanteenTagsReply, error)
+ ListCanteens(ctx context.Context, in *ListCanteensRequest, opts ...grpc.CallOption) (*ListCanteensReply, error)
+ ListDishes(ctx context.Context, in *ListDishesRequest, opts ...grpc.CallOption) (*ListDishesReply, error)
+ ListResponsiblePerson(ctx context.Context, in *ListResponsiblePersonRequest, opts ...grpc.CallOption) (*ListResponsiblePersonReply, error)
+ ListMoreInformation(ctx context.Context, in *ListMoreInformationRequest, opts ...grpc.CallOption) (*ListMoreInformationReply, error)
+ ListOpeningTimes(ctx context.Context, in *ListOpeningTimesRequest, opts ...grpc.CallOption) (*ListOpeningTimesReply, error)
GetUpdateNote(ctx context.Context, in *GetUpdateNoteRequest, opts ...grpc.CallOption) (*GetUpdateNoteReply, error)
- GetStudyRoomList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetStudyRoomListReply, error)
- GetKino(ctx context.Context, in *GetKinoRequest, opts ...grpc.CallOption) (*GetKinoReply, error)
- SendFeedback(ctx context.Context, in *SendFeedbackRequest, opts ...grpc.CallOption) (*SendFeedbackImageReply, error)
- SendFeedbackImage(ctx context.Context, in *SendFeedbackImageRequest, opts ...grpc.CallOption) (*SendFeedbackImageReply, error)
+ ListStudyRooms(ctx context.Context, in *ListStudyRoomsRequest, opts ...grpc.CallOption) (*ListStudyRoomsReply, error)
+ ListMovies(ctx context.Context, in *ListMoviesRequest, opts ...grpc.CallOption) (*ListMoviesReply, error)
+ CreateFeedback(ctx context.Context, opts ...grpc.CallOption) (Campus_CreateFeedbackClient, error)
GetUploadStatus(ctx context.Context, in *GetUploadStatusRequest, opts ...grpc.CallOption) (*GetUploadStatusReply, error)
- GetNotification(ctx context.Context, in *NotificationsRequest, opts ...grpc.CallOption) (*GetNotificationsReply, error)
- GetNotificationConfirm(ctx context.Context, in *NotificationsRequest, opts ...grpc.CallOption) (*GetNotificationsConfirmReply, error)
- GetMembers(ctx context.Context, in *GetMembersRequest, opts ...grpc.CallOption) (*GetMembersReply, error)
+ GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*GetNotificationReply, error)
+ GetNotificationConfirm(ctx context.Context, in *GetNotificationConfirmRequest, opts ...grpc.CallOption) (*GetNotificationConfirmReply, error)
+ GetMember(ctx context.Context, in *GetMemberRequest, opts ...grpc.CallOption) (*GetMemberReply, error)
GetCanteenHeadCount(ctx context.Context, in *GetCanteenHeadCountRequest, opts ...grpc.CallOption) (*GetCanteenHeadCountReply, error)
// Endpoint for the iOS app to respond to background notifications requests
IOSDeviceRequestResponse(ctx context.Context, in *IOSDeviceRequestResponseRequest, opts ...grpc.CallOption) (*IOSDeviceRequestResponseReply, error)
- // Register an Android, iOS or Windows device for push notifications
- RegisterDevice(ctx context.Context, in *RegisterDeviceRequest, opts ...grpc.CallOption) (*RegisterDeviceReply, error)
- // Unregister it from push notifications
- RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceReply, error)
+ // Create an device (Android/iOS/Windows) for push notifications
+ CreateDevice(ctx context.Context, in *CreateDeviceRequest, opts ...grpc.CallOption) (*CreateDeviceReply, error)
+ // Delete a device from push notifications
+ DeleteDevice(ctx context.Context, in *DeleteDeviceRequest, opts ...grpc.CallOption) (*DeleteDeviceReply, error)
}
type campusClient struct {
@@ -114,80 +96,53 @@ func NewCampusClient(cc grpc.ClientConnInterface) CampusClient {
return &campusClient{cc}
}
-func (c *campusClient) GetTopNews(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetTopNewsReply, error) {
- out := new(GetTopNewsReply)
- err := c.cc.Invoke(ctx, Campus_GetTopNews_FullMethodName, in, out, opts...)
+func (c *campusClient) ListNewsAlerts(ctx context.Context, in *ListNewsAlertsRequest, opts ...grpc.CallOption) (*ListNewsAlertsReply, error) {
+ out := new(ListNewsAlertsReply)
+ err := c.cc.Invoke(ctx, Campus_ListNewsAlerts_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetNewsSources(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NewsSourceReply, error) {
- out := new(NewsSourceReply)
- err := c.cc.Invoke(ctx, Campus_GetNewsSources_FullMethodName, in, out, opts...)
+func (c *campusClient) ListNewsSources(ctx context.Context, in *ListNewsSourcesRequest, opts ...grpc.CallOption) (*ListNewsSourcesReply, error) {
+ out := new(ListNewsSourcesReply)
+ err := c.cc.Invoke(ctx, Campus_ListNewsSources_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) SearchRooms(ctx context.Context, in *SearchRoomsRequest, opts ...grpc.CallOption) (*SearchRoomsReply, error) {
- out := new(SearchRoomsReply)
- err := c.cc.Invoke(ctx, Campus_SearchRooms_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *campusClient) GetLocations(ctx context.Context, in *GetLocationsRequest, opts ...grpc.CallOption) (*GetLocationsReply, error) {
- out := new(GetLocationsReply)
- err := c.cc.Invoke(ctx, Campus_GetLocations_FullMethodName, in, out, opts...)
+func (c *campusClient) ListNews(ctx context.Context, in *ListNewsRequest, opts ...grpc.CallOption) (*ListNewsReply, error) {
+ out := new(ListNewsReply)
+ err := c.cc.Invoke(ctx, Campus_ListNews_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetRoomMaps(ctx context.Context, in *GetRoomMapsRequest, opts ...grpc.CallOption) (*GetRoomMapsReply, error) {
- out := new(GetRoomMapsReply)
- err := c.cc.Invoke(ctx, Campus_GetRoomMaps_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *campusClient) GetRoomCoordinates(ctx context.Context, in *GetRoomCoordinatesRequest, opts ...grpc.CallOption) (*GetRoomCoordinatesReply, error) {
- out := new(GetRoomCoordinatesReply)
- err := c.cc.Invoke(ctx, Campus_GetRoomCoordinates_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *campusClient) GetRoomSchedule(ctx context.Context, in *GetRoomScheduleRequest, opts ...grpc.CallOption) (*GetRoomScheduleReply, error) {
- out := new(GetRoomScheduleReply)
- err := c.cc.Invoke(ctx, Campus_GetRoomSchedule_FullMethodName, in, out, opts...)
+func (c *campusClient) SearchRooms(ctx context.Context, in *SearchRoomsRequest, opts ...grpc.CallOption) (*SearchRoomsReply, error) {
+ out := new(SearchRoomsReply)
+ err := c.cc.Invoke(ctx, Campus_SearchRooms_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetCafeteriaRatings(ctx context.Context, in *CafeteriaRatingRequest, opts ...grpc.CallOption) (*CafeteriaRatingReply, error) {
- out := new(CafeteriaRatingReply)
- err := c.cc.Invoke(ctx, Campus_GetCafeteriaRatings_FullMethodName, in, out, opts...)
+func (c *campusClient) ListCanteenRatings(ctx context.Context, in *ListCanteenRatingsRequest, opts ...grpc.CallOption) (*ListCanteenRatingsReply, error) {
+ out := new(ListCanteenRatingsReply)
+ err := c.cc.Invoke(ctx, Campus_ListCanteenRatings_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetDishRatings(ctx context.Context, in *DishRatingRequest, opts ...grpc.CallOption) (*DishRatingReply, error) {
- out := new(DishRatingReply)
+func (c *campusClient) GetDishRatings(ctx context.Context, in *GetDishRatingsRequest, opts ...grpc.CallOption) (*GetDishRatingsReply, error) {
+ out := new(GetDishRatingsReply)
err := c.cc.Invoke(ctx, Campus_GetDishRatings_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@@ -195,175 +150,155 @@ func (c *campusClient) GetDishRatings(ctx context.Context, in *DishRatingRequest
return out, nil
}
-func (c *campusClient) NewCafeteriaRating(ctx context.Context, in *NewCafeteriaRatingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, Campus_NewCafeteriaRating_FullMethodName, in, out, opts...)
+func (c *campusClient) CreateCanteenRating(ctx context.Context, in *CreateCanteenRatingRequest, opts ...grpc.CallOption) (*CreateCanteenRatingReply, error) {
+ out := new(CreateCanteenRatingReply)
+ err := c.cc.Invoke(ctx, Campus_CreateCanteenRating_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) NewDishRating(ctx context.Context, in *NewDishRatingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
- out := new(emptypb.Empty)
- err := c.cc.Invoke(ctx, Campus_NewDishRating_FullMethodName, in, out, opts...)
+func (c *campusClient) CreateDishRating(ctx context.Context, in *CreateDishRatingRequest, opts ...grpc.CallOption) (*CreateDishRatingReply, error) {
+ out := new(CreateDishRatingReply)
+ err := c.cc.Invoke(ctx, Campus_CreateDishRating_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetAvailableDishTags(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetTagsReply, error) {
- out := new(GetTagsReply)
- err := c.cc.Invoke(ctx, Campus_GetAvailableDishTags_FullMethodName, in, out, opts...)
+func (c *campusClient) ListAvailableDishTags(ctx context.Context, in *ListAvailableDishTagsRequest, opts ...grpc.CallOption) (*ListAvailableDishTagsReply, error) {
+ out := new(ListAvailableDishTagsReply)
+ err := c.cc.Invoke(ctx, Campus_ListAvailableDishTags_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetNameTags(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetTagsReply, error) {
- out := new(GetTagsReply)
- err := c.cc.Invoke(ctx, Campus_GetNameTags_FullMethodName, in, out, opts...)
+func (c *campusClient) ListNameTags(ctx context.Context, in *ListNameTagsRequest, opts ...grpc.CallOption) (*ListNameTagsReply, error) {
+ out := new(ListNameTagsReply)
+ err := c.cc.Invoke(ctx, Campus_ListNameTags_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetAvailableCafeteriaTags(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetTagsReply, error) {
- out := new(GetTagsReply)
- err := c.cc.Invoke(ctx, Campus_GetAvailableCafeteriaTags_FullMethodName, in, out, opts...)
+func (c *campusClient) ListAvailableCanteenTags(ctx context.Context, in *ListAvailableCanteenTagsRequest, opts ...grpc.CallOption) (*ListAvailableCanteenTagsReply, error) {
+ out := new(ListAvailableCanteenTagsReply)
+ err := c.cc.Invoke(ctx, Campus_ListAvailableCanteenTags_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetCafeterias(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetCafeteriaReply, error) {
- out := new(GetCafeteriaReply)
- err := c.cc.Invoke(ctx, Campus_GetCafeterias_FullMethodName, in, out, opts...)
+func (c *campusClient) ListCanteens(ctx context.Context, in *ListCanteensRequest, opts ...grpc.CallOption) (*ListCanteensReply, error) {
+ out := new(ListCanteensReply)
+ err := c.cc.Invoke(ctx, Campus_ListCanteens_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetDishes(ctx context.Context, in *GetDishesRequest, opts ...grpc.CallOption) (*GetDishesReply, error) {
- out := new(GetDishesReply)
- err := c.cc.Invoke(ctx, Campus_GetDishes_FullMethodName, in, out, opts...)
+func (c *campusClient) ListDishes(ctx context.Context, in *ListDishesRequest, opts ...grpc.CallOption) (*ListDishesReply, error) {
+ out := new(ListDishesReply)
+ err := c.cc.Invoke(ctx, Campus_ListDishes_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetResponsiblePerson(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetResponsiblePersonReply, error) {
- out := new(GetResponsiblePersonReply)
- err := c.cc.Invoke(ctx, Campus_GetResponsiblePerson_FullMethodName, in, out, opts...)
+func (c *campusClient) ListResponsiblePerson(ctx context.Context, in *ListResponsiblePersonRequest, opts ...grpc.CallOption) (*ListResponsiblePersonReply, error) {
+ out := new(ListResponsiblePersonReply)
+ err := c.cc.Invoke(ctx, Campus_ListResponsiblePerson_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetBuilding2Gps(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetBuilding2GpsReply, error) {
- out := new(GetBuilding2GpsReply)
- err := c.cc.Invoke(ctx, Campus_GetBuilding2Gps_FullMethodName, in, out, opts...)
+func (c *campusClient) ListMoreInformation(ctx context.Context, in *ListMoreInformationRequest, opts ...grpc.CallOption) (*ListMoreInformationReply, error) {
+ out := new(ListMoreInformationReply)
+ err := c.cc.Invoke(ctx, Campus_ListMoreInformation_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetAreaFacilitiesByBuildingNr(ctx context.Context, in *GetAreaFacilitiesByBuildingNrRequest, opts ...grpc.CallOption) (*GetAreaFacilitiesByBuildingNrReply, error) {
- out := new(GetAreaFacilitiesByBuildingNrReply)
- err := c.cc.Invoke(ctx, Campus_GetAreaFacilitiesByBuildingNr_FullMethodName, in, out, opts...)
+func (c *campusClient) ListOpeningTimes(ctx context.Context, in *ListOpeningTimesRequest, opts ...grpc.CallOption) (*ListOpeningTimesReply, error) {
+ out := new(ListOpeningTimesReply)
+ err := c.cc.Invoke(ctx, Campus_ListOpeningTimes_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetListOfToilets(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetListOfToiletsReply, error) {
- out := new(GetListOfToiletsReply)
- err := c.cc.Invoke(ctx, Campus_GetListOfToilets_FullMethodName, in, out, opts...)
+func (c *campusClient) GetUpdateNote(ctx context.Context, in *GetUpdateNoteRequest, opts ...grpc.CallOption) (*GetUpdateNoteReply, error) {
+ out := new(GetUpdateNoteReply)
+ err := c.cc.Invoke(ctx, Campus_GetUpdateNote_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetListOfElevators(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetListOfElevatorsReply, error) {
- out := new(GetListOfElevatorsReply)
- err := c.cc.Invoke(ctx, Campus_GetListOfElevators_FullMethodName, in, out, opts...)
+func (c *campusClient) ListStudyRooms(ctx context.Context, in *ListStudyRoomsRequest, opts ...grpc.CallOption) (*ListStudyRoomsReply, error) {
+ out := new(ListStudyRoomsReply)
+ err := c.cc.Invoke(ctx, Campus_ListStudyRooms_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetMoreInformation(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMoreInformationReply, error) {
- out := new(GetMoreInformationReply)
- err := c.cc.Invoke(ctx, Campus_GetMoreInformation_FullMethodName, in, out, opts...)
+func (c *campusClient) ListMovies(ctx context.Context, in *ListMoviesRequest, opts ...grpc.CallOption) (*ListMoviesReply, error) {
+ out := new(ListMoviesReply)
+ err := c.cc.Invoke(ctx, Campus_ListMovies_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) GetOpeningTimes(ctx context.Context, in *GetOpeningTimesRequest, opts ...grpc.CallOption) (*GetOpeningTimesReply, error) {
- out := new(GetOpeningTimesReply)
- err := c.cc.Invoke(ctx, Campus_GetOpeningTimes_FullMethodName, in, out, opts...)
+func (c *campusClient) CreateFeedback(ctx context.Context, opts ...grpc.CallOption) (Campus_CreateFeedbackClient, error) {
+ stream, err := c.cc.NewStream(ctx, &Campus_ServiceDesc.Streams[0], Campus_CreateFeedback_FullMethodName, opts...)
if err != nil {
return nil, err
}
- return out, nil
+ x := &campusCreateFeedbackClient{stream}
+ return x, nil
}
-func (c *campusClient) GetUpdateNote(ctx context.Context, in *GetUpdateNoteRequest, opts ...grpc.CallOption) (*GetUpdateNoteReply, error) {
- out := new(GetUpdateNoteReply)
- err := c.cc.Invoke(ctx, Campus_GetUpdateNote_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
+type Campus_CreateFeedbackClient interface {
+ Send(*CreateFeedbackRequest) error
+ CloseAndRecv() (*CreateFeedbackReply, error)
+ grpc.ClientStream
}
-func (c *campusClient) GetStudyRoomList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetStudyRoomListReply, error) {
- out := new(GetStudyRoomListReply)
- err := c.cc.Invoke(ctx, Campus_GetStudyRoomList_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
+type campusCreateFeedbackClient struct {
+ grpc.ClientStream
}
-func (c *campusClient) GetKino(ctx context.Context, in *GetKinoRequest, opts ...grpc.CallOption) (*GetKinoReply, error) {
- out := new(GetKinoReply)
- err := c.cc.Invoke(ctx, Campus_GetKino_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
+func (x *campusCreateFeedbackClient) Send(m *CreateFeedbackRequest) error {
+ return x.ClientStream.SendMsg(m)
}
-func (c *campusClient) SendFeedback(ctx context.Context, in *SendFeedbackRequest, opts ...grpc.CallOption) (*SendFeedbackImageReply, error) {
- out := new(SendFeedbackImageReply)
- err := c.cc.Invoke(ctx, Campus_SendFeedback_FullMethodName, in, out, opts...)
- if err != nil {
+func (x *campusCreateFeedbackClient) CloseAndRecv() (*CreateFeedbackReply, error) {
+ if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
- return out, nil
-}
-
-func (c *campusClient) SendFeedbackImage(ctx context.Context, in *SendFeedbackImageRequest, opts ...grpc.CallOption) (*SendFeedbackImageReply, error) {
- out := new(SendFeedbackImageReply)
- err := c.cc.Invoke(ctx, Campus_SendFeedbackImage_FullMethodName, in, out, opts...)
- if err != nil {
+ m := new(CreateFeedbackReply)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
- return out, nil
+ return m, nil
}
func (c *campusClient) GetUploadStatus(ctx context.Context, in *GetUploadStatusRequest, opts ...grpc.CallOption) (*GetUploadStatusReply, error) {
@@ -375,8 +310,8 @@ func (c *campusClient) GetUploadStatus(ctx context.Context, in *GetUploadStatusR
return out, nil
}
-func (c *campusClient) GetNotification(ctx context.Context, in *NotificationsRequest, opts ...grpc.CallOption) (*GetNotificationsReply, error) {
- out := new(GetNotificationsReply)
+func (c *campusClient) GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*GetNotificationReply, error) {
+ out := new(GetNotificationReply)
err := c.cc.Invoke(ctx, Campus_GetNotification_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@@ -384,8 +319,8 @@ func (c *campusClient) GetNotification(ctx context.Context, in *NotificationsReq
return out, nil
}
-func (c *campusClient) GetNotificationConfirm(ctx context.Context, in *NotificationsRequest, opts ...grpc.CallOption) (*GetNotificationsConfirmReply, error) {
- out := new(GetNotificationsConfirmReply)
+func (c *campusClient) GetNotificationConfirm(ctx context.Context, in *GetNotificationConfirmRequest, opts ...grpc.CallOption) (*GetNotificationConfirmReply, error) {
+ out := new(GetNotificationConfirmReply)
err := c.cc.Invoke(ctx, Campus_GetNotificationConfirm_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@@ -393,9 +328,9 @@ func (c *campusClient) GetNotificationConfirm(ctx context.Context, in *Notificat
return out, nil
}
-func (c *campusClient) GetMembers(ctx context.Context, in *GetMembersRequest, opts ...grpc.CallOption) (*GetMembersReply, error) {
- out := new(GetMembersReply)
- err := c.cc.Invoke(ctx, Campus_GetMembers_FullMethodName, in, out, opts...)
+func (c *campusClient) GetMember(ctx context.Context, in *GetMemberRequest, opts ...grpc.CallOption) (*GetMemberReply, error) {
+ out := new(GetMemberReply)
+ err := c.cc.Invoke(ctx, Campus_GetMember_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -420,18 +355,18 @@ func (c *campusClient) IOSDeviceRequestResponse(ctx context.Context, in *IOSDevi
return out, nil
}
-func (c *campusClient) RegisterDevice(ctx context.Context, in *RegisterDeviceRequest, opts ...grpc.CallOption) (*RegisterDeviceReply, error) {
- out := new(RegisterDeviceReply)
- err := c.cc.Invoke(ctx, Campus_RegisterDevice_FullMethodName, in, out, opts...)
+func (c *campusClient) CreateDevice(ctx context.Context, in *CreateDeviceRequest, opts ...grpc.CallOption) (*CreateDeviceReply, error) {
+ out := new(CreateDeviceReply)
+ err := c.cc.Invoke(ctx, Campus_CreateDevice_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *campusClient) RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceReply, error) {
- out := new(RemoveDeviceReply)
- err := c.cc.Invoke(ctx, Campus_RemoveDevice_FullMethodName, in, out, opts...)
+func (c *campusClient) DeleteDevice(ctx context.Context, in *DeleteDeviceRequest, opts ...grpc.CallOption) (*DeleteDeviceReply, error) {
+ out := new(DeleteDeviceReply)
+ err := c.cc.Invoke(ctx, Campus_DeleteDevice_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -442,47 +377,38 @@ func (c *campusClient) RemoveDevice(ctx context.Context, in *RemoveDeviceRequest
// All implementations must embed UnimplementedCampusServer
// for forward compatibility
type CampusServer interface {
- GetTopNews(context.Context, *emptypb.Empty) (*GetTopNewsReply, error)
- GetNewsSources(context.Context, *emptypb.Empty) (*NewsSourceReply, error)
+ ListNewsAlerts(context.Context, *ListNewsAlertsRequest) (*ListNewsAlertsReply, error)
+ ListNewsSources(context.Context, *ListNewsSourcesRequest) (*ListNewsSourcesReply, error)
+ ListNews(context.Context, *ListNewsRequest) (*ListNewsReply, error)
SearchRooms(context.Context, *SearchRoomsRequest) (*SearchRoomsReply, error)
- // a location is a campus location/building, e.g. "Garching Forschungszentrum"
- GetLocations(context.Context, *GetLocationsRequest) (*GetLocationsReply, error)
- GetRoomMaps(context.Context, *GetRoomMapsRequest) (*GetRoomMapsReply, error)
- GetRoomCoordinates(context.Context, *GetRoomCoordinatesRequest) (*GetRoomCoordinatesReply, error)
- GetRoomSchedule(context.Context, *GetRoomScheduleRequest) (*GetRoomScheduleReply, error)
- // This endpoint retrieves Cafeteria Ratings from the Backend.
- GetCafeteriaRatings(context.Context, *CafeteriaRatingRequest) (*CafeteriaRatingReply, error)
- GetDishRatings(context.Context, *DishRatingRequest) (*DishRatingReply, error)
- NewCafeteriaRating(context.Context, *NewCafeteriaRatingRequest) (*emptypb.Empty, error)
- NewDishRating(context.Context, *NewDishRatingRequest) (*emptypb.Empty, error)
- GetAvailableDishTags(context.Context, *emptypb.Empty) (*GetTagsReply, error)
- GetNameTags(context.Context, *emptypb.Empty) (*GetTagsReply, error)
- GetAvailableCafeteriaTags(context.Context, *emptypb.Empty) (*GetTagsReply, error)
- GetCafeterias(context.Context, *emptypb.Empty) (*GetCafeteriaReply, error)
- GetDishes(context.Context, *GetDishesRequest) (*GetDishesReply, error)
- GetResponsiblePerson(context.Context, *emptypb.Empty) (*GetResponsiblePersonReply, error)
- GetBuilding2Gps(context.Context, *emptypb.Empty) (*GetBuilding2GpsReply, error)
- GetAreaFacilitiesByBuildingNr(context.Context, *GetAreaFacilitiesByBuildingNrRequest) (*GetAreaFacilitiesByBuildingNrReply, error)
- GetListOfToilets(context.Context, *emptypb.Empty) (*GetListOfToiletsReply, error)
- GetListOfElevators(context.Context, *emptypb.Empty) (*GetListOfElevatorsReply, error)
- GetMoreInformation(context.Context, *emptypb.Empty) (*GetMoreInformationReply, error)
- GetOpeningTimes(context.Context, *GetOpeningTimesRequest) (*GetOpeningTimesReply, error)
+ // This endpoint retrieves Canteen Ratings from the Backend.
+ ListCanteenRatings(context.Context, *ListCanteenRatingsRequest) (*ListCanteenRatingsReply, error)
+ GetDishRatings(context.Context, *GetDishRatingsRequest) (*GetDishRatingsReply, error)
+ CreateCanteenRating(context.Context, *CreateCanteenRatingRequest) (*CreateCanteenRatingReply, error)
+ CreateDishRating(context.Context, *CreateDishRatingRequest) (*CreateDishRatingReply, error)
+ ListAvailableDishTags(context.Context, *ListAvailableDishTagsRequest) (*ListAvailableDishTagsReply, error)
+ ListNameTags(context.Context, *ListNameTagsRequest) (*ListNameTagsReply, error)
+ ListAvailableCanteenTags(context.Context, *ListAvailableCanteenTagsRequest) (*ListAvailableCanteenTagsReply, error)
+ ListCanteens(context.Context, *ListCanteensRequest) (*ListCanteensReply, error)
+ ListDishes(context.Context, *ListDishesRequest) (*ListDishesReply, error)
+ ListResponsiblePerson(context.Context, *ListResponsiblePersonRequest) (*ListResponsiblePersonReply, error)
+ ListMoreInformation(context.Context, *ListMoreInformationRequest) (*ListMoreInformationReply, error)
+ ListOpeningTimes(context.Context, *ListOpeningTimesRequest) (*ListOpeningTimesReply, error)
GetUpdateNote(context.Context, *GetUpdateNoteRequest) (*GetUpdateNoteReply, error)
- GetStudyRoomList(context.Context, *emptypb.Empty) (*GetStudyRoomListReply, error)
- GetKino(context.Context, *GetKinoRequest) (*GetKinoReply, error)
- SendFeedback(context.Context, *SendFeedbackRequest) (*SendFeedbackImageReply, error)
- SendFeedbackImage(context.Context, *SendFeedbackImageRequest) (*SendFeedbackImageReply, error)
+ ListStudyRooms(context.Context, *ListStudyRoomsRequest) (*ListStudyRoomsReply, error)
+ ListMovies(context.Context, *ListMoviesRequest) (*ListMoviesReply, error)
+ CreateFeedback(Campus_CreateFeedbackServer) error
GetUploadStatus(context.Context, *GetUploadStatusRequest) (*GetUploadStatusReply, error)
- GetNotification(context.Context, *NotificationsRequest) (*GetNotificationsReply, error)
- GetNotificationConfirm(context.Context, *NotificationsRequest) (*GetNotificationsConfirmReply, error)
- GetMembers(context.Context, *GetMembersRequest) (*GetMembersReply, error)
+ GetNotification(context.Context, *GetNotificationRequest) (*GetNotificationReply, error)
+ GetNotificationConfirm(context.Context, *GetNotificationConfirmRequest) (*GetNotificationConfirmReply, error)
+ GetMember(context.Context, *GetMemberRequest) (*GetMemberReply, error)
GetCanteenHeadCount(context.Context, *GetCanteenHeadCountRequest) (*GetCanteenHeadCountReply, error)
// Endpoint for the iOS app to respond to background notifications requests
IOSDeviceRequestResponse(context.Context, *IOSDeviceRequestResponseRequest) (*IOSDeviceRequestResponseReply, error)
- // Register an Android, iOS or Windows device for push notifications
- RegisterDevice(context.Context, *RegisterDeviceRequest) (*RegisterDeviceReply, error)
- // Unregister it from push notifications
- RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceReply, error)
+ // Create an device (Android/iOS/Windows) for push notifications
+ CreateDevice(context.Context, *CreateDeviceRequest) (*CreateDeviceReply, error)
+ // Delete a device from push notifications
+ DeleteDevice(context.Context, *DeleteDeviceRequest) (*DeleteDeviceReply, error)
mustEmbedUnimplementedCampusServer()
}
@@ -490,101 +416,77 @@ type CampusServer interface {
type UnimplementedCampusServer struct {
}
-func (UnimplementedCampusServer) GetTopNews(context.Context, *emptypb.Empty) (*GetTopNewsReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetTopNews not implemented")
+func (UnimplementedCampusServer) ListNewsAlerts(context.Context, *ListNewsAlertsRequest) (*ListNewsAlertsReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListNewsAlerts not implemented")
+}
+func (UnimplementedCampusServer) ListNewsSources(context.Context, *ListNewsSourcesRequest) (*ListNewsSourcesReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListNewsSources not implemented")
}
-func (UnimplementedCampusServer) GetNewsSources(context.Context, *emptypb.Empty) (*NewsSourceReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetNewsSources not implemented")
+func (UnimplementedCampusServer) ListNews(context.Context, *ListNewsRequest) (*ListNewsReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListNews not implemented")
}
func (UnimplementedCampusServer) SearchRooms(context.Context, *SearchRoomsRequest) (*SearchRoomsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method SearchRooms not implemented")
}
-func (UnimplementedCampusServer) GetLocations(context.Context, *GetLocationsRequest) (*GetLocationsReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetLocations not implemented")
-}
-func (UnimplementedCampusServer) GetRoomMaps(context.Context, *GetRoomMapsRequest) (*GetRoomMapsReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetRoomMaps not implemented")
-}
-func (UnimplementedCampusServer) GetRoomCoordinates(context.Context, *GetRoomCoordinatesRequest) (*GetRoomCoordinatesReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetRoomCoordinates not implemented")
-}
-func (UnimplementedCampusServer) GetRoomSchedule(context.Context, *GetRoomScheduleRequest) (*GetRoomScheduleReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetRoomSchedule not implemented")
+func (UnimplementedCampusServer) ListCanteenRatings(context.Context, *ListCanteenRatingsRequest) (*ListCanteenRatingsReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListCanteenRatings not implemented")
}
-func (UnimplementedCampusServer) GetCafeteriaRatings(context.Context, *CafeteriaRatingRequest) (*CafeteriaRatingReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetCafeteriaRatings not implemented")
-}
-func (UnimplementedCampusServer) GetDishRatings(context.Context, *DishRatingRequest) (*DishRatingReply, error) {
+func (UnimplementedCampusServer) GetDishRatings(context.Context, *GetDishRatingsRequest) (*GetDishRatingsReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDishRatings not implemented")
}
-func (UnimplementedCampusServer) NewCafeteriaRating(context.Context, *NewCafeteriaRatingRequest) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method NewCafeteriaRating not implemented")
-}
-func (UnimplementedCampusServer) NewDishRating(context.Context, *NewDishRatingRequest) (*emptypb.Empty, error) {
- return nil, status.Errorf(codes.Unimplemented, "method NewDishRating not implemented")
-}
-func (UnimplementedCampusServer) GetAvailableDishTags(context.Context, *emptypb.Empty) (*GetTagsReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetAvailableDishTags not implemented")
-}
-func (UnimplementedCampusServer) GetNameTags(context.Context, *emptypb.Empty) (*GetTagsReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetNameTags not implemented")
+func (UnimplementedCampusServer) CreateCanteenRating(context.Context, *CreateCanteenRatingRequest) (*CreateCanteenRatingReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateCanteenRating not implemented")
}
-func (UnimplementedCampusServer) GetAvailableCafeteriaTags(context.Context, *emptypb.Empty) (*GetTagsReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetAvailableCafeteriaTags not implemented")
+func (UnimplementedCampusServer) CreateDishRating(context.Context, *CreateDishRatingRequest) (*CreateDishRatingReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateDishRating not implemented")
}
-func (UnimplementedCampusServer) GetCafeterias(context.Context, *emptypb.Empty) (*GetCafeteriaReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetCafeterias not implemented")
+func (UnimplementedCampusServer) ListAvailableDishTags(context.Context, *ListAvailableDishTagsRequest) (*ListAvailableDishTagsReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListAvailableDishTags not implemented")
}
-func (UnimplementedCampusServer) GetDishes(context.Context, *GetDishesRequest) (*GetDishesReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetDishes not implemented")
+func (UnimplementedCampusServer) ListNameTags(context.Context, *ListNameTagsRequest) (*ListNameTagsReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListNameTags not implemented")
}
-func (UnimplementedCampusServer) GetResponsiblePerson(context.Context, *emptypb.Empty) (*GetResponsiblePersonReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetResponsiblePerson not implemented")
+func (UnimplementedCampusServer) ListAvailableCanteenTags(context.Context, *ListAvailableCanteenTagsRequest) (*ListAvailableCanteenTagsReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListAvailableCanteenTags not implemented")
}
-func (UnimplementedCampusServer) GetBuilding2Gps(context.Context, *emptypb.Empty) (*GetBuilding2GpsReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetBuilding2Gps not implemented")
+func (UnimplementedCampusServer) ListCanteens(context.Context, *ListCanteensRequest) (*ListCanteensReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListCanteens not implemented")
}
-func (UnimplementedCampusServer) GetAreaFacilitiesByBuildingNr(context.Context, *GetAreaFacilitiesByBuildingNrRequest) (*GetAreaFacilitiesByBuildingNrReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetAreaFacilitiesByBuildingNr not implemented")
+func (UnimplementedCampusServer) ListDishes(context.Context, *ListDishesRequest) (*ListDishesReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListDishes not implemented")
}
-func (UnimplementedCampusServer) GetListOfToilets(context.Context, *emptypb.Empty) (*GetListOfToiletsReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetListOfToilets not implemented")
+func (UnimplementedCampusServer) ListResponsiblePerson(context.Context, *ListResponsiblePersonRequest) (*ListResponsiblePersonReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListResponsiblePerson not implemented")
}
-func (UnimplementedCampusServer) GetListOfElevators(context.Context, *emptypb.Empty) (*GetListOfElevatorsReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetListOfElevators not implemented")
+func (UnimplementedCampusServer) ListMoreInformation(context.Context, *ListMoreInformationRequest) (*ListMoreInformationReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListMoreInformation not implemented")
}
-func (UnimplementedCampusServer) GetMoreInformation(context.Context, *emptypb.Empty) (*GetMoreInformationReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetMoreInformation not implemented")
-}
-func (UnimplementedCampusServer) GetOpeningTimes(context.Context, *GetOpeningTimesRequest) (*GetOpeningTimesReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetOpeningTimes not implemented")
+func (UnimplementedCampusServer) ListOpeningTimes(context.Context, *ListOpeningTimesRequest) (*ListOpeningTimesReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListOpeningTimes not implemented")
}
func (UnimplementedCampusServer) GetUpdateNote(context.Context, *GetUpdateNoteRequest) (*GetUpdateNoteReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUpdateNote not implemented")
}
-func (UnimplementedCampusServer) GetStudyRoomList(context.Context, *emptypb.Empty) (*GetStudyRoomListReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetStudyRoomList not implemented")
-}
-func (UnimplementedCampusServer) GetKino(context.Context, *GetKinoRequest) (*GetKinoReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetKino not implemented")
+func (UnimplementedCampusServer) ListStudyRooms(context.Context, *ListStudyRoomsRequest) (*ListStudyRoomsReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListStudyRooms not implemented")
}
-func (UnimplementedCampusServer) SendFeedback(context.Context, *SendFeedbackRequest) (*SendFeedbackImageReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method SendFeedback not implemented")
+func (UnimplementedCampusServer) ListMovies(context.Context, *ListMoviesRequest) (*ListMoviesReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListMovies not implemented")
}
-func (UnimplementedCampusServer) SendFeedbackImage(context.Context, *SendFeedbackImageRequest) (*SendFeedbackImageReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method SendFeedbackImage not implemented")
+func (UnimplementedCampusServer) CreateFeedback(Campus_CreateFeedbackServer) error {
+ return status.Errorf(codes.Unimplemented, "method CreateFeedback not implemented")
}
func (UnimplementedCampusServer) GetUploadStatus(context.Context, *GetUploadStatusRequest) (*GetUploadStatusReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUploadStatus not implemented")
}
-func (UnimplementedCampusServer) GetNotification(context.Context, *NotificationsRequest) (*GetNotificationsReply, error) {
+func (UnimplementedCampusServer) GetNotification(context.Context, *GetNotificationRequest) (*GetNotificationReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetNotification not implemented")
}
-func (UnimplementedCampusServer) GetNotificationConfirm(context.Context, *NotificationsRequest) (*GetNotificationsConfirmReply, error) {
+func (UnimplementedCampusServer) GetNotificationConfirm(context.Context, *GetNotificationConfirmRequest) (*GetNotificationConfirmReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetNotificationConfirm not implemented")
}
-func (UnimplementedCampusServer) GetMembers(context.Context, *GetMembersRequest) (*GetMembersReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetMembers not implemented")
+func (UnimplementedCampusServer) GetMember(context.Context, *GetMemberRequest) (*GetMemberReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetMember not implemented")
}
func (UnimplementedCampusServer) GetCanteenHeadCount(context.Context, *GetCanteenHeadCountRequest) (*GetCanteenHeadCountReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCanteenHeadCount not implemented")
@@ -592,11 +494,11 @@ func (UnimplementedCampusServer) GetCanteenHeadCount(context.Context, *GetCantee
func (UnimplementedCampusServer) IOSDeviceRequestResponse(context.Context, *IOSDeviceRequestResponseRequest) (*IOSDeviceRequestResponseReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method IOSDeviceRequestResponse not implemented")
}
-func (UnimplementedCampusServer) RegisterDevice(context.Context, *RegisterDeviceRequest) (*RegisterDeviceReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RegisterDevice not implemented")
+func (UnimplementedCampusServer) CreateDevice(context.Context, *CreateDeviceRequest) (*CreateDeviceReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateDevice not implemented")
}
-func (UnimplementedCampusServer) RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceReply, error) {
- return nil, status.Errorf(codes.Unimplemented, "method RemoveDevice not implemented")
+func (UnimplementedCampusServer) DeleteDevice(context.Context, *DeleteDeviceRequest) (*DeleteDeviceReply, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteDevice not implemented")
}
func (UnimplementedCampusServer) mustEmbedUnimplementedCampusServer() {}
@@ -611,152 +513,98 @@ func RegisterCampusServer(s grpc.ServiceRegistrar, srv CampusServer) {
s.RegisterService(&Campus_ServiceDesc, srv)
}
-func _Campus_GetTopNews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CampusServer).GetTopNews(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Campus_GetTopNews_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetTopNews(ctx, req.(*emptypb.Empty))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Campus_GetNewsSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CampusServer).GetNewsSources(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Campus_GetNewsSources_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetNewsSources(ctx, req.(*emptypb.Empty))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Campus_SearchRooms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SearchRoomsRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CampusServer).SearchRooms(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Campus_SearchRooms_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).SearchRooms(ctx, req.(*SearchRoomsRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Campus_GetLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetLocationsRequest)
+func _Campus_ListNewsAlerts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListNewsAlertsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetLocations(ctx, in)
+ return srv.(CampusServer).ListNewsAlerts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetLocations_FullMethodName,
+ FullMethod: Campus_ListNewsAlerts_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetLocations(ctx, req.(*GetLocationsRequest))
+ return srv.(CampusServer).ListNewsAlerts(ctx, req.(*ListNewsAlertsRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetRoomMaps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetRoomMapsRequest)
+func _Campus_ListNewsSources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListNewsSourcesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetRoomMaps(ctx, in)
+ return srv.(CampusServer).ListNewsSources(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetRoomMaps_FullMethodName,
+ FullMethod: Campus_ListNewsSources_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetRoomMaps(ctx, req.(*GetRoomMapsRequest))
+ return srv.(CampusServer).ListNewsSources(ctx, req.(*ListNewsSourcesRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetRoomCoordinates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetRoomCoordinatesRequest)
+func _Campus_ListNews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListNewsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetRoomCoordinates(ctx, in)
+ return srv.(CampusServer).ListNews(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetRoomCoordinates_FullMethodName,
+ FullMethod: Campus_ListNews_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetRoomCoordinates(ctx, req.(*GetRoomCoordinatesRequest))
+ return srv.(CampusServer).ListNews(ctx, req.(*ListNewsRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetRoomSchedule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetRoomScheduleRequest)
+func _Campus_SearchRooms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(SearchRoomsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetRoomSchedule(ctx, in)
+ return srv.(CampusServer).SearchRooms(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetRoomSchedule_FullMethodName,
+ FullMethod: Campus_SearchRooms_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetRoomSchedule(ctx, req.(*GetRoomScheduleRequest))
+ return srv.(CampusServer).SearchRooms(ctx, req.(*SearchRoomsRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetCafeteriaRatings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(CafeteriaRatingRequest)
+func _Campus_ListCanteenRatings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListCanteenRatingsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetCafeteriaRatings(ctx, in)
+ return srv.(CampusServer).ListCanteenRatings(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetCafeteriaRatings_FullMethodName,
+ FullMethod: Campus_ListCanteenRatings_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetCafeteriaRatings(ctx, req.(*CafeteriaRatingRequest))
+ return srv.(CampusServer).ListCanteenRatings(ctx, req.(*ListCanteenRatingsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Campus_GetDishRatings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DishRatingRequest)
+ in := new(GetDishRatingsRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -768,351 +616,269 @@ func _Campus_GetDishRatings_Handler(srv interface{}, ctx context.Context, dec fu
FullMethod: Campus_GetDishRatings_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetDishRatings(ctx, req.(*DishRatingRequest))
- }
- return interceptor(ctx, in, info, handler)
-}
-
-func _Campus_NewCafeteriaRating_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(NewCafeteriaRatingRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CampusServer).NewCafeteriaRating(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Campus_NewCafeteriaRating_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).NewCafeteriaRating(ctx, req.(*NewCafeteriaRatingRequest))
+ return srv.(CampusServer).GetDishRatings(ctx, req.(*GetDishRatingsRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_NewDishRating_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(NewDishRatingRequest)
+func _Campus_CreateCanteenRating_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateCanteenRatingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).NewDishRating(ctx, in)
+ return srv.(CampusServer).CreateCanteenRating(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_NewDishRating_FullMethodName,
+ FullMethod: Campus_CreateCanteenRating_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).NewDishRating(ctx, req.(*NewDishRatingRequest))
+ return srv.(CampusServer).CreateCanteenRating(ctx, req.(*CreateCanteenRatingRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetAvailableDishTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
+func _Campus_CreateDishRating_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateDishRatingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetAvailableDishTags(ctx, in)
+ return srv.(CampusServer).CreateDishRating(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetAvailableDishTags_FullMethodName,
+ FullMethod: Campus_CreateDishRating_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetAvailableDishTags(ctx, req.(*emptypb.Empty))
+ return srv.(CampusServer).CreateDishRating(ctx, req.(*CreateDishRatingRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetNameTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
+func _Campus_ListAvailableDishTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListAvailableDishTagsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetNameTags(ctx, in)
+ return srv.(CampusServer).ListAvailableDishTags(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetNameTags_FullMethodName,
+ FullMethod: Campus_ListAvailableDishTags_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetNameTags(ctx, req.(*emptypb.Empty))
+ return srv.(CampusServer).ListAvailableDishTags(ctx, req.(*ListAvailableDishTagsRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetAvailableCafeteriaTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
+func _Campus_ListNameTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListNameTagsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetAvailableCafeteriaTags(ctx, in)
+ return srv.(CampusServer).ListNameTags(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetAvailableCafeteriaTags_FullMethodName,
+ FullMethod: Campus_ListNameTags_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetAvailableCafeteriaTags(ctx, req.(*emptypb.Empty))
+ return srv.(CampusServer).ListNameTags(ctx, req.(*ListNameTagsRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetCafeterias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
+func _Campus_ListAvailableCanteenTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListAvailableCanteenTagsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetCafeterias(ctx, in)
+ return srv.(CampusServer).ListAvailableCanteenTags(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetCafeterias_FullMethodName,
+ FullMethod: Campus_ListAvailableCanteenTags_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetCafeterias(ctx, req.(*emptypb.Empty))
+ return srv.(CampusServer).ListAvailableCanteenTags(ctx, req.(*ListAvailableCanteenTagsRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetDishes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetDishesRequest)
+func _Campus_ListCanteens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListCanteensRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetDishes(ctx, in)
+ return srv.(CampusServer).ListCanteens(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetDishes_FullMethodName,
+ FullMethod: Campus_ListCanteens_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetDishes(ctx, req.(*GetDishesRequest))
+ return srv.(CampusServer).ListCanteens(ctx, req.(*ListCanteensRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetResponsiblePerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
+func _Campus_ListDishes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListDishesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetResponsiblePerson(ctx, in)
+ return srv.(CampusServer).ListDishes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetResponsiblePerson_FullMethodName,
+ FullMethod: Campus_ListDishes_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetResponsiblePerson(ctx, req.(*emptypb.Empty))
+ return srv.(CampusServer).ListDishes(ctx, req.(*ListDishesRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetBuilding2Gps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
+func _Campus_ListResponsiblePerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListResponsiblePersonRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetBuilding2Gps(ctx, in)
+ return srv.(CampusServer).ListResponsiblePerson(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetBuilding2Gps_FullMethodName,
+ FullMethod: Campus_ListResponsiblePerson_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetBuilding2Gps(ctx, req.(*emptypb.Empty))
+ return srv.(CampusServer).ListResponsiblePerson(ctx, req.(*ListResponsiblePersonRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetAreaFacilitiesByBuildingNr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetAreaFacilitiesByBuildingNrRequest)
+func _Campus_ListMoreInformation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListMoreInformationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetAreaFacilitiesByBuildingNr(ctx, in)
+ return srv.(CampusServer).ListMoreInformation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetAreaFacilitiesByBuildingNr_FullMethodName,
+ FullMethod: Campus_ListMoreInformation_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetAreaFacilitiesByBuildingNr(ctx, req.(*GetAreaFacilitiesByBuildingNrRequest))
+ return srv.(CampusServer).ListMoreInformation(ctx, req.(*ListMoreInformationRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetListOfToilets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
+func _Campus_ListOpeningTimes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListOpeningTimesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetListOfToilets(ctx, in)
+ return srv.(CampusServer).ListOpeningTimes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetListOfToilets_FullMethodName,
+ FullMethod: Campus_ListOpeningTimes_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetListOfToilets(ctx, req.(*emptypb.Empty))
+ return srv.(CampusServer).ListOpeningTimes(ctx, req.(*ListOpeningTimesRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetListOfElevators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
+func _Campus_GetUpdateNote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetUpdateNoteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetListOfElevators(ctx, in)
+ return srv.(CampusServer).GetUpdateNote(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetListOfElevators_FullMethodName,
+ FullMethod: Campus_GetUpdateNote_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetListOfElevators(ctx, req.(*emptypb.Empty))
+ return srv.(CampusServer).GetUpdateNote(ctx, req.(*GetUpdateNoteRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetMoreInformation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
+func _Campus_ListStudyRooms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListStudyRoomsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetMoreInformation(ctx, in)
+ return srv.(CampusServer).ListStudyRooms(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetMoreInformation_FullMethodName,
+ FullMethod: Campus_ListStudyRooms_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetMoreInformation(ctx, req.(*emptypb.Empty))
+ return srv.(CampusServer).ListStudyRooms(ctx, req.(*ListStudyRoomsRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetOpeningTimes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetOpeningTimesRequest)
+func _Campus_ListMovies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListMoviesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetOpeningTimes(ctx, in)
+ return srv.(CampusServer).ListMovies(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetOpeningTimes_FullMethodName,
+ FullMethod: Campus_ListMovies_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetOpeningTimes(ctx, req.(*GetOpeningTimesRequest))
+ return srv.(CampusServer).ListMovies(ctx, req.(*ListMoviesRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetUpdateNote_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetUpdateNoteRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CampusServer).GetUpdateNote(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Campus_GetUpdateNote_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetUpdateNote(ctx, req.(*GetUpdateNoteRequest))
- }
- return interceptor(ctx, in, info, handler)
+func _Campus_CreateFeedback_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(CampusServer).CreateFeedback(&campusCreateFeedbackServer{stream})
}
-func _Campus_GetStudyRoomList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(emptypb.Empty)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CampusServer).GetStudyRoomList(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Campus_GetStudyRoomList_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetStudyRoomList(ctx, req.(*emptypb.Empty))
- }
- return interceptor(ctx, in, info, handler)
+type Campus_CreateFeedbackServer interface {
+ SendAndClose(*CreateFeedbackReply) error
+ Recv() (*CreateFeedbackRequest, error)
+ grpc.ServerStream
}
-func _Campus_GetKino_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetKinoRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CampusServer).GetKino(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Campus_GetKino_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetKino(ctx, req.(*GetKinoRequest))
- }
- return interceptor(ctx, in, info, handler)
+type campusCreateFeedbackServer struct {
+ grpc.ServerStream
}
-func _Campus_SendFeedback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SendFeedbackRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(CampusServer).SendFeedback(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Campus_SendFeedback_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).SendFeedback(ctx, req.(*SendFeedbackRequest))
- }
- return interceptor(ctx, in, info, handler)
+func (x *campusCreateFeedbackServer) SendAndClose(m *CreateFeedbackReply) error {
+ return x.ServerStream.SendMsg(m)
}
-func _Campus_SendFeedbackImage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(SendFeedbackImageRequest)
- if err := dec(in); err != nil {
+func (x *campusCreateFeedbackServer) Recv() (*CreateFeedbackRequest, error) {
+ m := new(CreateFeedbackRequest)
+ if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
- if interceptor == nil {
- return srv.(CampusServer).SendFeedbackImage(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Campus_SendFeedbackImage_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).SendFeedbackImage(ctx, req.(*SendFeedbackImageRequest))
- }
- return interceptor(ctx, in, info, handler)
+ return m, nil
}
func _Campus_GetUploadStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -1134,7 +900,7 @@ func _Campus_GetUploadStatus_Handler(srv interface{}, ctx context.Context, dec f
}
func _Campus_GetNotification_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(NotificationsRequest)
+ in := new(GetNotificationRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -1146,13 +912,13 @@ func _Campus_GetNotification_Handler(srv interface{}, ctx context.Context, dec f
FullMethod: Campus_GetNotification_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetNotification(ctx, req.(*NotificationsRequest))
+ return srv.(CampusServer).GetNotification(ctx, req.(*GetNotificationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Campus_GetNotificationConfirm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(NotificationsRequest)
+ in := new(GetNotificationConfirmRequest)
if err := dec(in); err != nil {
return nil, err
}
@@ -1164,25 +930,25 @@ func _Campus_GetNotificationConfirm_Handler(srv interface{}, ctx context.Context
FullMethod: Campus_GetNotificationConfirm_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetNotificationConfirm(ctx, req.(*NotificationsRequest))
+ return srv.(CampusServer).GetNotificationConfirm(ctx, req.(*GetNotificationConfirmRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_GetMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(GetMembersRequest)
+func _Campus_GetMember_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetMemberRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).GetMembers(ctx, in)
+ return srv.(CampusServer).GetMember(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_GetMembers_FullMethodName,
+ FullMethod: Campus_GetMember_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).GetMembers(ctx, req.(*GetMembersRequest))
+ return srv.(CampusServer).GetMember(ctx, req.(*GetMemberRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -1223,38 +989,38 @@ func _Campus_IOSDeviceRequestResponse_Handler(srv interface{}, ctx context.Conte
return interceptor(ctx, in, info, handler)
}
-func _Campus_RegisterDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(RegisterDeviceRequest)
+func _Campus_CreateDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).RegisterDevice(ctx, in)
+ return srv.(CampusServer).CreateDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_RegisterDevice_FullMethodName,
+ FullMethod: Campus_CreateDevice_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).RegisterDevice(ctx, req.(*RegisterDeviceRequest))
+ return srv.(CampusServer).CreateDevice(ctx, req.(*CreateDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
-func _Campus_RemoveDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(RemoveDeviceRequest)
+func _Campus_DeleteDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
- return srv.(CampusServer).RemoveDevice(ctx, in)
+ return srv.(CampusServer).DeleteDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: Campus_RemoveDevice_FullMethodName,
+ FullMethod: Campus_DeleteDevice_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(CampusServer).RemoveDevice(ctx, req.(*RemoveDeviceRequest))
+ return srv.(CampusServer).DeleteDevice(ctx, req.(*DeleteDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -1267,116 +1033,80 @@ var Campus_ServiceDesc = grpc.ServiceDesc{
HandlerType: (*CampusServer)(nil),
Methods: []grpc.MethodDesc{
{
- MethodName: "GetTopNews",
- Handler: _Campus_GetTopNews_Handler,
- },
- {
- MethodName: "GetNewsSources",
- Handler: _Campus_GetNewsSources_Handler,
- },
- {
- MethodName: "SearchRooms",
- Handler: _Campus_SearchRooms_Handler,
+ MethodName: "ListNewsAlerts",
+ Handler: _Campus_ListNewsAlerts_Handler,
},
{
- MethodName: "GetLocations",
- Handler: _Campus_GetLocations_Handler,
+ MethodName: "ListNewsSources",
+ Handler: _Campus_ListNewsSources_Handler,
},
{
- MethodName: "GetRoomMaps",
- Handler: _Campus_GetRoomMaps_Handler,
+ MethodName: "ListNews",
+ Handler: _Campus_ListNews_Handler,
},
{
- MethodName: "GetRoomCoordinates",
- Handler: _Campus_GetRoomCoordinates_Handler,
- },
- {
- MethodName: "GetRoomSchedule",
- Handler: _Campus_GetRoomSchedule_Handler,
+ MethodName: "SearchRooms",
+ Handler: _Campus_SearchRooms_Handler,
},
{
- MethodName: "GetCafeteriaRatings",
- Handler: _Campus_GetCafeteriaRatings_Handler,
+ MethodName: "ListCanteenRatings",
+ Handler: _Campus_ListCanteenRatings_Handler,
},
{
MethodName: "GetDishRatings",
Handler: _Campus_GetDishRatings_Handler,
},
{
- MethodName: "NewCafeteriaRating",
- Handler: _Campus_NewCafeteriaRating_Handler,
- },
- {
- MethodName: "NewDishRating",
- Handler: _Campus_NewDishRating_Handler,
+ MethodName: "CreateCanteenRating",
+ Handler: _Campus_CreateCanteenRating_Handler,
},
{
- MethodName: "GetAvailableDishTags",
- Handler: _Campus_GetAvailableDishTags_Handler,
+ MethodName: "CreateDishRating",
+ Handler: _Campus_CreateDishRating_Handler,
},
{
- MethodName: "GetNameTags",
- Handler: _Campus_GetNameTags_Handler,
+ MethodName: "ListAvailableDishTags",
+ Handler: _Campus_ListAvailableDishTags_Handler,
},
{
- MethodName: "GetAvailableCafeteriaTags",
- Handler: _Campus_GetAvailableCafeteriaTags_Handler,
+ MethodName: "ListNameTags",
+ Handler: _Campus_ListNameTags_Handler,
},
{
- MethodName: "GetCafeterias",
- Handler: _Campus_GetCafeterias_Handler,
+ MethodName: "ListAvailableCanteenTags",
+ Handler: _Campus_ListAvailableCanteenTags_Handler,
},
{
- MethodName: "GetDishes",
- Handler: _Campus_GetDishes_Handler,
+ MethodName: "ListCanteens",
+ Handler: _Campus_ListCanteens_Handler,
},
{
- MethodName: "GetResponsiblePerson",
- Handler: _Campus_GetResponsiblePerson_Handler,
+ MethodName: "ListDishes",
+ Handler: _Campus_ListDishes_Handler,
},
{
- MethodName: "GetBuilding2Gps",
- Handler: _Campus_GetBuilding2Gps_Handler,
+ MethodName: "ListResponsiblePerson",
+ Handler: _Campus_ListResponsiblePerson_Handler,
},
{
- MethodName: "GetAreaFacilitiesByBuildingNr",
- Handler: _Campus_GetAreaFacilitiesByBuildingNr_Handler,
+ MethodName: "ListMoreInformation",
+ Handler: _Campus_ListMoreInformation_Handler,
},
{
- MethodName: "GetListOfToilets",
- Handler: _Campus_GetListOfToilets_Handler,
- },
- {
- MethodName: "GetListOfElevators",
- Handler: _Campus_GetListOfElevators_Handler,
- },
- {
- MethodName: "GetMoreInformation",
- Handler: _Campus_GetMoreInformation_Handler,
- },
- {
- MethodName: "GetOpeningTimes",
- Handler: _Campus_GetOpeningTimes_Handler,
+ MethodName: "ListOpeningTimes",
+ Handler: _Campus_ListOpeningTimes_Handler,
},
{
MethodName: "GetUpdateNote",
Handler: _Campus_GetUpdateNote_Handler,
},
{
- MethodName: "GetStudyRoomList",
- Handler: _Campus_GetStudyRoomList_Handler,
+ MethodName: "ListStudyRooms",
+ Handler: _Campus_ListStudyRooms_Handler,
},
{
- MethodName: "GetKino",
- Handler: _Campus_GetKino_Handler,
- },
- {
- MethodName: "SendFeedback",
- Handler: _Campus_SendFeedback_Handler,
- },
- {
- MethodName: "SendFeedbackImage",
- Handler: _Campus_SendFeedbackImage_Handler,
+ MethodName: "ListMovies",
+ Handler: _Campus_ListMovies_Handler,
},
{
MethodName: "GetUploadStatus",
@@ -1391,8 +1121,8 @@ var Campus_ServiceDesc = grpc.ServiceDesc{
Handler: _Campus_GetNotificationConfirm_Handler,
},
{
- MethodName: "GetMembers",
- Handler: _Campus_GetMembers_Handler,
+ MethodName: "GetMember",
+ Handler: _Campus_GetMember_Handler,
},
{
MethodName: "GetCanteenHeadCount",
@@ -1403,14 +1133,20 @@ var Campus_ServiceDesc = grpc.ServiceDesc{
Handler: _Campus_IOSDeviceRequestResponse_Handler,
},
{
- MethodName: "RegisterDevice",
- Handler: _Campus_RegisterDevice_Handler,
+ MethodName: "CreateDevice",
+ Handler: _Campus_CreateDevice_Handler,
},
{
- MethodName: "RemoveDevice",
- Handler: _Campus_RemoveDevice_Handler,
+ MethodName: "DeleteDevice",
+ Handler: _Campus_DeleteDevice_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "CreateFeedback",
+ Handler: _Campus_CreateFeedback_Handler,
+ ClientStreams: true,
},
},
- Streams: []grpc.StreamDesc{},
Metadata: "tumdev/campus_backend.proto",
}
diff --git a/server/backend/cafeteriaService.go b/server/backend/cafeteria.go
similarity index 65%
rename from server/backend/cafeteriaService.go
rename to server/backend/cafeteria.go
index 9b1bb4c9..6f3e57c7 100644
--- a/server/backend/cafeteriaService.go
+++ b/server/backend/cafeteria.go
@@ -21,18 +21,17 @@ import (
log "github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
- "google.golang.org/protobuf/types/known/emptypb"
"google.golang.org/protobuf/types/known/timestamppb"
"gorm.io/gorm"
)
-type modelType int
+type ModelType int
// Used to differentiate between the type of the model for different queries to reduce duplicated code.
const (
- DISH modelType = 1
- CAFETERIA modelType = 2
- NAME modelType = 3
+ DISH ModelType = 1
+ CAFETERIA ModelType = 2
+ NAME ModelType = 3
)
// GetCafeteriaRatings RPC Endpoint
@@ -42,32 +41,30 @@ const (
// The parameter limit defines how many actual ratings should be returned.
// The optional parameters from and to can define an interval in which the queried ratings have been stored.
// If these aren't specified, the newest ratings will be returned as the default
-func (s *CampusServer) GetCafeteriaRatings(_ context.Context, input *pb.CafeteriaRatingRequest) (*pb.CafeteriaRatingReply, error) {
+func (s *CampusServer) GetCafeteriaRatings(ctx context.Context, input *pb.ListCanteenRatingsRequest) (*pb.ListCanteenRatingsReply, error) {
var result model.CafeteriaRatingAverage //get the average rating for this specific cafeteria
- cafeteriaId := getIDForCafeteriaName(input.CafeteriaId, s.db)
- res := s.db.Model(&model.CafeteriaRatingAverage{}).
- Where("cafeteriaId = ?", cafeteriaId).
- First(&result)
+ tx := s.db.WithContext(ctx)
+ cafeteriaId := getIDForCafeteriaName(input.CanteenId, tx)
+ res := tx.First(&result, "cafeteriaId = ?", cafeteriaId)
if res.Error != nil {
log.WithError(res.Error).Error("Error while querying the cafeteria with Id ", cafeteriaId)
return nil, status.Error(codes.Internal, "This cafeteria has not yet been rated.")
}
-
if res.RowsAffected > 0 {
- ratings := queryLastCafeteriaRatingsWithLimit(input, cafeteriaId, s)
- cafeteriaTags := queryTags(s.db, cafeteriaId, -1, CAFETERIA)
-
- return &pb.CafeteriaRatingReply{
- Avg: float64(result.Average),
- Std: float64(result.Std),
- Min: int32(result.Min),
- Max: int32(result.Max),
+ ratings := queryLastCafeteriaRatingsWithLimit(input, cafeteriaId, tx)
+ cafeteriaTags := queryTags(cafeteriaId, -1, CAFETERIA, tx)
+
+ return &pb.ListCanteenRatingsReply{
+ Avg: result.Average,
+ Std: result.Std,
+ Min: result.Min,
+ Max: result.Max,
Rating: ratings,
RatingTags: cafeteriaTags,
}, nil
} else {
- return &pb.CafeteriaRatingReply{
+ return &pb.ListCanteenRatingsReply{
Avg: -1,
Std: -1,
Min: -1,
@@ -78,7 +75,7 @@ func (s *CampusServer) GetCafeteriaRatings(_ context.Context, input *pb.Cafeteri
// queryLastCafeteriaRatingsWithLimit
// Queries the actual ratings for a cafeteria and attaches the tag ratings which belong to the ratings
-func queryLastCafeteriaRatingsWithLimit(input *pb.CafeteriaRatingRequest, cafeteriaID int32, s *CampusServer) []*pb.SingleRatingReply {
+func queryLastCafeteriaRatingsWithLimit(input *pb.ListCanteenRatingsRequest, cafeteriaID int32, tx *gorm.DB) []*pb.SingleRatingReply {
var ratings []model.CafeteriaRating
var err error
@@ -102,17 +99,14 @@ func queryLastCafeteriaRatingsWithLimit(input *pb.CafeteriaRatingRequest, cafete
} else {
to = input.To.AsTime()
}
- err = s.db.Model(&model.CafeteriaRating{}).
- Where("cafeteriaID = ? AND timestamp < ? AND timestamp > ?", cafeteriaID, to, from).
+ err = tx.
Order("timestamp desc, cafeteriaRating desc").
Limit(limit).
- Find(&ratings).Error
+ Find(&ratings, "cafeteriaID = ? AND timestamp < ? AND timestamp > ?", cafeteriaID, to, from).Error
} else {
- err = s.db.Model(&model.CafeteriaRating{}).
- Where("cafeteriaID = ?", cafeteriaID).
- Order("timestamp desc, cafeteriaRating desc").
+ err = tx.Order("timestamp desc, cafeteriaRating desc").
Limit(limit).
- Find(&ratings).Error
+ Find(&ratings, "cafeteriaID = ?", cafeteriaID).Error
}
if err != nil {
@@ -123,7 +117,7 @@ func queryLastCafeteriaRatingsWithLimit(input *pb.CafeteriaRatingRequest, cafete
for i, v := range ratings {
- tagRatings := queryTagRatingsOverviewForRating(s, v.CafeteriaRating, CAFETERIA)
+ tagRatings := queryTagRatingsOverviewForRating(v.CafeteriaRating, CAFETERIA, tx)
ratingResults[i] = &pb.SingleRatingReply{
Points: v.Points,
Comment: v.Comment,
@@ -146,37 +140,36 @@ func queryLastCafeteriaRatingsWithLimit(input *pb.CafeteriaRatingRequest, cafete
// The parameter limit defines how many actual ratings should be returned.
// The optional parameters from and to can define a interval in which the queried ratings have been stored.
// If these aren't specified, the newest ratings will be returned as the default
-func (s *CampusServer) GetDishRatings(_ context.Context, input *pb.DishRatingRequest) (*pb.DishRatingReply, error) {
+func (s *CampusServer) GetDishRatings(ctx context.Context, input *pb.GetDishRatingsRequest) (*pb.GetDishRatingsReply, error) {
var result model.DishRatingAverage //get the average rating for this specific dish
- cafeteriaID := getIDForCafeteriaName(input.CafeteriaId, s.db)
- dishID := getIDForDishName(input.Dish, cafeteriaID, s.db)
+ tx := s.db.WithContext(ctx)
+ cafeteriaID := getIDForCafeteriaName(input.CanteenId, tx)
+ dishID := getIDForDishName(input.Dish, cafeteriaID, tx)
- err := s.db.Model(&model.DishRatingAverage{}).
- Where("cafeteriaID = ? AND dishID = ?", cafeteriaID, dishID).
- First(&result)
+ res := tx.First(&result, "cafeteriaID = ? AND dishID = ?", cafeteriaID, dishID)
- if err.Error != nil {
+ if res.Error != nil {
fields := log.Fields{"dishID": dishID, "cafeteriaID": cafeteriaID}
- log.WithError(err.Error).WithFields(fields).Error("Error while querying the average ratings")
+ log.WithError(res.Error).WithFields(fields).Error("Error while querying the average ratings")
return nil, status.Error(codes.Internal, "This dish has not yet been rated.")
}
- if err.RowsAffected > 0 {
- ratings := queryLastDishRatingsWithLimit(input, cafeteriaID, dishID, s)
- dishTags := queryTags(s.db, cafeteriaID, dishID, DISH)
- nameTags := queryTags(s.db, cafeteriaID, dishID, NAME)
-
- return &pb.DishRatingReply{
- Avg: float64(result.Average),
- Std: float64(result.Std),
- Min: int32(result.Min),
- Max: int32(result.Max),
+ if res.RowsAffected > 0 {
+ ratings := queryLastDishRatingsWithLimit(input, cafeteriaID, dishID, tx)
+ dishTags := queryTags(cafeteriaID, dishID, DISH, tx)
+ nameTags := queryTags(cafeteriaID, dishID, NAME, tx)
+
+ return &pb.GetDishRatingsReply{
+ Avg: result.Average,
+ Std: result.Std,
+ Min: result.Min,
+ Max: result.Max,
Rating: ratings,
RatingTags: dishTags,
NameTags: nameTags,
}, nil
} else {
- return &pb.DishRatingReply{
+ return &pb.GetDishRatingsReply{
Avg: -1,
Min: -1,
Max: -1,
@@ -188,7 +181,7 @@ func (s *CampusServer) GetDishRatings(_ context.Context, input *pb.DishRatingReq
// queryLastDishRatingsWithLimit
// Queries the actual ratings for a dish in a cafeteria and attaches the tag ratings which belong to the ratings
-func queryLastDishRatingsWithLimit(input *pb.DishRatingRequest, cafeteriaID int32, dishID int32, s *CampusServer) []*pb.SingleRatingReply {
+func queryLastDishRatingsWithLimit(input *pb.GetDishRatingsRequest, cafeteriaID int32, dishID int32, tx *gorm.DB) []*pb.SingleRatingReply {
var ratings []model.DishRating
var err error
var limit = int(input.Limit)
@@ -211,17 +204,13 @@ func queryLastDishRatingsWithLimit(input *pb.DishRatingRequest, cafeteriaID int3
to = input.To.AsTime()
}
- err = s.db.Model(&model.DishRating{}).
- Where("cafeteriaID = ? AND dishID = ? AND timestamp < ? AND timestamp > ?", cafeteriaID, dishID, to, from).
- Order("timestamp desc, dishRating desc").
+ err = tx.Order("timestamp desc, dishRating desc").
Limit(limit).
- Find(&ratings).Error
+ Find(&ratings, "cafeteriaID = ? AND dishID = ? AND timestamp < ? AND timestamp > ?", cafeteriaID, dishID, to, from).Error
} else {
- err = s.db.Model(&model.DishRating{}).
- Where("cafeteriaID = ? AND dishID = ?", cafeteriaID, dishID).
- Order("timestamp desc, dishRating desc").
+ err = tx.Order("timestamp desc, dishRating desc").
Limit(limit).
- Find(&ratings).Error
+ Find(&ratings, "cafeteriaID = ? AND dishID = ?", cafeteriaID, dishID).Error
}
if err != nil {
@@ -234,7 +223,7 @@ func queryLastDishRatingsWithLimit(input *pb.DishRatingRequest, cafeteriaID int3
ratingResults[i] = &pb.SingleRatingReply{
Points: v.Points,
Comment: v.Comment,
- RatingTags: queryTagRatingsOverviewForRating(s, v.DishRating, DISH),
+ RatingTags: queryTagRatingsOverviewForRating(v.DishRating, DISH, tx),
Image: getImageToBytes(v.Image),
Visited: timestamppb.New(v.Timestamp),
}
@@ -283,25 +272,25 @@ type queryRatingTag struct {
// queryTags
// Queries the average ratings for either cafeteriaRatingTags, dishRatingTags or NameTags.
// Since the db only stores IDs in the results, the tags must be joined to retrieve their names form the rating_options tables.
-func queryTags(db *gorm.DB, cafeteriaID int32, dishID int32, ratingType modelType) []*pb.RatingTagResult {
+func queryTags(cafeteriaID int32, dishID int32, ratingType ModelType, tx *gorm.DB) []*pb.RatingTagResult {
var results []queryRatingTag
var err error
if ratingType == DISH {
- err = db.Table("dish_rating_tag_option options").
+ err = tx.Table("dish_rating_tag_option options").
Joins("JOIN dish_rating_tag_average results ON options.dishRatingTagOption = results.tagID").
Select("options.dishRatingTagOption as tagId, results.average as avg, "+
"results.min as min, results.max as max, results.std as std").
Where("results.cafeteriaID = ? AND results.dishID = ?", cafeteriaID, dishID).
Scan(&results).Error
} else if ratingType == CAFETERIA {
- err = db.Table("cafeteria_rating_tag_option options").
+ err = tx.Table("cafeteria_rating_tag_option options").
Joins("JOIN cafeteria_rating_tag_average results ON options.cafeteriaRatingTagOption = results.tagID").
Select("options.cafeteriaRatingTagOption as tagId, results.average as avg, "+
"results.min as min, results.max as max, results.std as std").
Where("results.cafeteriaID = ?", cafeteriaID).
Scan(&results).Error
} else { //Query for name tags
- err = db.Table("dish_to_dish_name_tag mapping").
+ err = tx.Table("dish_to_dish_name_tag mapping").
Where("mapping.dishID = ?", dishID).
Select("mapping.nameTagID as tag").
Joins("JOIN dish_name_tag_average results ON mapping.nameTagID = results.tagID").
@@ -332,16 +321,16 @@ func queryTags(db *gorm.DB, cafeteriaID int32, dishID int32, ratingType modelTyp
// queryTagRatingOverviewForRating
// Query all rating tags which belong to a specific rating given with an ID and return it as TagRatingOverviews
-func queryTagRatingsOverviewForRating(s *CampusServer, dishID int32, ratingType modelType) []*pb.RatingTagNewRequest {
+func queryTagRatingsOverviewForRating(dishID int64, ratingType ModelType, tx *gorm.DB) []*pb.RatingTagNewRequest {
var results []*pb.RatingTagNewRequest
var err error
if ratingType == DISH {
- err = s.db.Table("dish_rating_tag_option options").
+ err = tx.Table("dish_rating_tag_option options").
Joins("JOIN dish_rating_tag rating ON options.dishRatingTagOption = rating.tagID").
Select("dishRatingTagOption as tagId, points, parentRating").
Find(&results, "parentRating = ?", dishID).Error
} else {
- err = s.db.Table("cafeteria_rating_tag_option options").
+ err = tx.Table("cafeteria_rating_tag_option options").
Joins("JOIN cafeteria_rating_tag rating ON options.cafeteriaRatingTagOption = rating.tagID").
Select("cafeteriaRatingTagOption as tagId, points, correspondingRating").
Find(&results, "correspondingRating = ?", dishID).Error
@@ -353,13 +342,14 @@ func queryTagRatingsOverviewForRating(s *CampusServer, dishID int32, ratingType
return results
}
-// NewCafeteriaRating RPC Endpoint
+// CreateCanteenRating RPC Endpoint
// Allows to store a new cafeteria Rating.
// If one of the parameters is invalid, an error will be returned. Otherwise, the rating will be saved.
// All rating tags which were given with the new rating are stored if they are valid tags, if at least one tag was
// invalid, an error is returned, all valid ratings tags will be stored nevertheless. Either the german or the english name can be returned to successfully store tags
-func (s *CampusServer) NewCafeteriaRating(_ context.Context, input *pb.NewCafeteriaRatingRequest) (*emptypb.Empty, error) {
- cafeteriaID, errorRes := inputSanitizationForNewRatingElements(input.Points, input.Comment, input.CafeteriaId, s)
+func (s *CampusServer) CreateCanteenRating(ctx context.Context, input *pb.CreateCanteenRatingRequest) (*pb.CreateCanteenRatingReply, error) {
+ tx := s.db.WithContext(ctx)
+ cafeteriaID, errorRes := inputSanitizationForNewRatingElements(input.Points, input.Comment, input.CanteenId, tx)
if errorRes != nil {
return nil, errorRes
}
@@ -372,25 +362,25 @@ func (s *CampusServer) NewCafeteriaRating(_ context.Context, input *pb.NewCafete
Timestamp: time.Now(),
Image: resPath,
}
-
- if err := s.db.Model(&model.CafeteriaRating{}).Create(&rating).Error; err != nil {
+ if err := tx.Create(&rating).Error; err != nil {
log.WithError(err).Error("Error occurred while creating the new cafeteria rating.")
return nil, status.Error(codes.InvalidArgument, "Error while creating new cafeteria rating. Rating has not been saved.")
}
- return storeRatingTags(s, rating.CafeteriaRating, input.RatingTags, CAFETERIA)
+ if err := storeRatingTags(rating.CafeteriaRating, input.RatingTags, CAFETERIA, tx); err != nil {
+ return &pb.CreateCanteenRatingReply{}, err
+ }
+ return &pb.CreateCanteenRatingReply{}, nil
}
-func imageWrapper(image []byte, path string, id int32) string {
- var resPath = ""
- if len(image) > 0 {
- var resError error
- path := fmt.Sprintf("%s%s%s%d%s", "/Storage/rating/", path, "/", id, "/")
- resPath, resError = storeImage(path, image)
-
- if resError != nil {
- log.WithError(resError).Error("Error occurred while storing the image.")
- }
+func imageWrapper(image []byte, path string, id int64) string {
+ if len(image) == 0 {
+ return ""
+ }
+ path = fmt.Sprintf("/Storage/rating/%s/%d/", path, id)
+ resPath, err := storeImage(path, image)
+ if err != nil {
+ log.WithError(err).Error("Error occurred while storing the image.")
}
return resPath
}
@@ -409,20 +399,18 @@ func storeImage(path string, i []byte) (string, error) {
img, _, _ := image.Decode(bytes.NewReader(i))
resizedImage := imaging.Resize(img, 1280, 0, imaging.Lanczos)
- var opts jpeg.Options
+ quality := 100 // if image small enough use it directly
maxImageSize := 524288 // 0.55MB
if len(i) > maxImageSize {
- opts.Quality = (maxImageSize / len(i)) * 100
- } else {
- opts.Quality = 100 // if image small enough use it directly
+ quality = (maxImageSize / len(i)) * 100
}
var imgPath = fmt.Sprintf("%s%x.jpeg", path, md5.Sum(i))
- out, errFile := os.Create(imgPath)
- if errFile != nil {
- log.WithError(errFile).Error("Error while creating a new file on the path: ", path)
- return imgPath, errFile
+ out, err := os.Create(imgPath)
+ if err != nil {
+ log.WithError(err).Error("Error while creating a new file on the path: ", path)
+ return imgPath, err
}
defer func(out *os.File) {
if err := out.Close(); err != nil {
@@ -430,57 +418,56 @@ func storeImage(path string, i []byte) (string, error) {
}
}(out)
- errFile = jpeg.Encode(out, resizedImage, &opts)
- return imgPath, errFile
+ return imgPath, jpeg.Encode(out, resizedImage, &jpeg.Options{Quality: quality})
}
-// NewDishRating RPC Endpoint
+// CreateDishRating RPC Endpoint
// Allows to store a new dish Rating.
// If one of the parameters is invalid, an error will be returned. Otherwise, the rating will be saved.
// The ratingNumber will be saved for each corresponding DishNameTag.
// All rating tags which were given with the new rating are stored if they are valid tags, if at least one tag was
// invalid, an error is returned, all valid ratings tags will be stored nevertheless. Either the german or the english name can be returned to successfully store tags
-func (s *CampusServer) NewDishRating(_ context.Context, input *pb.NewDishRatingRequest) (*emptypb.Empty, error) {
-
- cafeteriaID, errorRes := inputSanitizationForNewRatingElements(input.Points, input.Comment, input.CafeteriaId, s)
+func (s *CampusServer) CreateDishRating(ctx context.Context, input *pb.CreateDishRatingRequest) (*pb.CreateDishRatingReply, error) {
+ tx := s.db.WithContext(ctx)
+ cafeteriaID, errorRes := inputSanitizationForNewRatingElements(input.Points, input.Comment, input.CanteenId, tx)
if errorRes != nil {
return nil, errorRes
}
- var dish *model.Dish
- errDish := s.db.Model(&model.Dish{}). //Dish must exist in the given mensa
- Where("name LIKE ? AND cafeteriaID = ?", input.Dish, cafeteriaID).
- First(&dish).Error
- if errDish != nil || dish == nil {
- log.WithError(errDish).Error("Error while creating a new dish rating.")
+ var dishInMensa *model.Dish
+ if err := tx.First(&dishInMensa, "name LIKE ? AND cafeteriaID = ?", input.Dish, cafeteriaID).Error; err != nil || dishInMensa == nil {
+ log.WithError(err).Error("Error while creating a new dishInMensa rating.")
return nil, status.Error(codes.InvalidArgument, "Dish is not offered in this week in this canteen. Rating has not been saved.")
}
- resPath := imageWrapper(input.Image, "dishes", dish.Dish)
+ resPath := imageWrapper(input.Image, "dishes", dishInMensa.Dish)
rating := model.DishRating{
Comment: input.Comment,
CafeteriaID: cafeteriaID,
- DishID: dish.Dish,
+ DishID: dishInMensa.Dish,
Points: input.Points,
Timestamp: time.Now(),
Image: resPath,
}
-
- if err := s.db.Model(&model.DishRating{}).Create(&rating).Error; err != nil {
- log.WithError(err).Error("while creating a new dish rating.")
+ if err := tx.Create(&rating).Error; err != nil {
+ log.WithError(err).Error("while creating a new dishInMensa rating.")
return nil, status.Error(codes.Internal, "Error while creating the new rating in the database. Rating has not been saved.")
}
- assignDishNameTag(s, rating, dish.Dish)
- return storeRatingTags(s, rating.DishRating, input.RatingTags, DISH)
+ assignDishNameTag(rating, dishInMensa.Dish, tx)
+
+ if err := storeRatingTags(rating.DishRating, input.RatingTags, DISH, tx); err != nil {
+ return &pb.CreateDishRatingReply{}, err
+ }
+ return &pb.CreateDishRatingReply{}, nil
}
// assignDishNameTag
// Query all name tags for this specific dish and generate the DishNameTag Ratings ffor each name tag
-func assignDishNameTag(s *CampusServer, rating model.DishRating, dishID int32) {
- var result []int
- err := s.db.Model(&model.DishToDishNameTag{}).
+func assignDishNameTag(rating model.DishRating, dishID int64, tx *gorm.DB) {
+ var result []int64
+ err := tx.Model(&model.DishToDishNameTag{}).
Where("dishID = ? ", dishID).
Select("nameTagID").
Scan(&result).Error
@@ -488,12 +475,11 @@ func assignDishNameTag(s *CampusServer, rating model.DishRating, dishID int32) {
log.WithError(err).Error("while loading the dishID for the given name.")
} else {
for _, tagID := range result {
- err := s.db.Model(&model.DishNameTag{}).Create(&model.DishNameTag{
+ if err := tx.Create(&model.DishNameTag{
CorrespondingRating: rating.DishRating,
Points: rating.Points,
TagNameID: tagID,
- }).Error
- if err != nil {
+ }).Error; err != nil {
log.WithError(err).Error("while creating a new dish name rating.")
}
}
@@ -502,9 +488,9 @@ func assignDishNameTag(s *CampusServer, rating model.DishRating, dishID int32) {
// inputSanitizationForNewRatingElements Checks parameters of the new rating for all cafeteria and dish ratings.
// Additionally, queries the cafeteria ID, since it checks whether the cafeteria actually exists.
-func inputSanitizationForNewRatingElements(rating int32, comment string, cafeteriaName string, s *CampusServer) (int32, error) {
+func inputSanitizationForNewRatingElements(rating int32, comment string, cafeteriaName string, tx *gorm.DB) (int64, error) {
if rating > 5 || rating < 0 {
- return -1, status.Error(codes.InvalidArgument, "Rating must be a positive number not larger than 10. Rating has not been saved.")
+ return -1, status.Error(codes.InvalidArgument, "Rating must be a positive number not larger than 5. Rating has not been saved.")
}
if len(comment) > 256 {
@@ -516,10 +502,7 @@ func inputSanitizationForNewRatingElements(rating int32, comment string, cafeter
}
var result *model.Cafeteria
- res := s.db.Model(&model.Cafeteria{}).
- Where("name LIKE ?", cafeteriaName).
- First(&result)
- if errors.Is(res.Error, gorm.ErrRecordNotFound) || res.RowsAffected == 0 {
+ if res := tx.First(&result, "name LIKE ?", cafeteriaName); errors.Is(res.Error, gorm.ErrRecordNotFound) || res.RowsAffected == 0 {
log.WithError(res.Error).Error("Error while querying the cafeteria id by name: ", cafeteriaName)
return -1, status.Error(codes.InvalidArgument, "Cafeteria does not exist. Rating has not been saved.")
}
@@ -530,27 +513,27 @@ func inputSanitizationForNewRatingElements(rating int32, comment string, cafeter
// storeRatingTags
// Checks whether the rating-tag name is a valid option and if so,
// it will be saved with a reference to the rating
-func storeRatingTags(s *CampusServer, parentRatingID int32, tags []*pb.RatingTag, tagType modelType) (*emptypb.Empty, error) {
+func storeRatingTags(parentRatingID int64, tags []*pb.RatingTag, tagType ModelType, tx *gorm.DB) error {
var errorOccurred = ""
var warningOccurred = ""
if len(tags) > 0 {
usedTagIds := make(map[int]int)
- insertModel := getModelStoreTag(tagType, s.db)
+ insertModel := getModelStoreTag(tagType, tx)
for _, currentTag := range tags {
var err error
var count int64
if tagType == DISH {
- err = s.db.Model(&model.DishRatingTagOption{}).
+ err = tx.Model(&model.DishRatingTagOption{}).
Where("dishRatingTagOption LIKE ?", currentTag.TagId).
Count(&count).Error
} else {
- err = s.db.Model(&model.CafeteriaRatingTagOption{}).
+ err = tx.Model(&model.CafeteriaRatingTagOption{}).
Where("cafeteriaRatingTagOption LIKE ?", currentTag.TagId).
Count(&count).Error
}
- if err == gorm.ErrRecordNotFound || count == 0 {
+ if errors.Is(err, gorm.ErrRecordNotFound) || count == 0 {
fields := log.Fields{
"tagid": currentTag.TagId,
"count": count,
@@ -563,7 +546,7 @@ func storeRatingTags(s *CampusServer, parentRatingID int32, tags []*pb.RatingTag
Create(&model.DishRatingTag{
CorrespondingRating: parentRatingID,
Points: int32(currentTag.Points),
- TagID: int(currentTag.TagId),
+ TagID: currentTag.TagId,
}).Error
if err != nil {
log.WithError(err).Error("while Creating a currentTag rating for a new rating.")
@@ -580,28 +563,28 @@ func storeRatingTags(s *CampusServer, parentRatingID int32, tags []*pb.RatingTag
}
if len(errorOccurred) > 0 && len(warningOccurred) > 0 {
- return &emptypb.Empty{}, status.Error(codes.InvalidArgument, fmt.Sprintf("The tag(s) %s does not exist. Remaining rating was saved without this rating tag. The tag(s) %s occurred more than once in this rating.", errorOccurred, warningOccurred))
+ return status.Error(codes.InvalidArgument, fmt.Sprintf("The tag(s) %s does not exist. Remaining rating was saved without this rating tag. The tag(s) %s occurred more than once in this rating.", errorOccurred, warningOccurred))
} else if len(errorOccurred) > 0 {
- return &emptypb.Empty{}, status.Error(codes.InvalidArgument, fmt.Sprintf("The tag(s) %s does not exist. Remaining rating was saved without this rating tag.", errorOccurred))
+ return status.Error(codes.InvalidArgument, fmt.Sprintf("The tag(s) %s does not exist. Remaining rating was saved without this rating tag.", errorOccurred))
} else if len(warningOccurred) > 0 {
- return &emptypb.Empty{}, status.Error(codes.InvalidArgument, fmt.Sprintf("The tag(s) %s occurred more than once in this rating.", warningOccurred))
+ return status.Error(codes.InvalidArgument, fmt.Sprintf("The tag(s) %s occurred more than once in this rating.", warningOccurred))
} else {
- return &emptypb.Empty{}, nil
+ return nil
}
}
-func getModelStoreTag(tagType modelType, db *gorm.DB) *gorm.DB {
+func getModelStoreTag(tagType ModelType, tx *gorm.DB) *gorm.DB {
if tagType == DISH {
- return db.Model(&model.DishRatingTag{})
+ return tx.Model(&model.DishRatingTag{})
} else {
- return db.Model(&model.CafeteriaRatingTag{})
+ return tx.Model(&model.CafeteriaRatingTag{})
}
}
-func getIDForCafeteriaName(name string, db *gorm.DB) int32 {
+func getIDForCafeteriaName(name string, tx *gorm.DB) int32 {
var result int32 = -1
- err := db.Model(&model.Cafeteria{}).
+ err := tx.Model(&model.Cafeteria{}).
Where("name LIKE ?", name).
Select("cafeteria").
Scan(&result).Error
@@ -612,9 +595,9 @@ func getIDForCafeteriaName(name string, db *gorm.DB) int32 {
return result
}
-func getIDForDishName(name string, cafeteriaID int32, db *gorm.DB) int32 {
+func getIDForDishName(name string, cafeteriaID int32, tx *gorm.DB) int32 {
var result int32 = -1
- err := db.Model(&model.Dish{}).
+ err := tx.Model(&model.Dish{}).
Where("name LIKE ? AND cafeteriaID = ?", name, cafeteriaID).
Select("dish").
Scan(&result).Error
@@ -626,89 +609,88 @@ func getIDForDishName(name string, cafeteriaID int32, db *gorm.DB) int32 {
return result
}
-// GetAvailableDishTags RPC Endpoint
+// ListAvailableDishTags RPC Endpoint
// Returns all valid Tags to quickly rate dishes in english and german with the corresponding Id
-func (s *CampusServer) GetAvailableDishTags(_ context.Context, _ *emptypb.Empty) (*pb.GetTagsReply, error) {
+func (s *CampusServer) ListAvailableDishTags(ctx context.Context, _ *pb.ListAvailableDishTagsRequest) (*pb.ListAvailableDishTagsReply, error) {
var result []*pb.TagsOverview
var requestStatus error = nil
- err := s.db.Model(&model.DishRatingTagOption{}).Select("DE as de, EN as en, dishRatingTagOption as TagId").Find(&result).Error
+ err := s.db.WithContext(ctx).Model(&model.DishRatingTagOption{}).Select("DE as de, EN as en, dishRatingTagOption as TagId").Find(&result).Error
if err != nil {
log.WithError(err).Error("while loading Cafeterias from database.")
requestStatus = status.Error(codes.Internal, "Available dish tags could not be loaded from the database.")
}
- return &pb.GetTagsReply{
+ return &pb.ListAvailableDishTagsReply{
RatingTags: result,
}, requestStatus
}
-// GetNameTags RPC Endpoint
+// ListNameTags RPC Endpoint
// Returns all valid Tags to quickly rate dishes in english and german with the corresponding Id
-func (s *CampusServer) GetNameTags(_ context.Context, _ *emptypb.Empty) (*pb.GetTagsReply, error) {
+func (s *CampusServer) ListNameTags(ctx context.Context, _ *pb.ListNameTagsRequest) (*pb.ListNameTagsReply, error) {
var result []*pb.TagsOverview
var requestStatus error = nil
- err := s.db.Model(&model.DishNameTagOption{}).Select("DE as de, EN as en, dishNameTagOption as TagId").Find(&result).Error
+ err := s.db.WithContext(ctx).Model(&model.DishNameTagOption{}).Select("DE as de, EN as en, dishNameTagOption as TagId").Find(&result).Error
if err != nil {
log.WithError(err).Error("while loading available Name Tags from database.")
requestStatus = status.Error(codes.Internal, "Available dish tags could not be loaded from the database.")
}
- return &pb.GetTagsReply{
+ return &pb.ListNameTagsReply{
RatingTags: result,
}, requestStatus
}
// GetAvailableCafeteriaTags RPC Endpoint
// Returns all valid Tags to quickly rate dishes in english and german
-func (s *CampusServer) GetAvailableCafeteriaTags(_ context.Context, _ *emptypb.Empty) (*pb.GetTagsReply, error) {
+func (s *CampusServer) GetAvailableCafeteriaTags(ctx context.Context, _ *pb.ListAvailableCanteenTagsRequest) (*pb.ListAvailableCanteenTagsReply, error) {
var result []*pb.TagsOverview
var requestStatus error = nil
- err := s.db.Model(&model.CafeteriaRatingTagOption{}).Select("DE as de, EN as en, cafeteriaRatingsTagOption as TagId").Find(&result).Error
+ err := s.db.WithContext(ctx).Model(&model.CafeteriaRatingTagOption{}).Select("DE as de, EN as en, cafeteriaRatingsTagOption as TagId").Find(&result).Error
if err != nil {
log.WithError(err).Error("while loading Cafeterias from database.")
requestStatus = status.Error(codes.Internal, "Available cafeteria tags could not be loaded from the database.")
}
- return &pb.GetTagsReply{
+ return &pb.ListAvailableCanteenTagsReply{
RatingTags: result,
}, requestStatus
}
// GetCafeterias RPC endpoint
// Returns all cafeterias with meta information which are available in the eat-api
-func (s *CampusServer) GetCafeterias(_ context.Context, _ *emptypb.Empty) (*pb.GetCafeteriaReply, error) {
- var result []*pb.Cafeteria
+func (s *CampusServer) GetCafeterias(ctx context.Context, _ *pb.ListCanteensRequest) (*pb.ListCanteensReply, error) {
+ var result []*pb.Canteen
var requestStatus error = nil
- err := s.db.Model(&model.Cafeteria{}).Select("cafeteria as id,address,latitude,longitude").Scan(&result).Error
- if err != nil {
+ if err := s.db.WithContext(ctx).Model(&model.Cafeteria{}).Select("cafeteria as id,address,latitude,longitude").Scan(&result).Error; err != nil {
log.WithError(err).Error("while loading Cafeterias from database.")
requestStatus = status.Error(codes.Internal, "Cafeterias could not be loaded from the database.")
}
- return &pb.GetCafeteriaReply{
- Cafeteria: result,
+ return &pb.ListCanteensReply{
+ Canteen: result,
}, requestStatus
}
-func (s *CampusServer) GetDishes(_ context.Context, request *pb.GetDishesRequest) (*pb.GetDishesReply, error) {
+func (s *CampusServer) ListDishes(ctx context.Context, request *pb.ListDishesRequest) (*pb.ListDishesReply, error) {
if request.Year < 2022 {
- return &pb.GetDishesReply{}, status.Error(codes.Internal, "Years must be larger or equal to 2022 ") // currently, no previous values have been added
+ return &pb.ListDishesReply{}, status.Error(codes.Internal, "Years must be larger or equal to 2022 ") // currently, no previous values have been added
}
if request.Week < 1 || request.Week > 53 {
- return &pb.GetDishesReply{}, status.Error(codes.Internal, "Weeks must be in the range 1 - 53")
+ return &pb.ListDishesReply{}, status.Error(codes.Internal, "Weeks must be in the range 1 - 53")
}
if request.Day < 0 || request.Day > 4 {
- return &pb.GetDishesReply{}, status.Error(codes.Internal, "Days must be in the range 1 (Monday) - 4 (Friday)")
+ return &pb.ListDishesReply{}, status.Error(codes.Internal, "Days must be in the range 1 (Monday) - 4 (Friday)")
}
var requestStatus error = nil
var results []string
- err := s.db.Table("dishes_of_the_week weekly").
+ err := s.db.WithContext(ctx).Table("dishes_of_the_week weekly").
Where("weekly.day = ? AND weekly.week = ? and weekly.year = ?", request.Day, request.Week, request.Year).
Select("weekly.dishID").
Joins("JOIN dish d ON d.dish = weekly.dishID").
Joins("JOIN cafeteria c ON c.cafeteria = d.cafeteriaID").
- Where("c.name LIKE ?", request.CafeteriaId).
+ Where("c.name LIKE ?", request.CanteenId).
Select("d.name").
Find(&results).Error
@@ -717,7 +699,24 @@ func (s *CampusServer) GetDishes(_ context.Context, request *pb.GetDishesRequest
requestStatus = status.Error(codes.Internal, "Cafeterias could not be loaded from the database.")
}
- return &pb.GetDishesReply{
+ return &pb.ListDishesReply{
Dish: results,
}, requestStatus
}
+
+// GetCanteenHeadCount RPC Endpoint
+func (s *CampusServer) GetCanteenHeadCount(ctx context.Context, input *pb.GetCanteenHeadCountRequest) (*pb.GetCanteenHeadCountReply, error) {
+ data := model.CanteenHeadCount{Count: 0, MaxCount: 0, Percent: -1} // Initialize with an empty (not found) value
+ err := s.db.WithContext(ctx).Where(model.CanteenHeadCount{CanteenId: input.CanteenId}).FirstOrInit(&data).Error
+ if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
+ log.WithError(err).Error("while querying the canteen head count for: ", input.CanteenId)
+ return nil, status.Error(codes.Internal, "failed to query head count")
+ }
+
+ return &pb.GetCanteenHeadCountReply{
+ Count: data.Count,
+ MaxCount: data.MaxCount,
+ Percent: data.Percent,
+ Timestamp: timestamppb.New(data.Timestamp),
+ }, nil
+}
diff --git a/server/backend/cafeteriaRatingDBInitializer.go b/server/backend/cafeteriaRatingDBInitializer.go
deleted file mode 100644
index 500a93d4..00000000
--- a/server/backend/cafeteriaRatingDBInitializer.go
+++ /dev/null
@@ -1,241 +0,0 @@
-package backend
-
-import (
- "database/sql"
- "encoding/json"
- "os"
- "path/filepath"
-
- "github.com/TUM-Dev/Campus-Backend/server/model"
- "github.com/guregu/null"
- log "github.com/sirupsen/logrus"
- "gorm.io/gorm"
-)
-
-type multiLanguageTags struct {
- MultiLanguageTags []tag `json:"tags"`
-}
-type tag struct {
- TagNameEnglish string `json:"tagNameEnglish"`
- TagNameGerman string `json:"tagNameGerman"`
-}
-
-type multiLanguageNameTags struct {
- MultiLanguageNameTags []nameTag `json:"tags"`
-}
-type nameTag struct {
- TagNameEnglish string `json:"tagNameEnglish"`
- TagNameGerman string `json:"tagNameGerman"`
- NotIncluded []string `json:"notincluded"`
- CanBeIncluded []string `json:"canbeincluded"`
-}
-
-/*
-Writes all available tags from the json file into tables in order to make them easier to use.
-Will be executed once while the server is started.
-*/
-func initTagRatingOptions(db *gorm.DB) {
- updateTagTable("backend/static_data/dishRatingTags.json", db, DISH)
- updateTagTable("backend/static_data/cafeteriaRatingTags.json", db, CAFETERIA)
- updateNameTagOptions(db)
- addEntriesForCronJob(db, "averageRatingComputation", 300)
- addEntriesForCronJob(db, "dishNameDownload", 302400) //run twice every week
-}
-
-func addEntriesForCronJob(db *gorm.DB, cronName string, interval int32) {
- var count int64
- err := db.Model(&model.Crontab{}).
- Where("type LIKE ?", cronName).
- Count(&count).
- Error
-
- if err != nil {
- log.WithError(err).WithField("cronName", cronName).Error("Error while checking if cronjob already exists in database")
- } else if count == 0 {
- errCreate := db.Model(&model.Crontab{}).
- Create(&model.Crontab{
- Interval: interval,
- Type: null.String{NullString: sql.NullString{String: cronName, Valid: true}},
- LastRun: 0,
- }).Error
- if errCreate != nil {
- log.WithError(errCreate).Error("Error while creating cronjob with name: ", cronName)
- }
- }
-}
-
-/*
-Updates the list of dishtags.
-If a tag with the exact german and english name does not exist yet, it will be created.
-Old tags won't be removed to prevent problems with foreign keys.
-*/
-func updateNameTagOptions(db *gorm.DB) {
- absPathDishNames, _ := filepath.Abs("backend/static_data/dishNameTags.json")
- tagsNames := generateNameTagListFromFile(absPathDishNames)
- for _, v := range tagsNames.MultiLanguageNameTags {
- var parentId int32
- res := db.Model(&model.DishNameTagOption{}).
- Where("EN LIKE ? AND DE LIKE ?", v.TagNameEnglish, v.TagNameGerman).
- Select("DishNameTagOption").
- Scan(&parentId)
- fields := log.Fields{"en": v.TagNameEnglish, "de": v.TagNameGerman}
- if res.Error != nil {
- log.WithError(res.Error).WithFields(fields).Error("Unable to load tag")
- }
- if res.RowsAffected == 0 || res.Error != nil {
- parent := model.DishRatingTagOption{
- DE: v.TagNameGerman,
- EN: v.TagNameEnglish,
- }
-
- if err := db.Model(&model.DishNameTagOption{}).Create(&parent).Error; err != nil {
- log.WithError(err).WithFields(fields).Error("Error while creating tag")
- }
- parentId = parent.DishRatingTagOption
- }
-
- addCanBeIncluded(parentId, db, v)
- addNotIncluded(parentId, db, v)
- }
-}
-
-func addNotIncluded(parentId int32, db *gorm.DB, v nameTag) {
- var count int64
- for _, expression := range v.NotIncluded {
- fields := log.Fields{"expression": expression, "parentId": parentId}
- err := db.Model(&model.DishNameTagOptionExcluded{}).
- Where("expression LIKE ? AND NameTagID = ?", expression, parentId).
- Select("DishNameTagOptionExcluded").
- Count(&count).Error
- if err != nil {
- log.WithError(err).WithFields(fields).Error("Unable to load can be excluded tag")
- } else {
- if count == 0 {
- err := db.Model(&model.DishNameTagOptionExcluded{}).
- Create(&model.DishNameTagOptionExcluded{
- Expression: expression,
- NameTagID: parentId}).Error
- if err != nil {
- log.WithError(err).WithFields(fields).Error("Unable to create new can be excluded tag")
- }
- }
- }
- }
-}
-
-func addCanBeIncluded(parentId int32, db *gorm.DB, v nameTag) {
- var count int64
- for _, expression := range v.CanBeIncluded {
- fields := log.Fields{"expression": expression, "parentId": parentId}
- err := db.Model(&model.DishNameTagOptionIncluded{}).
- Where("expression LIKE ? AND NameTagID = ?", expression, parentId).
- Select("DishNameTagOptionIncluded").
- Count(&count).Error
- if err != nil {
- log.WithError(err).WithFields(fields).Error("Unable to load can be included tag")
- } else {
- if count == 0 {
- err := db.Model(&model.DishNameTagOptionIncluded{}).
- Create(&model.DishNameTagOptionIncluded{
- Expression: expression,
- NameTagID: parentId,
- }).Error
- if err != nil {
- log.WithError(err).WithFields(fields).Error("Unable to create new can be excluded tag")
- }
- }
- }
- }
-}
-
-/*
-Reads the json file at the given path and checks whether the values have already been inserted into the corresponding table.
-If an entry with the same German and English name exists, the entry won't be added.
-The TagType is used to identify the corresponding model
-*/
-func updateTagTable(path string, db *gorm.DB, tagType modelType) {
- absPathDish, _ := filepath.Abs(path)
- tagsDish := generateRatingTagListFromFile(absPathDish)
- insertModel := getTagModel(tagType, db)
- for _, v := range tagsDish.MultiLanguageTags {
- var count int64
- fields := log.Fields{"de": v.TagNameGerman, "en": v.TagNameEnglish}
- if tagType == CAFETERIA {
- countError := db.Model(&model.CafeteriaRatingTagOption{}).
- Where("EN LIKE ? AND DE LIKE ?", v.TagNameEnglish, v.TagNameGerman).
- Select("cafeteriaRatingTagOption").Count(&count).Error
- if countError != nil {
- log.WithError(countError).WithFields(fields).Error("Unable to find cafeteria rating tag")
- }
- } else {
- countError := db.Model(&model.DishRatingTagOption{}).
- Where("EN LIKE ? AND DE LIKE ?", v.TagNameEnglish, v.TagNameGerman).
- Select("dishRatingTagOption").Count(&count).Error
- if countError != nil {
- log.WithError(countError).WithFields(fields).Error("Unable to find dish rating tag")
- }
- }
-
- if count == 0 {
- element := model.DishRatingTagOption{
- DE: v.TagNameGerman,
- EN: v.TagNameEnglish,
- }
- createError := insertModel.Create(&element).Error
- if createError != nil {
- log.WithError(createError).WithFields(fields).Error("Unable to create new can be excluded tag")
- } else {
- log.WithFields(fields).Info("New Entry successfully created")
- }
- }
- }
-}
-
-func getTagModel(tagType modelType, db *gorm.DB) *gorm.DB {
- if tagType == DISH {
- return db.Model(&model.DishRatingTagOption{})
- } else {
- return db.Model(&model.CafeteriaRatingTagOption{})
- }
-}
-
-func generateNameTagListFromFile(path string) multiLanguageNameTags {
- file := readFromFile(path)
-
- var tags multiLanguageNameTags
- errjson := json.NewDecoder(file).Decode(&tags)
- if errjson != nil {
- log.WithError(errjson).Error("Error while reading the file.")
- }
- defer func(jsonFile *os.File) {
- if err := jsonFile.Close(); err != nil {
- log.WithError(err).Error("Error in parsing json.")
- }
- }(file)
- return tags
-}
-
-func generateRatingTagListFromFile(path string) multiLanguageTags {
- file := readFromFile(path)
- var tags multiLanguageTags
- errjson := json.NewDecoder(file).Decode(&tags)
- if errjson != nil {
- log.WithError(errjson).Error("Error while reading or parsing the file.")
- }
- defer func(jsonFile *os.File) {
- if err := jsonFile.Close(); err != nil {
- log.WithError(err).Error("Error in parsing json.")
- }
- }(file)
- return tags
-}
-
-func readFromFile(path string) *os.File {
- jsonFile, err := os.Open(path)
-
- if err != nil {
- log.WithError(err).Error("Unable to open file with path: ", path)
- }
-
- return jsonFile
-}
diff --git a/server/backend/campus_api/campusApi.go b/server/backend/campus_api/campusApi.go
deleted file mode 100644
index b79ec94e..00000000
--- a/server/backend/campus_api/campusApi.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Package campus_api handles all requests to the TUM Campus API and decodes the XML responses.
-package campus_api
-
-import (
- "encoding/xml"
- "errors"
- "io"
- "net/http"
-
- "github.com/TUM-Dev/Campus-Backend/server/model"
- log "github.com/sirupsen/logrus"
-)
-
-const (
- CampusApiUrl = "https://campus.tum.de/tumonline"
- CampusQueryToken = "pToken"
- CampusGradesPath = "/wbservicesbasic.noten"
-)
-
-var (
- ErrCannotCreateRequest = errors.New("cannot create http request")
- ErrWhileFetchingGrades = errors.New("error while fetching grades")
- ErrorWhileUnmarshalling = errors.New("error while unmarshalling")
-)
-
-func FetchGrades(token string) (*model.IOSGrades, error) {
-
- requestUrl := CampusApiUrl + CampusGradesPath
- req, err := http.NewRequest(http.MethodGet, requestUrl, nil)
-
- if err != nil {
- log.WithError(err).Error("Failed to create api-request")
- return nil, ErrCannotCreateRequest
- }
-
- q := req.URL.Query()
- q.Add(CampusQueryToken, token)
-
- req.URL.RawQuery = q.Encode()
-
- resp, err := http.DefaultClient.Do(req)
- if err != nil {
- log.WithError(err).Error("failed to fetch grades")
- return nil, ErrWhileFetchingGrades
- }
- defer func(Body io.ReadCloser) {
- if err := Body.Close(); err != nil {
- log.WithError(err).Error("Could not close body")
- }
- }(resp.Body)
-
- var grades model.IOSGrades
- if err = xml.NewDecoder(resp.Body).Decode(&grades); err != nil {
- log.WithError(err).Error("could not unmarshall grades")
- return nil, ErrorWhileUnmarshalling
- }
-
- return &grades, nil
-}
diff --git a/server/backend/campus_api/campus_api.go b/server/backend/campus_api/campus_api.go
new file mode 100644
index 00000000..746455e4
--- /dev/null
+++ b/server/backend/campus_api/campus_api.go
@@ -0,0 +1,55 @@
+// Package campus_api handles all requests to the TUM Campus API and decodes the XML responses.
+package campus_api
+
+import (
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ log "github.com/sirupsen/logrus"
+)
+
+func FetchExamResultsPublished(token string) (*model.TUMAPIPublishedExamResults, error) {
+ var examResultsPublished model.TUMAPIPublishedExamResults
+ err := RequestCampusApi("/wbservicesbasic.pruefungenErgebnisse", token, &examResultsPublished)
+ if err != nil {
+ return nil, err
+ }
+
+ return &examResultsPublished, nil
+}
+
+func FetchGrades(token string) (*model.IOSGrades, error) {
+ var grades model.IOSGrades
+ err := RequestCampusApi("/wbservicesbasic.noten", token, &grades)
+ if err != nil {
+ return nil, err
+ }
+
+ return &grades, nil
+}
+
+func RequestCampusApi(path string, token string, response any) error {
+ requestUrl := fmt.Sprintf("https://campus.tum.de/tumonline%s?pToken=%s", path, token)
+ resp, err := http.Get(requestUrl)
+ if err != nil {
+ log.WithError(err).WithField("path", path).Error("Error while fetching url")
+ return errors.New("error while fetching " + path)
+ }
+ defer func(Body io.ReadCloser) {
+ err := Body.Close()
+ if err != nil {
+ log.WithError(err).Error("Error while closing body")
+ }
+ }(resp.Body)
+
+ if err = xml.NewDecoder(resp.Body).Decode(&response); err != nil {
+ log.WithError(err).WithField("path", path).Error("Error while unmarshalling")
+ return errors.New("error while unmarshalling")
+ }
+
+ return nil
+}
diff --git a/server/backend/canteenHeadCount.go b/server/backend/canteenHeadCount.go
deleted file mode 100644
index 589b2b7e..00000000
--- a/server/backend/canteenHeadCount.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package backend
-
-import (
- "context"
- "errors"
-
- pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
- "github.com/TUM-Dev/Campus-Backend/server/model"
- log "github.com/sirupsen/logrus"
- "google.golang.org/protobuf/types/known/timestamppb"
- "gorm.io/gorm"
-)
-
-// GetCanteenHeadCount RPC Endpoint
-func (s *CampusServer) GetCanteenHeadCount(_ context.Context, input *pb.GetCanteenHeadCountRequest) (*pb.GetCanteenHeadCountReply, error) {
- data := model.CanteenHeadCount{Count: 0, MaxCount: 0, Percent: -1} // Initialize with an empty (not found) value
- err := s.db.Model(&model.CanteenHeadCount{}).Where(model.CanteenHeadCount{CanteenId: input.CanteenId}).FirstOrInit(&data).Error
- if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
- log.WithError(err).Error("while querying the canteen head count for: ", input.CanteenId)
- return nil, errors.New("failed to query head count")
- }
-
- return &pb.GetCanteenHeadCountReply{
- Count: data.Count,
- MaxCount: data.MaxCount,
- Percent: data.Percent,
- Timestamp: timestamppb.New(data.Timestamp),
- }, nil
-}
diff --git a/server/backend/cron/averageRatingComputation.go b/server/backend/cron/average_rating_computation.go
similarity index 72%
rename from server/backend/cron/averageRatingComputation.go
rename to server/backend/cron/average_rating_computation.go
index 24bd0a6c..8421e0ba 100644
--- a/server/backend/cron/averageRatingComputation.go
+++ b/server/backend/cron/average_rating_computation.go
@@ -28,12 +28,10 @@ func computeAverageNameTags(c *CronService) {
if err != nil {
log.WithError(err).Error("while precomputing average name tags.")
} else if len(results) > 0 {
- errDelete := c.db.Where("1=1").Delete(&model.DishNameTagAverage{}).Error // Does not work with "true"
- if errDelete != nil {
- log.WithError(errDelete).Error("Error while deleting old averages in the table.")
+ if err := c.db.Where("1=1").Delete(&model.DishNameTagAverage{}).Error; err != nil {
+ log.WithError(err).Error("Error while deleting old averages in the table.")
}
- err := c.db.Model(&model.DishNameTagAverage{}).Create(&results).Error
- if err != nil {
+ if err := c.db.Create(&results).Error; err != nil {
log.WithError(err).Error("while creating a new average name tag rating in the database.")
}
}
@@ -49,13 +47,11 @@ func computeAverageForDishesInCafeteriasTags(c *CronService) {
if err != nil {
log.WithError(err).Error("while precomputing average dish tags.")
} else if len(results) > 0 {
- errDelete := c.db.Where("1=1").Delete(&model.DishRatingTagAverage{}).Error
- if errDelete != nil {
- log.WithError(errDelete).Error("Error while deleting old averages in the table.")
+ if err := c.db.Where("1=1").Delete(&model.DishRatingTagAverage{}).Error; err != nil {
+ log.WithError(err).Error("Error while deleting old averages in the table.")
}
- err := c.db.Model(&model.DishRatingTagAverage{}).Create(&results).Error
- if err != nil {
+ if err := c.db.Create(&results).Error; err != nil {
log.WithError(err).Error("while creating a new average dish tag rating in the database.")
}
@@ -72,13 +68,11 @@ func computeAverageCafeteriaTags(c *CronService) {
if err != nil {
log.WithError(err).Error("while precomputing average cafeteria tags.")
} else if len(results) > 0 {
- errDelete := c.db.Where("1=1").Delete(&model.CafeteriaRatingTagsAverage{}).Error
- if errDelete != nil {
- log.WithError(errDelete).Error("Error while deleting old averages in the table.")
+ if err := c.db.Where("1=1").Delete(&model.CafeteriaRatingTagsAverage{}).Error; err != nil {
+ log.WithError(err).Error("Error while deleting old averages in the table.")
}
- err := c.db.Model(&model.CafeteriaRatingTagsAverage{}).Create(&results).Error
- if err != nil {
+ if err := c.db.Create(&results).Error; err != nil {
log.WithError(err).Error("while creating a new average cafeteria tag rating in the database.")
}
}
@@ -93,12 +87,10 @@ func computeAverageForDishesInCafeterias(c *CronService) {
if err != nil {
log.WithError(err).Error("while precomputing average dish ratings.")
} else if len(results) > 0 {
- errDelete := c.db.Where("1=1").Delete(&model.DishRatingAverage{}).Error
- if errDelete != nil {
- log.WithError(errDelete).Error("Error while deleting old averages in the table.")
+ if err := c.db.Where("1=1").Delete(&model.DishRatingAverage{}).Error; err != nil {
+ log.WithError(err).Error("Error while deleting old averages in the table.")
}
- err := c.db.Model(&model.DishRatingAverage{}).Create(&results).Error
- if err != nil {
+ if err := c.db.Create(&results).Error; err != nil {
log.WithError(err).Error("while creating a new average dish rating in the database.")
}
}
@@ -113,12 +105,11 @@ func computeAverageForCafeteria(c *CronService) {
if err != nil {
log.WithError(err).Error("while precomputing average cafeteria ratings.")
} else if len(results) > 0 {
- errDelete := c.db.Where("1=1").Delete(&model.CafeteriaRatingAverage{}).Error
- if errDelete != nil {
- log.WithError(errDelete).Error("Error while deleting old averages in the table.")
+ if err := c.db.Where("1=1").Delete(&model.CafeteriaRatingAverage{}).Error; err != nil {
+ log.WithError(err).Error("Error while deleting old averages in the table.")
}
- err := c.db.Model(&model.CafeteriaRatingAverage{}).Create(&results).Error
+ err := c.db.Create(&results).Error
if err != nil {
log.WithError(err).Error("while creating a new average cafeteria rating in the database.")
}
diff --git a/server/backend/cron/canteenHeadCount.go b/server/backend/cron/canteen_head_count.go
similarity index 98%
rename from server/backend/cron/canteenHeadCount.go
rename to server/backend/cron/canteen_head_count.go
index 1eecc9c2..b14b816f 100644
--- a/server/backend/cron/canteenHeadCount.go
+++ b/server/backend/cron/canteen_head_count.go
@@ -163,7 +163,7 @@ func sumApCounts(aps []AccessPoint) uint32 {
log.WithError(err).Error("Canteen HeadCount getting the count failed for access point: ", ap.Target)
continue
}
- total += uint32(count)
+ total += count
}
return total
}
@@ -224,7 +224,7 @@ func (canteen CanteenApInformation) requestApData() []AccessPoint {
// Parse as JSON
var aps []AccessPoint
if err = json.NewDecoder(resp.Body).Decode(&aps); err != nil {
- log.WithError(err).Error("Canteen HeadCount parsing output as JSON failed for: ", canteen.CanteenId)
+ log.WithError(err).WithField("CanteenId", canteen.CanteenId).Error("Canteen HeadCount parsing failed")
return []AccessPoint{}
}
return aps
diff --git a/server/backend/cron/cronjobs.go b/server/backend/cron/cronjobs.go
index 5d2bd422..95ba45a2 100644
--- a/server/backend/cron/cronjobs.go
+++ b/server/backend/cron/cronjobs.go
@@ -3,7 +3,7 @@ package cron
import (
"time"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_apns"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/apns"
"github.com/TUM-Dev/Campus-Backend/server/env"
"github.com/TUM-Dev/Campus-Backend/server/model"
@@ -16,10 +16,12 @@ import (
type CronService struct {
db *gorm.DB
gf *gofeed.Parser
- APNs *ios_apns.Service
+ APNs *apns.Service
}
-const StorageDir = "/Storage/" // target location of files
+// StorageDir is the directory where files are stored
+// this is a variable, so it can be changed during tests
+var StorageDir = "/Storage/" // target location of files
// names for cron jobs as specified in database
const (
@@ -30,10 +32,11 @@ const (
CanteenHeadcount = "canteenHeadCount"
IOSNotifications = "iosNotifications"
IOSActivityReset = "iosActivityReset"
+ NewExamResultsHook = "newExamResultsHook"
+ MovieType = "movie"
+ FeedbackEmail = "feedbackEmail"
/* MensaType = "mensa"
- KinoType = "kino"
- RoomfinderType = "roomfinder"
AlarmType = "alarm" */
)
@@ -41,7 +44,7 @@ func New(db *gorm.DB) *CronService {
return &CronService{
db: db,
gf: gofeed.NewParser(),
- APNs: ios_apns.NewCronService(db),
+ APNs: apns.NewCronService(db),
}
}
@@ -59,7 +62,7 @@ func (c *CronService) Run() error {
var res []model.Crontab
c.db.Model(&model.Crontab{}).
- Where("`interval` > 0 AND (lastRun+`interval`) < ? AND type IN (?, ?, ?, ?, ?, ?, ?)",
+ Where("`interval` > 0 AND (lastRun+`interval`) < ? AND type IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
time.Now().Unix(),
NewsType,
FileDownloadType,
@@ -68,6 +71,9 @@ func (c *CronService) Run() error {
CanteenHeadcount,
IOSNotifications,
IOSActivityReset,
+ NewExamResultsHook,
+ MovieType,
+ FeedbackEmail,
).
Scan(&res)
@@ -104,14 +110,16 @@ func (c *CronService) Run() error {
if env.IsMensaCronActive() {
g.Go(c.averageRatingComputation)
}
+ case NewExamResultsHook:
+ g.Go(func() error { return c.newExamResultsHookCron() })
+ case MovieType:
+ g.Go(func() error { return c.movieCron() })
/*
TODO: Implement handlers for other cronjobs
case MensaType:
g.Go(func() error { return c.mensaCron() })
case KinoType:
g.Go(func() error { return c.kinoCron() })
- case RoomfinderType:
- g.Go(func() error { return c.roomFinderCron() })
case AlarmType:
g.Go(func() error { return c.alarmCron() })
*/
@@ -121,6 +129,8 @@ func (c *CronService) Run() error {
g.Go(func() error { return c.iosNotificationsCron() })
case IOSActivityReset:
g.Go(func() error { return c.iosActivityReset() })
+ case FeedbackEmail:
+ g.Go(func() error { return c.feedbackEmailCron() })
}
}
diff --git a/server/backend/cron/dishNameDownload.go b/server/backend/cron/dishNameDownload.go
deleted file mode 100644
index 5db223e7..00000000
--- a/server/backend/cron/dishNameDownload.go
+++ /dev/null
@@ -1,229 +0,0 @@
-package cron
-
-import (
- "encoding/json"
- "fmt"
- "net/http"
- "strings"
- "time"
-
- "github.com/TUM-Dev/Campus-Backend/server/model"
- log "github.com/sirupsen/logrus"
- "gorm.io/gorm"
-)
-
-type cafeteriaName struct {
- Name string `json:"enum_name"`
- Location location `json:"location"`
-}
-
-type cafeteriaWithID struct {
- Name string `json:"name"`
- Cafeteria int32 `json:"cafeteria"`
-}
-
-type location struct {
- Longitude float32 `json:"longitude"`
- Latitude float32 `json:"latitude"`
- Address string `json:"address"`
-}
-
-type days struct {
- Days []date `json:"days"`
-}
-
-type date struct {
- Dates []dish `json:"dishes"`
-}
-
-type dish struct {
- Name string `json:"name"`
- DishType string `json:"dish_type"`
-}
-
-// fileDownloadCron
-// Downloads all files that are not marked as finished in the database.
-func (c *CronService) dishNameDownloadCron() error {
-
- downloadCanteenNames(c)
- downloadDailyDishes(c)
-
- return nil
-}
-
-func downloadDailyDishes(c *CronService) {
- var result []cafeteriaWithID
- errQueryCafeterias := c.db.Model(&model.Cafeteria{}).Select("name,cafeteria").Scan(&result).Error
- if errQueryCafeterias != nil {
- log.WithError(errQueryCafeterias).Error("Error while querying all cafeteria names from the database.")
- }
-
- year, week := time.Now().UTC().ISOWeek()
- var weekliesWereAdded int64
- errExistsQuery := c.db.Model(&model.DishesOfTheWeek{}).
- Where("year = ? AND week = ?", year, week).
- Count(&weekliesWereAdded).Error
- if errExistsQuery != nil {
- log.WithError(errExistsQuery).Error("Error while checking whether the meals of the current week have already been added to the weekly table.")
- }
-
- for _, v := range result {
- cafeteriaName := strings.Replace(strings.ToLower(v.Name), "_", "-", 10)
-
- req := fmt.Sprintf("https://tum-dev.github.io/eat-api/%s/%d/%d.json", cafeteriaName, year, week)
- log.WithField("req", req).Debug("Fetching menu")
- var resp, err = http.Get(req)
- if err != nil {
- log.WithError(err).Error("Error fetching menu.")
- }
- if resp.StatusCode != 200 {
- fields := log.Fields{
- "Name": v.Name,
- "StatusCode": resp.StatusCode,
- }
- log.WithError(err).WithFields(fields).Error("Menu does not exist")
- } else {
- var dishes days
- errJson := json.NewDecoder(resp.Body).Decode(&dishes)
- if errJson != nil {
- log.WithError(err).Error("Error in Parsing")
- }
-
- for weekDayIndex := 0; weekDayIndex < len(dishes.Days); weekDayIndex++ {
- for u := 0; u < len(dishes.Days[weekDayIndex].Dates); u++ {
- dish := model.Dish{
- Name: dishes.Days[weekDayIndex].Dates[u].Name,
- Type: dishes.Days[weekDayIndex].Dates[u].DishType,
- CafeteriaID: v.Cafeteria,
- }
-
- var count int64
- var dishId int32
- errCount := c.db.Model(&model.Dish{}).
- Where("name = ? AND cafeteriaID = ?", dish.Name, dish.CafeteriaID).
- Select("dish").First(&dishId).
- Count(&count).Error
- if errCount != nil {
- log.WithError(errCount).Error("Error while checking whether this is already in database")
- }
- if count == 0 {
- errCreate := c.db.Model(&model.Dish{}).Create(&dish).Error
- if errCreate != nil {
- log.WithError(errCreate).Error("Error while creating new dish entry with name {}. dish won't be saved", dish.Name)
- }
- addDishTagsToMapping(dish.Dish, dish.Name, c.db)
- dishId = dish.Dish
- }
- if weekliesWereAdded == 0 {
- errCreate := c.db.Model(&model.DishesOfTheWeek{}).
- Create(&model.DishesOfTheWeek{
- DishID: dishId,
- Year: int32(year),
- Week: int32(week),
- Day: int32(weekDayIndex),
- }).Error
- if errCreate != nil {
- log.WithError(errCreate).Error("Error while inserting dish for this weeks weekly dishes", dish.Name)
- }
- }
- }
- }
- }
- }
-}
-
-func downloadCanteenNames(c *CronService) {
- var resp, err = http.Get("https://tum-dev.github.io/eat-api/enums/canteens.json")
- if err != nil {
- log.WithError(err).Error("Error fetching cafeteria list from eat-api.")
- }
- var cafeteriaNames []cafeteriaName
- errjson := json.NewDecoder(resp.Body).Decode(&cafeteriaNames)
-
- if errjson != nil {
- log.WithError(errjson).Error("Error while unmarshalling json data.")
- }
-
- for i := 0; i < len(cafeteriaNames); i++ {
-
- mensa := model.Cafeteria{
- Name: cafeteriaNames[i].Name,
- Address: cafeteriaNames[i].Location.Address,
- Latitude: cafeteriaNames[i].Location.Latitude,
- Longitude: cafeteriaNames[i].Location.Longitude,
- }
- var cafeteriaResult model.Cafeteria
- resExists := c.db.Model(&model.Cafeteria{}).
- Where("name = ?", cafeteriaNames[i].Name).
- First(&cafeteriaResult)
-
- if resExists.Error != nil {
- errCreate := c.db.Model(&model.Cafeteria{}).Create(&mensa).Error
- if errCreate != nil {
- log.WithError(errCreate).Error("Error while creating the db entry for the cafeteria ", cafeteriaNames[i].Name)
- }
- } else {
- errUpdate := c.db.Model(&model.Cafeteria{}).
- Where("name = ?", cafeteriaNames[i].Name).
- Updates(&mensa).Error
- if errUpdate != nil {
- log.WithError(errUpdate).Error("Error while updating the db entry for the cafeteria {}.", cafeteriaNames[i].Name)
- }
- }
- }
-}
-
-// addDishTagsToMapping
-// Checks whether the dish name includes one of the expressions for the excluded tags as well as the included tags.
-// The corresponding tags for all identified DishNames will be saved in the table DishNameTags.
-func addDishTagsToMapping(dishID int32, dishName string, db *gorm.DB) {
- lowercaseDish := strings.ToLower(dishName)
- var includedTags []int32
- errIncluded := db.Model(&model.DishNameTagOptionIncluded{}).
- Where("? LIKE CONCAT('%', expression ,'%')", lowercaseDish).
- Select("nameTagID").
- Scan(&includedTags).Error
- if errIncluded != nil {
- log.WithError(errIncluded).Error("Error while querying all included expressions for the dish: ", lowercaseDish)
- }
-
- var excludedTags []int32
- errExcluded := db.Model(&model.DishNameTagOptionExcluded{}).
- Where("? LIKE CONCAT('%', expression ,'%')", lowercaseDish).
- Select("nameTagID").
- Scan(&excludedTags).Error
- if errExcluded != nil {
- log.WithError(errExcluded).Error("Error while querying all excluded expressions for the dish: ", lowercaseDish)
- }
-
- //set all entries in included to -1 if the excluded tag was recognised for this tag rating.
- if len(excludedTags) > 0 {
- for _, a := range excludedTags {
- i := contains(includedTags, a)
- if i != -1 {
- includedTags[i] = -1
- }
- }
- }
-
- for _, nametagID := range includedTags {
- if nametagID != -1 {
- err := db.Model(&model.DishToDishNameTag{}).Create(&model.DishToDishNameTag{
- DishID: dishID,
- NameTagID: nametagID,
- }).Error
- if err != nil {
- fields := log.Fields{"dishID": dishID, "nametagID": nametagID}
- log.WithError(err).WithFields(fields).Error("creating a new entry")
- }
- }
- }
-}
-func contains(s []int32, e int32) int32 {
- for i, a := range s {
- if a == e {
- return int32(i)
- }
- }
- return -1
-}
diff --git a/server/backend/cron/dish_name_download.go b/server/backend/cron/dish_name_download.go
new file mode 100644
index 00000000..e02e0e28
--- /dev/null
+++ b/server/backend/cron/dish_name_download.go
@@ -0,0 +1,208 @@
+package cron
+
+import (
+ "encoding/json"
+ "fmt"
+ "net/http"
+ "strings"
+ "time"
+
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ log "github.com/sirupsen/logrus"
+ "gorm.io/gorm"
+)
+
+type CafeteriaName struct {
+ Name string `json:"enum_name"`
+ Location CanteenLocation `json:"location"`
+}
+
+type CafeteriaWithID struct {
+ Name string `json:"name"`
+ Cafeteria int64 `json:"cafeteria"`
+}
+
+type CanteenLocation struct {
+ Longitude float32 `json:"longitude"`
+ Latitude float32 `json:"latitude"`
+ Address string `json:"address"`
+}
+
+type CanteenDays struct {
+ Days []CanteenDate `json:"days"`
+}
+
+type CanteenDate struct {
+ Dates []CanteenDish `json:"dishes"`
+}
+
+type CanteenDish struct {
+ Name string `json:"name"`
+ DishType string `json:"dish_type"`
+}
+
+// fileDownloadCron
+// Downloads all files that are not marked as finished in the database.
+func (c *CronService) dishNameDownloadCron() error {
+ downloadCanteenNames(c)
+ downloadDailyDishes(c)
+ return nil
+}
+
+func downloadDailyDishes(c *CronService) {
+ var result []CafeteriaWithID
+ if err := c.db.Model(&model.Cafeteria{}).Select("name,cafeteria").Scan(&result).Error; err != nil {
+ log.WithError(err).Error("Error while querying all cafeteria names from the database.")
+ }
+
+ year, week := time.Now().UTC().ISOWeek()
+ var weekliesWereAdded int64
+
+ if err := c.db.Model(&model.DishesOfTheWeek{}).
+ Where("year = ? AND week = ?", year, week).
+ Count(&weekliesWereAdded).Error; err != nil {
+ log.WithError(err).Error("Error while checking whether the meals of the current week have already been added to the weekly table.")
+ }
+
+ for _, v := range result {
+ cafeteriaName := strings.Replace(strings.ToLower(v.Name), "_", "-", 10)
+
+ req := fmt.Sprintf("https://tum-dev.github.io/eat-api/%s/%d/%d.json", cafeteriaName, year, week)
+ log.WithField("req", req).Debug("Fetching menu")
+ var resp, err = http.Get(req)
+ if err != nil {
+ log.WithError(err).Error("Error fetching menu.")
+ continue
+ }
+ if resp.StatusCode != 200 {
+ fields := log.Fields{
+ "Name": v.Name,
+ "StatusCode": resp.StatusCode,
+ }
+ log.WithError(err).WithFields(fields).Error("Menu does not exist")
+ continue
+ }
+ var dishes CanteenDays
+ if err := json.NewDecoder(resp.Body).Decode(&dishes); err != nil {
+ log.WithError(err).Error("Error in Parsing")
+ }
+
+ for weekDayIndex, day := range dishes.Days {
+ for _, date := range day.Dates {
+ dish := model.Dish{
+ Name: date.Name,
+ Type: date.DishType,
+ CafeteriaID: v.Cafeteria,
+ }
+
+ var count int64
+ var dishId int64
+ if err := c.db.Model(&model.Dish{}).
+ Where("name = ? AND cafeteriaID = ?", dish.Name, dish.CafeteriaID).
+ Select("CanteenDish").First(&dishId).
+ Count(&count).Error; err != nil {
+ log.WithError(err).Error("Error while checking whether this is already in database")
+ }
+ if count == 0 {
+ if err := c.db.Create(&dish).Error; err != nil {
+ log.WithError(err).Error("Error while creating new CanteenDish entry with name {}. CanteenDish won't be saved", dish.Name)
+ }
+ addDishTagsToMapping(dish.Dish, dish.Name, c.db)
+ dishId = dish.Dish
+ }
+ if weekliesWereAdded == 0 {
+ errCreate := c.db.Create(&model.DishesOfTheWeek{
+ DishID: dishId,
+ Year: int32(year),
+ Week: int32(week),
+ Day: int32(weekDayIndex),
+ }).Error
+ if errCreate != nil {
+ log.WithError(errCreate).Error("Error while inserting CanteenDish for this weeks weekly dishes", dish.Name)
+ }
+ }
+ }
+ }
+ }
+}
+
+func downloadCanteenNames(c *CronService) {
+ var resp, err = http.Get("https://tum-dev.github.io/eat-api/enums/canteens.json")
+ if err != nil {
+ log.WithError(err).Error("Error fetching cafeteria list from eat-api.")
+ }
+ var cafeteriaNames []CafeteriaName
+ if err := json.NewDecoder(resp.Body).Decode(&cafeteriaNames); err != nil {
+ log.WithError(err).Error("Error while unmarshalling json data.")
+ }
+
+ for _, cafeteriaName := range cafeteriaNames {
+ mensa := model.Cafeteria{
+ Name: cafeteriaName.Name,
+ Address: cafeteriaName.Location.Address,
+ Latitude: cafeteriaName.Location.Latitude,
+ Longitude: cafeteriaName.Location.Longitude,
+ }
+ var cafeteriaResult model.Cafeteria
+ if err := c.db.First(&cafeteriaResult, "name = ?", cafeteriaName.Name).Error; err != nil {
+ if err := c.db.Create(&mensa).Error; err != nil {
+ log.WithError(err).Error("Error while creating the db entry for the cafeteria ", cafeteriaName.Name)
+ }
+ } else {
+ if err := c.db.Where("name = ?", cafeteriaName.Name).Updates(&mensa).Error; err != nil {
+ log.WithError(err).Error("Error while updating the db entry for the cafeteria {}.", cafeteriaName.Name)
+ }
+ }
+ }
+}
+
+// addDishTagsToMapping
+// Checks whether the CanteenDish name includes one of the expressions for the excluded tags as well as the included tags.
+// The corresponding tags for all identified DishNames will be saved in the table DishNameTags.
+func addDishTagsToMapping(dishID int64, dishName string, db *gorm.DB) {
+ lowercaseDish := strings.ToLower(dishName)
+ var includedTags []int64
+ if err := db.Model(&model.DishNameTagOptionIncluded{}).
+ Where("? LIKE CONCAT('%', expression ,'%')", lowercaseDish).
+ Select("nameTagID").
+ Scan(&includedTags).Error; err != nil {
+ log.WithError(err).Error("Error while querying all included expressions for the CanteenDish: ", lowercaseDish)
+ }
+
+ var excludedTags []int64
+ if err := db.Model(&model.DishNameTagOptionExcluded{}).
+ Where("? LIKE CONCAT('%', expression ,'%')", lowercaseDish).
+ Select("nameTagID").
+ Scan(&excludedTags).Error; err != nil {
+ log.WithError(err).Error("Error while querying all excluded expressions for the CanteenDish: ", lowercaseDish)
+ }
+
+ //set all entries in included to -1 if the excluded tag was recognised for this tag rating.
+ if len(excludedTags) > 0 {
+ for _, a := range excludedTags {
+ if i := contains(includedTags, a); i != -1 {
+ includedTags[i] = -1
+ }
+ }
+ }
+
+ for _, nametagID := range includedTags {
+ if nametagID != -1 {
+ if err := db.Create(&model.DishToDishNameTag{
+ DishID: dishID,
+ NameTagID: nametagID,
+ }).Error; err != nil {
+ fields := log.Fields{"dishID": dishID, "nametagID": nametagID}
+ log.WithError(err).WithFields(fields).Error("creating a new entry")
+ }
+ }
+ }
+}
+func contains(s []int64, e int64) int64 {
+ for i, a := range s {
+ if a == e {
+ return int64(i)
+ }
+ }
+ return -1
+}
diff --git a/server/backend/cron/email_templates/feedback_body.gohtml b/server/backend/cron/email_templates/feedback_body.gohtml
new file mode 100644
index 00000000..411eb53e
--- /dev/null
+++ b/server/backend/cron/email_templates/feedback_body.gohtml
@@ -0,0 +1,42 @@
+
Feedback via TumCampusApp:
+{{ if .Feedback.Valid -}}
+
+ {{- .Feedback.String -}}
+
+{{- else -}}
+no feedback provided
+{{- end }}
+
+{{- if .ImageCount }}
+Fotos:
+
+{{- range $val := iterate .ImageCount }}
+ -
+ Foto {{ $val }}
+
+{{- end }}
+
+{{- end -}}
diff --git a/server/backend/cron/email_templates/feedback_body.txt.tmpl b/server/backend/cron/email_templates/feedback_body.txt.tmpl
new file mode 100644
index 00000000..e4c6c7d0
--- /dev/null
+++ b/server/backend/cron/email_templates/feedback_body.txt.tmpl
@@ -0,0 +1,22 @@
+Feedback via TumCampusApp:
+
+{{ if .Feedback.Valid }}
+{{- .Feedback.String -}}
+{{ else -}}
+no feedback provided
+{{- end }}
+
+Metadata:
+{{- if .Latitude.Valid }}
+- Nutzer-Standort: {{ .Latitude.Float64 }},{{ .Longitude.Float64 }} (latitude,longitude)
+ https://www.google.com/maps/search/?api=1&query={{ .Latitude.Float64 }},{{ .Longitude.Float64 }}
+{{- end }}
+- OS-Version: {{ if .OsVersion.Valid }}{{.OsVersion.String }}{{else}}unknown{{end}}
+- App-Version: {{ if .AppVersion.Valid }}{{.AppVersion.String }}{{else}}unknown{{end}}
+{{- if .ImageCount }}
+
+Photos:
+ {{- range $val := iterate .ImageCount }}
+- Photo {{ $val }}: https://app.tum.de/File/feedback/{{ $.Id }}/{{ $val }}.png
+ {{- end -}}
+{{- end -}}
diff --git a/server/backend/cron/feedback_email.go b/server/backend/cron/feedback_email.go
new file mode 100644
index 00000000..c1ffa02f
--- /dev/null
+++ b/server/backend/cron/feedback_email.go
@@ -0,0 +1,146 @@
+package cron
+
+import (
+ "bytes"
+ htmlTemplate "html/template"
+ "os"
+ "strconv"
+ textTemplate "text/template"
+ "time"
+
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ log "github.com/sirupsen/logrus"
+ "gopkg.in/gomail.v2"
+
+ _ "embed"
+)
+
+//go:embed email_templates/feedback_body.gohtml
+var htmlFeedbackBody string
+
+//go:embed email_templates/feedback_body.txt.tmpl
+var txtFeedbackBody string
+
+// iterate is a template helper to make counting possible
+func iterate(count int32) []int32 {
+ var items []int32
+ var i int32
+ for i = 0; i < count; i++ {
+ items = append(items, i)
+ }
+ return items
+}
+
+func parseTemplates() (*htmlTemplate.Template, *textTemplate.Template, error) {
+ funcMap := textTemplate.FuncMap{"iterate": iterate}
+ parsedHtmlBody, err := htmlTemplate.New("htmlFeedbackBody").Funcs(funcMap).Parse(htmlFeedbackBody)
+ if err != nil {
+ return nil, nil, err
+ }
+ parsedTxtBody, err := textTemplate.New("txtFeedbackBody").Funcs(funcMap).Parse(txtFeedbackBody)
+ if err != nil {
+ return nil, nil, err
+ }
+ return parsedHtmlBody, parsedTxtBody, nil
+
+}
+
+type MailHeaders struct {
+ From string
+ To string
+ ReplyTo string //optional
+ Timestamp time.Time
+ Subject string
+}
+
+func messageWithHeaders(feedback *model.Feedback) *gomail.Message {
+ m := gomail.NewMessage()
+ // From
+ m.SetAddressHeader("From", os.Getenv("SMTP_USERNAME"), "TUM Campus App")
+ // To
+ if feedback.Recipient.Valid {
+ m.SetHeader("To", feedback.Recipient.String)
+ } else {
+ m.SetHeader("To", "app@tum.de")
+ }
+ // ReplyTo
+ if feedback.ReplyTo.Valid {
+ m.SetHeader("Reply-To", feedback.ReplyTo.String)
+ }
+ // Timestamp
+ if feedback.Timestamp.Valid {
+ m.SetDateHeader("Date", feedback.Timestamp.Time)
+ } else {
+ m.SetDateHeader("Date", time.Now())
+ }
+ // Subject
+ m.SetHeader("Subject", "Feedback via Tum Campus App")
+ return m
+}
+
+func generateTemplatedMail(parsedHtmlBody *htmlTemplate.Template, parsedTxtBody *textTemplate.Template, feedback *model.Feedback) (string, string, error) {
+ var htmlBodyBuffer bytes.Buffer
+ if err := parsedHtmlBody.Execute(&htmlBodyBuffer, feedback); err != nil {
+ return "", "", err
+ }
+ var txtBodyBuffer bytes.Buffer
+ if err := parsedTxtBody.Execute(&txtBodyBuffer, feedback); err != nil {
+ return "", "", err
+ }
+ return htmlBodyBuffer.String(), txtBodyBuffer.String(), nil
+}
+
+func (c *CronService) feedbackEmailCron() error {
+
+ var results []model.Feedback
+ if err := c.db.Find(&results, "processed = false").Scan(&results).Error; err != nil {
+ log.WithError(err).Error("could not get unprocessed feedback")
+ return err
+ }
+ parsedHtmlBody, parsedTxtBody, err := parseTemplates()
+ if err != nil {
+ log.WithError(err).Error("could not parse email templates")
+ return err
+ }
+
+ dialer, err := setupSMTPDialer()
+ if err != nil {
+ return err
+ }
+ for i, feedback := range results {
+ m := messageWithHeaders(&feedback)
+
+ // attach a body
+ htmlBodyBuffer, txtBodyBuffer, err := generateTemplatedMail(parsedHtmlBody, parsedTxtBody, &feedback)
+ if err != nil {
+ log.WithError(err).Error("Could not template mail body")
+ return err
+ }
+ m.SetBody("text/plain", txtBodyBuffer)
+ m.AddAlternative("text/html", htmlBodyBuffer)
+
+ // send mail
+ if err := dialer.DialAndSend(m); err != nil {
+ log.WithError(err).Error("could not send mail")
+ continue
+ }
+ log.Tracef("sending feedback %d to %v successfull", i, feedback.Recipient)
+
+ // prevent the message being send the next time around
+ if err := c.db.Find(model.Feedback{}, "id = ?", feedback.Id).Update("processed", "true").Error; err != nil {
+ log.WithError(err).Error("could not prevent mail from being send again")
+ }
+ }
+ return nil
+}
+
+// setupSMTPDialer sets up the SMTP dialer
+func setupSMTPDialer() (*gomail.Dialer, error) {
+ smtpPort, err := strconv.Atoi(os.Getenv("SMTP_PORT"))
+ if err != nil {
+ log.WithError(err).Error("SMTP_PORT is not an integer")
+ return nil, err
+ }
+ d := gomail.NewDialer(os.Getenv("SMTP_URL"), smtpPort, os.Getenv("SMTP_USERNAME"), os.Getenv("SMTP_PASSWORD"))
+ return d, nil
+}
diff --git a/server/backend/cron/feedback_email_test.go b/server/backend/cron/feedback_email_test.go
new file mode 100644
index 00000000..90dd0d16
--- /dev/null
+++ b/server/backend/cron/feedback_email_test.go
@@ -0,0 +1,157 @@
+package cron
+
+import (
+ "os"
+ "testing"
+ "time"
+
+ "github.com/guregu/null"
+
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestIterate(t *testing.T) {
+ assert.Equal(t, []int32(nil), iterate(0))
+ assert.Equal(t, []int32{0}, iterate(1))
+ assert.Equal(t, []int32{0, 1}, iterate(2))
+ assert.Equal(t, []int32{0, 1, 2}, iterate(3))
+ assert.Equal(t, []int32{0, 1, 2, 3}, iterate(4))
+ assert.Equal(t, 42, len(iterate(42)))
+}
+
+func fullFeedback() *model.Feedback {
+ return &model.Feedback{
+ EmailId: null.StringFrom("magic-id"),
+ Recipient: null.StringFrom("tca"),
+ ReplyTo: null.StringFrom("test@example.de"),
+ Feedback: null.StringFrom("This is a Test"),
+ ImageCount: 1,
+ Latitude: null.FloatFrom(0),
+ Longitude: null.FloatFrom(0),
+ AppVersion: null.StringFrom("TCA 10.2"),
+ OsVersion: null.StringFrom("Android 10.0"),
+ Timestamp: null.TimeFrom(time.Now()),
+ }
+}
+
+func emptyFeedback() *model.Feedback {
+ return &model.Feedback{
+ EmailId: null.String{},
+ Recipient: null.String{},
+ ReplyTo: null.String{},
+ Feedback: null.String{},
+ ImageCount: 0,
+ Latitude: null.Float{},
+ Longitude: null.Float{},
+ AppVersion: null.String{},
+ OsVersion: null.String{},
+ Timestamp: null.Time{},
+ }
+}
+
+func TestHeaderInstantiationWithFullFeedback(t *testing.T) {
+ require.NoError(t, os.Setenv("SMTP_USERNAME", "outgoing@example.de"))
+ fb := fullFeedback()
+ m := messageWithHeaders(fb)
+ assert.Equal(t, []string{`"TUM Campus App" `}, m.GetHeader("From"))
+ assert.Equal(t, []string{fb.Recipient.String}, m.GetHeader("To"))
+ assert.Equal(t, []string{"test@example.de"}, m.GetHeader("Reply-To"))
+ assert.Equal(t, []string{fb.Timestamp.Time.Format(time.RFC1123Z)}, m.GetHeader("Date"))
+ assert.Equal(t, []string{"Feedback via Tum Campus App"}, m.GetHeader("Subject"))
+}
+
+func TestHeaderInstantiationWithEmptyFeedback(t *testing.T) {
+ require.NoError(t, os.Setenv("SMTP_USERNAME", "outgoing@example.de"))
+ m := messageWithHeaders(emptyFeedback())
+ assert.Equal(t, []string{`"TUM Campus App" `}, m.GetHeader("From"))
+ assert.Equal(t, []string{"app@tum.de"}, m.GetHeader("To"))
+ assert.Equal(t, []string(nil), m.GetHeader("Reply-To"))
+ // Date is set to now in messageWithHeaders => checking that this is actually now is a bit tricker
+ dates := m.GetHeader("Date")
+ assert.Equal(t, 1, len(dates))
+ date, err := time.Parse(time.RFC1123Z, dates[0])
+ require.NoError(t, err)
+ assert.WithinDuration(t, time.Now(), date, time.Minute)
+ assert.Equal(t, []string{"Feedback via Tum Campus App"}, m.GetHeader("Subject"))
+}
+
+func TestTemplatingResultsWithFullFeedback(t *testing.T) {
+ html, txt, err := parseTemplates()
+ require.NoError(t, err)
+ htmlBody, txtBody, err := generateTemplatedMail(html, txt, fullFeedback())
+ require.NoError(t, err)
+ assert.Equal(t, `Feedback via TumCampusApp:
+This is a Test
+
+
+ Inforation type |
+ Details |
+
+
+ Nutzer-Standort |
+
+
+ latitude: 0, longitude: 0
+
+ |
+
+
+ OS-Version |
+ Android 10.0 |
+
+
+ App-Version |
+ TCA 10.2 |
+
+
+Fotos:
+
+ -
+ Foto 0
+
+
`, htmlBody)
+ assert.Equal(t, `Feedback via TumCampusApp:
+
+This is a Test
+
+Metadata:
+- Nutzer-Standort: 0,0 (latitude,longitude)
+ https://www.google.com/maps/search/?api=1&query=0,0
+- OS-Version: Android 10.0
+- App-Version: TCA 10.2
+
+Photos:
+- Photo 0: https://app.tum.de/File/feedback/0/0.png`, txtBody)
+}
+
+func TestTemplatingResultsWithEmptyFeedback(t *testing.T) {
+ html, txt, err := parseTemplates()
+ require.NoError(t, err)
+ htmlBody, txtBody, err := generateTemplatedMail(html, txt, emptyFeedback())
+ require.NoError(t, err)
+ assert.Equal(t, `Feedback via TumCampusApp:
+no feedback provided
+
+
+ Inforation type |
+ Details |
+
+
+ OS-Version |
+ unknown |
+
+
+ App-Version |
+ unknown |
+
+
`, htmlBody)
+ assert.Equal(t, `Feedback via TumCampusApp:
+
+no feedback provided
+
+Metadata:
+- OS-Version: unknown
+- App-Version: unknown`, txtBody)
+}
diff --git a/server/backend/cron/fileDownload.go b/server/backend/cron/fileDownload.go
deleted file mode 100644
index f70e1f10..00000000
--- a/server/backend/cron/fileDownload.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package cron
-
-import (
- "bytes"
- "fmt"
- "image"
- "io"
- "net/http"
- "os"
- "strings"
-
- "github.com/TUM-Dev/Campus-Backend/server/model"
- "github.com/disintegration/imaging"
- "github.com/gabriel-vasile/mimetype"
- log "github.com/sirupsen/logrus"
- "gorm.io/gorm"
-)
-
-// fileDownloadCron Downloads all files that are not marked as finished in the database.
-func (c *CronService) fileDownloadCron() error {
- var files []model.Files
- err := c.db.Find(&files, "downloaded = 0").Scan(&files).Error
- if err != nil && err != gorm.ErrRecordNotFound {
- return err
- }
- for i := range files {
- if files[i].URL.Valid {
- c.downloadFile(files[i])
- }
- }
- return nil
-}
-
-// downloadFile Downloads a file, marks it downloaded and resizes it if it's an image.
-// url: download url of the file
-// name: target name of the file
-func (c *CronService) downloadFile(file model.Files) {
- if !file.URL.Valid {
- log.WithField("fileId", file.File).Info("skipping file without url")
- }
- url := file.URL.String
- log.WithField("url", url).Info("downloading file")
- resp, err := http.Get(url)
- if err != nil {
- log.WithError(err).WithField("url", url).Warn("Could not download image")
- return
- }
- // read body here because we can't exhaust the io.reader twice
- body, err := io.ReadAll(resp.Body)
- if err != nil {
- log.WithError(err).Warn("Unable to read http body")
- return
- }
-
- // resize if file is image
- mime := mimetype.Detect(body)
- if strings.HasPrefix(mime.String(), "image/") {
- downloadedImg, _, err := image.Decode(bytes.NewReader(body))
- if err != nil {
- log.WithError(err).WithField("url", url).Warn("Couldn't decode source image")
- return
- }
-
- // in our case resolves to /Storage/news/newspread/1234abc.jpg
- dstFileName := fmt.Sprintf("%s%s", file.Path, file.Name)
- dstImage := imaging.Resize(downloadedImg, 1280, 0, imaging.Lanczos)
- err = imaging.Save(dstImage, StorageDir+dstFileName, imaging.JPEGQuality(75))
- if err != nil {
- log.WithError(err).WithField("url", url).Warn("Could not save image file")
- return
- }
- } else {
- // save without resizing image
- err = os.WriteFile(fmt.Sprintf("%s%s", file.Path, file.Name), body, 0644)
- if err != nil {
- log.WithError(err).Error("Can't save file to disk")
- return
- }
- }
- err = c.db.Model(&model.Files{}).Where("url = ?", url).Update("downloaded", true).Error
- if err != nil {
- log.WithError(err).Error("Could not set image to downloaded.")
- }
-}
diff --git a/server/backend/cron/file_download.go b/server/backend/cron/file_download.go
new file mode 100644
index 00000000..8b2706a0
--- /dev/null
+++ b/server/backend/cron/file_download.go
@@ -0,0 +1,118 @@
+package cron
+
+import (
+ "errors"
+ "io"
+ "net/http"
+ "os"
+ "path"
+ "strings"
+
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ "github.com/disintegration/imaging"
+ "github.com/gabriel-vasile/mimetype"
+ log "github.com/sirupsen/logrus"
+ "gorm.io/gorm"
+)
+
+// fileDownloadCron downloads all files that are not marked as finished in the database
+func (c *CronService) fileDownloadCron() error {
+ return c.db.Transaction(func(tx *gorm.DB) error {
+ var files []model.File
+ err := tx.Find(&files, "downloaded = 0 AND url IS NOT NULL").Error
+ if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
+ log.WithError(err).Error("Could not get files from database")
+ return err
+ }
+ for _, file := range files {
+ // in our case resolves to /Storage/news/newspread/1234abc.jpg
+ dstPath := path.Join(StorageDir, file.Path, file.Name)
+ fields := log.Fields{"url": file.URL.String, "dstPath": dstPath}
+ log.WithFields(fields).Info("downloading file")
+
+ if err = tx.Model(&model.File{File: file.File}).Update("downloads", file.Downloads+1).Error; err != nil {
+ log.WithError(err).WithFields(fields).Error("Could not set update the download-count")
+ continue
+ }
+
+ if err := ensureFileDoesNotExist(dstPath); err != nil {
+ log.WithError(err).WithFields(fields).Warn("Could not ensure file does not exist")
+ continue
+ }
+ if err := downloadFile(file.URL.String, dstPath); err != nil {
+ log.WithError(err).WithFields(fields).Warn("Could not download file")
+ continue
+ }
+ if err := maybeResizeImage(dstPath); err != nil {
+ log.WithError(err).WithFields(fields).Warn("Could not resize image")
+ continue
+ }
+ // everything went well => we can mark the file as downloaded
+ if err = tx.Model(&model.File{URL: file.URL}).Update("downloaded", true).Error; err != nil {
+ log.WithError(err).WithFields(fields).Error("Could not set image to downloaded.")
+ continue
+ }
+ }
+ return nil
+ })
+}
+
+// ensureFileDoesNotExist makes sure that the file does not exist, but the directory in which it should be does
+func ensureFileDoesNotExist(dstPath string) error {
+ if _, err := os.Stat(dstPath); err == nil {
+ // file already exists
+ return os.Remove(dstPath)
+ }
+ return os.MkdirAll(path.Dir(dstPath), 0755)
+}
+
+// maybeResizeImage resizes the image if it's an image to 1280px width keeping the aspect ratio
+func maybeResizeImage(dstPath string) error {
+ mime, err := mimetype.DetectFile(dstPath)
+ if err != nil {
+ return err
+ }
+ if !strings.HasPrefix(mime.String(), "image/") {
+ return nil
+ }
+
+ img, err := imaging.Open(dstPath)
+ if err != nil {
+ return err
+ }
+ resizedImage := imaging.Resize(img, 1280, 0, imaging.Lanczos)
+ return imaging.Save(resizedImage, dstPath, imaging.JPEGQuality(75))
+}
+
+// downloadFile Downloads a file from the given url and saves it to the given path
+func downloadFile(url string, dstPath string) error {
+ fields := log.Fields{"url": url, "dstPath": dstPath}
+ resp, err := http.Get(url)
+ if err != nil {
+ return err
+ }
+ defer func(Body io.ReadCloser) {
+ if err := Body.Close(); err != nil {
+ log.WithError(err).WithFields(fields).Error("Error while closing body")
+ }
+ }(resp.Body)
+ if resp.StatusCode != http.StatusOK {
+ return err
+ }
+
+ // save the file to disk
+ out, err := os.Create(dstPath)
+ if err != nil {
+ return err
+ }
+ defer func(out *os.File) {
+ err := out.Close()
+ if err != nil {
+ log.WithError(err).WithFields(fields).Error("Error while closing file")
+ }
+ }(out)
+ if _, err := io.Copy(out, resp.Body); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/server/backend/cron/file_download_test.go b/server/backend/cron/file_download_test.go
new file mode 100644
index 00000000..18e0e0c1
--- /dev/null
+++ b/server/backend/cron/file_download_test.go
@@ -0,0 +1,91 @@
+package cron
+
+import (
+ "image"
+ "os"
+ "testing"
+
+ "github.com/disintegration/imaging"
+ "github.com/stretchr/testify/require"
+)
+
+func TestMaybeResizeImage(t *testing.T) {
+ t.Run("Resize Image", func(t *testing.T) {
+ dstPath := "test_image.jpg"
+ require.NoError(t, createDummyImage(dstPath, 2000, 1000))
+ defer os.Remove(dstPath)
+ require.NoError(t, maybeResizeImage(dstPath))
+ img, err := imaging.Open(dstPath)
+ require.NoError(t, err)
+ require.Equal(t, 1280, img.Bounds().Dx())
+ require.Equal(t, 640, img.Bounds().Dy())
+ })
+ t.Run("Do not Resize smaller Image", func(t *testing.T) {
+ dstPath := "test_image.jpg"
+ require.NoError(t, createDummyImage(dstPath, 1000, 2000))
+ defer os.Remove(dstPath)
+ require.NoError(t, maybeResizeImage(dstPath))
+ img, err := imaging.Open(dstPath)
+ require.NoError(t, err)
+ require.Equal(t, 1280, img.Bounds().Dx())
+ require.Equal(t, 2560, img.Bounds().Dy())
+ })
+
+ t.Run("Skip Non-Image", func(t *testing.T) {
+ nonImageFile := "non_image.txt"
+ content := []byte("Dummy Text")
+ require.NoError(t, createDummyFile(nonImageFile, content))
+ defer os.Remove(nonImageFile)
+ require.NoError(t, maybeResizeImage(nonImageFile))
+ contentAfterExecution, err := os.ReadFile(nonImageFile)
+ require.NoError(t, err)
+ require.Equal(t, content, contentAfterExecution)
+ })
+}
+
+func TestEnsureFileDoesNotExist(t *testing.T) {
+ tmpFilePath := "test_dir/test_file.txt"
+ defer func() { _ = os.RemoveAll("test_dir") }()
+
+ t.Run("FileDoesNotExist", func(t *testing.T) {
+ require.NoError(t, ensureFileDoesNotExist(tmpFilePath))
+
+ _, dirErr := os.Stat("test_dir")
+ require.NoError(t, dirErr)
+
+ _, fileErr := os.Stat(tmpFilePath)
+ require.True(t, os.IsNotExist(fileErr))
+ })
+
+ t.Run("FileExists", func(t *testing.T) {
+ _, createErr := os.Create(tmpFilePath)
+ require.NoError(t, createErr)
+
+ require.NoError(t, ensureFileDoesNotExist(tmpFilePath))
+
+ _, dirErr := os.Stat("test_dir")
+ require.NoError(t, dirErr)
+
+ _, fileErr := os.Stat(tmpFilePath)
+ require.True(t, os.IsNotExist(fileErr))
+ })
+}
+
+// createDummyImage creates a dummy image file with the specified dimensions
+func createDummyImage(filePath string, width, height int) error {
+ img := image.NewRGBA(image.Rect(0, 0, width, height))
+ return imaging.Save(img, filePath, imaging.JPEGQuality(75))
+}
+
+// createDummyFile creates a dummy non-image file
+func createDummyFile(filePath string, content []byte) error {
+ file, err := os.Create(filePath)
+ if err != nil {
+ return err
+ }
+ defer file.Close()
+ if _, err := file.Write(content); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/server/backend/cron/iosNotifications.go b/server/backend/cron/ios_notifications.go
similarity index 59%
rename from server/backend/cron/iosNotifications.go
rename to server/backend/cron/ios_notifications.go
index ce9b8c96..99c51161 100644
--- a/server/backend/cron/iosNotifications.go
+++ b/server/backend/cron/ios_notifications.go
@@ -1,31 +1,31 @@
package cron
import (
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_device"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_devices_activity_reset"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_scheduled_update_log"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_scheduling"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/device"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/devices_activity_reset"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/scheduled_update_log"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/scheduling"
)
// Starts the cron job for sending iOS notifications reuses
-// the APNs client (ios_apns.Service) stored in CronService
+// the APNs client (apns.Service) stored in CronService
func (c *CronService) iosNotificationsCron() error {
if !c.APNs.IsActive {
return nil
}
- repo := ios_scheduling.NewRepository(c.db)
- devicesRepo := ios_device.NewRepository(c.db)
- schedulerRepo := ios_scheduled_update_log.NewRepository(c.db)
+ repo := scheduling.NewRepository(c.db)
+ devicesRepo := device.NewRepository(c.db)
+ schedulerRepo := scheduled_update_log.NewRepository(c.db)
- service := ios_scheduling.NewService(repo, devicesRepo, schedulerRepo, c.APNs)
+ service := scheduling.NewService(repo, devicesRepo, schedulerRepo, c.APNs)
return service.HandleScheduledCron()
}
// Resets the activity of all devices to 0 every day, week, month or year
func (c *CronService) iosActivityReset() error {
- service := ios_devices_activity_reset.NewService(c.db)
+ service := devices_activity_reset.NewService(c.db)
return service.HandleScheduledActivityReset()
}
diff --git a/server/backend/cron/kino.go b/server/backend/cron/kino.go
deleted file mode 100644
index 0ad8106a..00000000
--- a/server/backend/cron/kino.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package cron
-
-//lint:ignore U1000 stub
-func (c *CronService) kinoCron() error {
- // TODO: implement
- return nil
-}
diff --git a/server/backend/cron/movies.go b/server/backend/cron/movies.go
new file mode 100644
index 00000000..1d2a85e4
--- /dev/null
+++ b/server/backend/cron/movies.go
@@ -0,0 +1,229 @@
+package cron
+
+import (
+ "encoding/json"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "os"
+ "regexp"
+ "strings"
+ "time"
+
+ "github.com/guregu/null"
+
+ "github.com/PuerkitoBio/goquery"
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ log "github.com/sirupsen/logrus"
+)
+
+type MovieItems struct {
+ Title string `xml:"title"`
+ Link string `xml:"link"`
+ PubDate string `xml:"pubDate"`
+ Location string `xml:"location"`
+ Enclosure struct {
+ Url string `xml:"url,attr"`
+ Length string `xml:"length,attr"`
+ Type string `xml:"type,attr"`
+ } `xml:"enclosure"`
+}
+
+type MovieChannel struct {
+ Items []MovieItems `xml:"item"`
+}
+
+const (
+ MovieImageDirectory = "movie/"
+)
+
+func (c *CronService) movieCron() error {
+ log.Trace("parsing upcoming feed")
+ channels, err := parseUpcomingFeed()
+ if err != nil {
+ return err
+ }
+ for _, channel := range channels {
+ for _, item := range channel.Items {
+ logFields := log.Fields{"link": item.Link, "title": item.Title, "date": item.PubDate, "location": item.Location, "url": item.Enclosure.Url}
+ var exists bool
+ if err := c.db.Model(model.Kino{}).Select("count(*) > 0").Find(&exists, "link = ?", item.Link).Error; err != nil {
+ log.WithError(err).WithFields(logFields).Error("Cound lot check if movie already exists")
+ continue
+ }
+ if exists {
+ log.WithFields(logFields).Trace("Movie already exists")
+ continue
+ }
+
+ // data cleanup
+ date, err := time.Parse(time.RFC1123Z, item.PubDate)
+ if err != nil {
+ log.WithError(err).WithFields(logFields).Error("Couldn't check if movie already exists")
+ continue
+ }
+
+ // populate extra data from omdb
+ imdbID, err := extractImdbIDFromTUFilmWebsite(item.Link)
+ if err != nil {
+ log.WithFields(logFields).WithError(err).Error("error while finding imdb id")
+ continue
+ }
+ omdbMovie, err := getOmdbMovie(imdbID)
+ if err != nil {
+ log.WithFields(logFields).WithError(err).Error("error while getting omdb movie")
+ continue
+ }
+
+ // add a file to preview (downloaded in another cronjob)
+ file := model.File{
+ Name: item.Title,
+ Path: MovieImageDirectory,
+ URL: null.StringFrom(item.Enclosure.Url),
+ }
+ if err := c.db.Create(&file).Error; err != nil {
+ log.WithFields(logFields).WithError(err).Error("error while creating file")
+ continue
+ }
+
+ // save the result of the previous steps (🎉)
+ movie := model.Kino{
+ Date: date,
+ Title: item.Title,
+ Year: omdbMovie.ReleaseYear,
+ Runtime: omdbMovie.Runtime,
+ Genre: omdbMovie.Genre,
+ Director: omdbMovie.Director,
+ Actors: omdbMovie.Actors,
+ ImdbRating: omdbMovie.ImdbRating,
+ Description: omdbMovie.Plot, // we get this from imdb as tu-fim does truncate their plot
+ FileID: file.File,
+ File: file,
+ Link: item.Link,
+ }
+ if err := c.db.Create(&movie).Error; err != nil {
+ log.WithFields(logFields).WithError(err).Error("error while creating movie")
+ continue
+ } else {
+ log.WithFields(logFields).Debug("created movie")
+ }
+ }
+ }
+ return nil
+}
+
+type omdbResults struct {
+ ReleaseYear string `json:"Year"`
+ Runtime string
+ Genre string
+ Director string
+ Actors string
+ Plot string
+ ImdbRating string `json:"imdbRating"`
+}
+
+func getOmdbMovie(id string) (*omdbResults, error) {
+ url := fmt.Sprintf("https://www.omdbapi.com/?r=json&v=1&i=%s&apikey=%s", id, os.Getenv("OMDB_API_KEY"))
+ resp, err := http.Get(url)
+ if err != nil {
+ log.WithField("url", url).WithError(err).Error("Error while getting response for request")
+ return nil, err
+ }
+ // check if the api key is valid
+ if resp.StatusCode == http.StatusUnauthorized {
+ return nil, errors.New("missing or invalid api key for omdb (environment variable OMDB_API_KEY)")
+ }
+ // other errors
+ if resp.StatusCode != http.StatusOK {
+ body, err := io.ReadAll(resp.Body)
+ if err != nil {
+ log.WithError(err).Warn("Unable to read http body")
+ return nil, err
+ } else {
+ log.WithField("status", resp.StatusCode).WithField("status", resp.Status).WithField("body", string(body)).Error("error while getting omdb movie")
+ return nil, errors.New("error while getting omdb movie")
+ }
+ }
+ defer func(Body io.ReadCloser) {
+ err := Body.Close()
+ if err != nil {
+ log.WithField("url", url).WithError(err).Error("Error while closing body")
+ }
+ }(resp.Body)
+ // parse the response body
+ var res omdbResults
+ err = json.NewDecoder(resp.Body).Decode(&res)
+ if err != nil {
+ log.WithField("url", url).WithError(err).Error("Error while unmarshalling omdbResults")
+ return nil, err
+ }
+ return &res, nil
+}
+
+// extractImdbIDFromTUFilmWebsite scrapes the imdb id and fullDescription from the tu-film website
+// url: url of the tu-film website, e.g. https://www.tu-film.de/programm/view/1204
+func extractImdbIDFromTUFilmWebsite(url string) (string, error) {
+ resp, err := http.Get(url)
+ if err != nil {
+ return "", errors.New("error while getting response for request")
+ }
+ defer func(Body io.ReadCloser) {
+ err := Body.Close()
+ if err != nil {
+ log.WithError(err).Error("Error while closing body")
+ }
+ }(resp.Body)
+ // parse the response body
+ return parseImdbIDFromReader(resp.Body)
+}
+
+func parseImdbIDFromReader(body io.Reader) (string, error) {
+ doc, err := goquery.NewDocumentFromReader(body)
+ if err != nil {
+ log.WithError(err).Error("Error while parsing document")
+ return "", err
+ }
+
+ // extract the imdb link
+ imdbLinks := doc.Find("a").FilterFunction(func(i int, s *goquery.Selection) bool {
+ href, hrefExists := s.Attr("href")
+ return hrefExists && strings.Contains(href, "imdb.com/title/")
+ })
+ if imdbLinks.Length() == 0 {
+ return "", errors.New("no imdb link found")
+ }
+ if imdbLinks.Length() > 1 {
+ log.Warn("more than one imdb link found. using first one")
+ }
+ // extract the imdb id from the link
+ href, _ := imdbLinks.First().Attr("href")
+ re := regexp.MustCompile(`https?://www.imdb.com/title/(?P[^/]+)/?`)
+ return re.FindStringSubmatch(href)[re.SubexpIndex("imdb_id")], nil
+}
+
+// parseUpcomingFeed downloads a file from a given url and returns the path to the file
+func parseUpcomingFeed() ([]MovieChannel, error) {
+ resp, err := http.Get("https://www.tu-film.de/programm/index/upcoming.rss")
+ if err != nil {
+ log.WithError(err).Error("Error while getting response for request")
+ return nil, err
+ }
+ defer func(Body io.ReadCloser) {
+ err := Body.Close()
+ if err != nil {
+ log.WithError(err).Error("Error while closing body")
+ }
+ }(resp.Body)
+ //Parse the data into a struct
+ var upcomingMovies struct {
+ Channels []MovieChannel `xml:"channel"`
+ }
+ err = xml.NewDecoder(resp.Body).Decode(&upcomingMovies)
+ if err != nil {
+ log.WithError(err).Error("Error while unmarshalling UpcomingFeed")
+ return nil, err
+ }
+ return upcomingMovies.Channels, nil
+}
diff --git a/server/backend/cron/movies_test.go b/server/backend/cron/movies_test.go
new file mode 100644
index 00000000..3f95b1b3
--- /dev/null
+++ b/server/backend/cron/movies_test.go
@@ -0,0 +1,69 @@
+package cron
+
+import (
+ "strings"
+ "testing"
+)
+
+func TestIMDBExtration(t *testing.T) {
+ reader := strings.NewReader(`
+
+
+
+
+
+
+
+
+
+`)
+ imdbID, err := parseImdbIDFromReader(reader)
+ if err != nil {
+ t.Error(err)
+ }
+ if imdbID != "tt10640346" {
+ t.Error("imdbID is not correct")
+ }
+}
diff --git a/server/backend/cron/new_exam_results_hook.go b/server/backend/cron/new_exam_results_hook.go
new file mode 100644
index 00000000..94a0dcfc
--- /dev/null
+++ b/server/backend/cron/new_exam_results_hook.go
@@ -0,0 +1,15 @@
+package cron
+
+import (
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/device"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/new_exam_results_hook/scheduling"
+)
+
+func (c *CronService) newExamResultsHookCron() error {
+ repo := scheduling.NewRepository(c.db)
+ devicesRepo := device.NewRepository(c.db)
+
+ service := scheduling.NewService(repo, devicesRepo, c.APNs)
+
+ return service.HandleScheduledCron()
+}
diff --git a/server/backend/cron/news.go b/server/backend/cron/news.go
index 02198907..8514c0b0 100644
--- a/server/backend/cron/news.go
+++ b/server/backend/cron/news.go
@@ -2,7 +2,6 @@ package cron
import (
"crypto/md5"
- "database/sql"
"errors"
"fmt"
"regexp"
@@ -18,9 +17,9 @@ import (
)
const (
- ImageDirectory = "news/newspread/"
- NewspreadHook = "newspread"
- ImpulsivHook = "impulsivHook"
+ NewsImageDirectory = "news/newspread/"
+ NewspreadHook = "newspread"
+ ImpulsivHook = "impulsivHook"
//MAX_IMAGE_RETRYS = 3
)
@@ -88,42 +87,47 @@ func (c *CronService) parseNewsFeed(source model.NewsSource) error {
}
}
- if !skipNews(existingNewsLinksForSource, item.Link) {
- // pick the first enclosure that is an image (if any)
- var pickedEnclosure *gofeed.Enclosure
- var enclosureUrl = null.String{NullString: sql.NullString{Valid: true, String: ""}}
- for _, enclosure := range item.Enclosures {
- if strings.HasSuffix(enclosure.URL, "jpg") ||
- strings.HasSuffix(enclosure.URL, "jpeg") ||
- strings.HasSuffix(enclosure.URL, "png") ||
- ImageContentTypeRegex.MatchString(enclosure.Type) {
- pickedEnclosure = enclosure
- break
- }
+ if skipNews(existingNewsLinksForSource, item.Link) {
+ continue
+ }
+
+ // pick the first enclosure that is an image (if any)
+ var pickedEnclosure *gofeed.Enclosure
+ for _, enclosure := range item.Enclosures {
+ if strings.HasSuffix(enclosure.URL, "jpg") ||
+ strings.HasSuffix(enclosure.URL, "jpeg") ||
+ strings.HasSuffix(enclosure.URL, "png") ||
+ ImageContentTypeRegex.MatchString(enclosure.Type) {
+ pickedEnclosure = enclosure
+ break
}
- var fileId = null.Int{NullInt64: sql.NullInt64{Valid: false}}
- if pickedEnclosure != nil {
- fileId, err = c.saveImage(pickedEnclosure.URL)
- if err != nil {
- log.WithError(err).Error("can't save news image")
- }
- enclosureUrl = null.String{NullString: sql.NullString{String: pickedEnclosure.URL, Valid: true}}
+ }
+ var enclosureUrl = null.StringFrom("")
+ var file *model.File
+ var fileID null.Int
+ if pickedEnclosure != nil {
+ file, err = c.saveImage(pickedEnclosure.URL)
+ if err != nil {
+ log.WithError(err).WithField("url", pickedEnclosure.URL).Error("can't save news image")
+ } else {
+ fileID = null.IntFrom(file.File)
}
- bm := bluemonday.StrictPolicy()
- sanitizedDesc := bm.Sanitize(item.Description)
+ enclosureUrl = null.StringFrom(pickedEnclosure.URL)
+ }
- newsItem := model.News{
- Date: *item.PublishedParsed,
- Created: time.Now(),
- Title: item.Title,
- Description: sanitizedDesc,
- Src: source.Source,
- Link: item.Link,
- Image: enclosureUrl,
- File: fileId,
- }
- newNews = append(newNews, newsItem)
+ newsItem := model.News{
+ Date: *item.PublishedParsed,
+ Created: time.Now(),
+ Title: item.Title,
+ Description: bluemonday.StrictPolicy().Sanitize(item.Description),
+ NewsSourceID: source.Source,
+ NewsSource: source,
+ Link: item.Link,
+ Image: enclosureUrl,
+ FileID: fileID,
+ File: file,
}
+ newNews = append(newNews, newsItem)
}
if ammountOfNewNews := len(newNews); ammountOfNewNews != 0 {
err = c.db.Save(&newNews).Error
@@ -137,39 +141,30 @@ func (c *CronService) parseNewsFeed(source model.NewsSource) error {
return nil
}
-// saveImage Saves an image to the database so it can be downloaded by another cronjob and returns its id
-func (c *CronService) saveImage(url string) (null.Int, error) {
+// saveImage saves an image to the database, so it can be downloaded by another cronjob and returns its id
+func (c *CronService) saveImage(url string) (*model.File, error) {
targetFileName := fmt.Sprintf("%x.jpg", md5.Sum([]byte(url)))
- var fileId null.Int
- if err := c.db.Model(model.Files{}).
- Where("name = ?", targetFileName).
- Select("file").Scan(&fileId).Error; err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
+ var file model.File
+ // path intentionally omitted in query to allow for deduplication
+ if err := c.db.First(&file, "name = ?", targetFileName).Error; err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
log.WithError(err).WithField("targetFileName", targetFileName).Error("Couldn't query database for file")
- return null.Int{}, err
- }
- if fileId.Valid { // file already in database -> return for current news.
- return fileId, nil
+ return nil, err
+ } else if err == nil {
+ return &file, nil
}
- // otherwise store in database:
- file := model.Files{
+ // does not exist, store in database
+ file = model.File{
Name: targetFileName,
- Path: ImageDirectory,
- URL: sql.NullString{String: url, Valid: true},
- Downloaded: sql.NullBool{Bool: false, Valid: true},
+ Path: NewsImageDirectory,
+ URL: null.StringFrom(url),
+ Downloaded: null.BoolFrom(false),
}
- err := c.db.Transaction(func(tx *gorm.DB) error {
- if err := tx.Create(&file).Error; err != nil {
- log.WithError(err).Error("Could not store new file to database")
- return err
- }
- return nil
- })
- if err != nil {
- return null.Int{}, err
+ if err := c.db.Create(&file).Error; err != nil {
+ log.WithError(err).Error("Could not store new file to database")
+ return nil, err
}
- // creating this int is annoying but i'm too afraid to use real ORM in the model
- return null.Int{NullInt64: sql.NullInt64{Int64: int64(file.File), Valid: true}}, nil
+ return &file, nil
}
// skipNews returns true if link is in existingLinks or link is invalid
@@ -185,7 +180,7 @@ func skipNews(existingLinks []string, link string) bool {
return false
}
-func (c *CronService) cleanOldNewsForSource(source int32) error {
+func (c *CronService) cleanOldNewsForSource(source int64) error {
log.WithField("source", source).Trace("Truncating old entries")
if res := c.db.Delete(&model.News{}, "`src` = ? AND `created` < ?", source, time.Now().Add(time.Hour*24*365*-1)); res.Error == nil {
log.WithField("RowsAffected", res.RowsAffected).Info("cleaned up old news")
@@ -205,7 +200,6 @@ func (c *CronService) newspreadHook(item *gofeed.Item) {
extractedImageURL = extractedImageSlice[0]
}
item.Enclosures = []*gofeed.Enclosure{{URL: extractedImageURL}}
- item.Link = extractedImageURL
item.Description = ""
}
diff --git a/server/backend/cron/roomfinder.go b/server/backend/cron/roomfinder.go
deleted file mode 100644
index af68f7e4..00000000
--- a/server/backend/cron/roomfinder.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package cron
-
-//lint:ignore U1000 stub
-func (c *CronService) roomFinderCron() error {
- // TODO: implement
- return nil
-}
diff --git a/server/backend/device.go b/server/backend/device.go
index 0250f4e7..b580a4e0 100644
--- a/server/backend/device.go
+++ b/server/backend/device.go
@@ -18,23 +18,22 @@ import (
// deviceBuffer stores all recent device calls in a buffer and flushes them to the database periodically
type deviceBuffer struct {
- lock sync.Mutex
- devices map[string]*model.Devices // key is uuid
- interval time.Duration // flush interval
+ lock sync.Mutex
+ devices map[string]*model.Devices // key is uuid
}
func newDeviceBuffer() *deviceBuffer {
return &deviceBuffer{
- lock: sync.Mutex{},
- devices: make(map[string]*model.Devices),
- interval: time.Minute,
+ lock: sync.Mutex{},
+ devices: make(map[string]*model.Devices),
}
-
}
+const FlushingInterval = time.Minute
+
func (s *CampusServer) RunDeviceFlusher() error {
for {
- time.Sleep(s.deviceBuf.interval)
+ time.Sleep(FlushingInterval)
if err := s.deviceBuf.flush(s.db); err != nil {
log.WithError(err).Error("Error flushing device buffer")
}
@@ -124,26 +123,26 @@ func (s *CampusServer) checkDevice(ctx context.Context) error {
return nil
}
-func (s *CampusServer) RegisterDevice(_ context.Context, req *pb.RegisterDeviceRequest) (*pb.RegisterDeviceReply, error) {
- if err := ValidateRegisterDevice(req); err != nil {
+func (s *CampusServer) CreateDevice(_ context.Context, req *pb.CreateDeviceRequest) (*pb.CreateDeviceReply, error) {
+ if err := ValidateCreateDevice(req); err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}
switch req.GetDeviceType() {
case pb.DeviceType_ANDROID:
- return nil, status.Error(codes.Unimplemented, "android device register not implemented")
+ return nil, status.Error(codes.Unimplemented, "android device creation not implemented")
case pb.DeviceType_IOS:
service := s.GetIOSDeviceService()
- return service.RegisterDevice(req)
+ return service.CreateDevice(req)
case pb.DeviceType_WINDOWS:
- return nil, status.Error(codes.Unimplemented, "windows device register not implemented")
+ return nil, status.Error(codes.Unimplemented, "windows device creation not implemented")
}
return nil, status.Error(codes.InvalidArgument, "invalid device type")
}
-func (s *CampusServer) RemoveDevice(_ context.Context, req *pb.RemoveDeviceRequest) (*pb.RemoveDeviceReply, error) {
- if err := ValidateRemoveDevice(req); err != nil {
+func (s *CampusServer) DeleteDevice(_ context.Context, req *pb.DeleteDeviceRequest) (*pb.DeleteDeviceReply, error) {
+ if err := ValidateDeleteDevice(req); err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}
@@ -152,7 +151,7 @@ func (s *CampusServer) RemoveDevice(_ context.Context, req *pb.RemoveDeviceReque
return nil, status.Error(codes.Unimplemented, "android device remove not implemented")
case pb.DeviceType_IOS:
service := s.GetIOSDeviceService()
- return service.RemoveDevice(req)
+ return service.DeleteDevice(req)
case pb.DeviceType_WINDOWS:
return nil, status.Error(codes.Unimplemented, "windows device remove not implemented")
}
diff --git a/server/backend/feedback.go b/server/backend/feedback.go
new file mode 100644
index 00000000..8cc3cb22
--- /dev/null
+++ b/server/backend/feedback.go
@@ -0,0 +1,160 @@
+package backend
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "os"
+ "path"
+ "slices"
+
+ pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/cron"
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ "github.com/gabriel-vasile/mimetype"
+ "github.com/gofrs/uuid/v5"
+ "github.com/guregu/null"
+ log "github.com/sirupsen/logrus"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+ "gorm.io/gorm"
+)
+
+// CreateFeedback accepts a stream of feedback messages from the client and stores them in the database/file system.
+func (s *CampusServer) CreateFeedback(stream pb.Campus_CreateFeedbackServer) error {
+ // receive metadata
+ id, err := uuid.NewGen().NewV4()
+ if err != nil {
+ log.WithError(err).Error("Error generating uuid")
+ return status.Error(codes.Internal, "Error starting feedback submission")
+ }
+ feedback := &model.Feedback{EmailId: null.StringFrom(id.String())}
+
+ // download images
+ dbPath := path.Join("feedback", feedback.EmailId.String)
+ var uploadedFilenames []*string
+ for {
+ req, err := stream.Recv()
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ log.WithError(err).Error("Error receiving feedback")
+ deleteUploaded(feedback.EmailId.String)
+ return status.Error(codes.Internal, "Error receiving feedback")
+ }
+ mergeFeedback(feedback, req)
+
+ if len(req.Attachment) > 0 {
+ filename := handleImageUpload(req.Attachment, len(uploadedFilenames), dbPath)
+ if filename != nil {
+ uploadedFilenames = append(uploadedFilenames, filename)
+ }
+ }
+ }
+ feedback.ImageCount = int32(len(uploadedFilenames))
+ // save feedback to db
+ if err := s.db.WithContext(stream.Context()).Transaction(func(tx *gorm.DB) error {
+ for _, filename := range uploadedFilenames {
+ if err := tx.Create(&model.File{
+ Name: *filename,
+ Path: dbPath,
+ Downloads: 1,
+ Downloaded: null.BoolFrom(true),
+ }).Error; err != nil {
+ return err
+ }
+ }
+ return tx.Create(feedback).Error
+ }); err != nil {
+ log.WithError(err).Error("Error creating feedback")
+ deleteUploaded(feedback.EmailId.String)
+ return status.Error(codes.Internal, "Error creating feedback")
+ }
+
+ if err := stream.SendAndClose(&pb.CreateFeedbackReply{}); err != nil {
+ log.WithError(err).Error("Error sending feedback-reply")
+ return status.Error(codes.Internal, "Error sending feedback-reply")
+ }
+ return nil
+}
+
+// deleteUploaded deletes all uploaded images from the filesystem
+func deleteUploaded(dbPath string) {
+ if err := os.RemoveAll(cron.StorageDir + dbPath); err != nil {
+ log.WithError(err).WithField("path", dbPath).Error("Error deleting uploaded images from filesystem")
+ }
+}
+
+func handleImageUpload(content []byte, imageCounter int, dbPath string) *string {
+ filename, realFilePath := inferFileName(mimetype.Detect(content), dbPath, imageCounter)
+ if filename == nil {
+ return nil // the filetype is not accepted by us
+ }
+
+ if err := os.MkdirAll(path.Dir(*realFilePath), 0755); err != nil {
+ log.WithError(err).WithField("dbPath", dbPath).Error("Error creating directory for feedback")
+ return nil
+ }
+ out, err := os.Create(*realFilePath)
+ if err != nil {
+ log.WithError(err).WithField("path", dbPath).Error("Error creating file for feedback")
+ return nil
+ }
+ defer func(out *os.File) {
+ err := out.Close()
+ if err != nil {
+ log.WithError(err).WithField("path", dbPath).Error("Error while closing file")
+ }
+ }(out)
+ if _, err := io.Copy(out, bytes.NewReader(content)); err != nil {
+ log.WithError(err).WithField("path", dbPath).Error("Error while writing file")
+ if err := os.Remove(*realFilePath); err != nil {
+ log.WithError(err).WithField("path", dbPath).Warn("Could not clean up file")
+ }
+ return nil
+ }
+ return filename
+}
+
+func inferFileName(mime *mimetype.MIME, dbPath string, counter int) (*string, *string) {
+ allowedExt := []string{".jpeg", ".jpg", ".png", ".webp", ".md", ".txt", ".pdf"}
+ if !slices.Contains(allowedExt, mime.Extension()) {
+ return nil, nil
+ }
+
+ filename := fmt.Sprintf("%d%s", counter, mime.Extension())
+ realFilePath := path.Join(cron.StorageDir, dbPath, filename)
+ return &filename, &realFilePath
+}
+
+func mergeFeedback(feedback *model.Feedback, req *pb.CreateFeedbackRequest) {
+ if req.Recipient.Enum() != nil {
+ feedback.Recipient = null.StringFrom(receiverFromTopic(req.Recipient))
+ }
+ if req.OsVersion != "" {
+ feedback.OsVersion = null.StringFrom(req.OsVersion)
+ }
+ if req.AppVersion != "" {
+ feedback.AppVersion = null.StringFrom(req.AppVersion)
+ }
+ if req.Location != nil {
+ feedback.Longitude = null.FloatFrom(req.Location.Longitude)
+ feedback.Latitude = null.FloatFrom(req.Location.Latitude)
+ }
+ if req.Message != "" {
+ feedback.Feedback = null.StringFrom(req.Message)
+ }
+ if req.FromEmail != "" {
+ feedback.ReplyTo = null.StringFrom(req.FromEmail)
+ }
+}
+
+func receiverFromTopic(topic pb.CreateFeedbackRequest_Recipient) string {
+ switch topic {
+ case pb.CreateFeedbackRequest_TUM_DEV:
+ return "app@tum.de"
+ default:
+ return "kontakt@tum.de"
+ }
+}
diff --git a/server/backend/feedback_test.go b/server/backend/feedback_test.go
new file mode 100644
index 00000000..550143c9
--- /dev/null
+++ b/server/backend/feedback_test.go
@@ -0,0 +1,191 @@
+package backend
+
+import (
+ "bytes"
+ "context"
+ "database/sql"
+ "image"
+ "image/png"
+ "io"
+ "os"
+ "path"
+ "regexp"
+ "testing"
+ "time"
+
+ "github.com/TUM-Dev/Campus-Backend/server/backend/cron"
+
+ "github.com/DATA-DOG/go-sqlmock"
+ pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
+ "github.com/stretchr/testify/require"
+ "github.com/stretchr/testify/suite"
+ "google.golang.org/grpc"
+ "gorm.io/driver/mysql"
+ "gorm.io/gorm"
+)
+
+type FeedbackSuite struct {
+ suite.Suite
+ DB *gorm.DB
+ mock sqlmock.Sqlmock
+}
+
+func (s *FeedbackSuite) SetupSuite() {
+ var (
+ db *sql.DB
+ err error
+ )
+
+ db, s.mock, err = sqlmock.New()
+ require.NoError(s.T(), err)
+
+ dialector := mysql.New(mysql.Config{
+ Conn: db,
+ DriverName: "mysql",
+ })
+ s.mock.ExpectQuery("SELECT VERSION()").
+ WillReturnRows(sqlmock.NewRows([]string{"VERSION()"}).AddRow("10.11.4-MariaDB"))
+ s.DB, err = gorm.Open(dialector, &gorm.Config{})
+ require.NoError(s.T(), err)
+}
+
+type mockedFeedbackStream struct {
+ grpc.ServerStream
+ recived []*pb.CreateFeedbackRequest
+ reply *pb.CreateFeedbackReply
+ T *testing.T
+}
+
+func (f mockedFeedbackStream) SendAndClose(reply *pb.CreateFeedbackReply) error {
+ require.Equal(f.T, f.reply, reply)
+ return nil
+}
+
+// because of the way the mocked stream works, we need to keep track of the index
+// we however can't track this inside of mockedFeedbackStream, as we cannot mutate the struct
+// => tracking this as a global variable is the only way
+var index = uint(0)
+
+func (f mockedFeedbackStream) Recv() (*pb.CreateFeedbackRequest, error) {
+ if int(index) >= len(f.recived) {
+ return nil, io.EOF
+ }
+ index++
+ return f.recived[index-1], nil
+}
+
+func (f mockedFeedbackStream) Context() context.Context {
+ // reset index, as this function is called before Recv()
+ // This is a hacky solution, but it works
+ index = 0
+ return context.Background()
+}
+
+// createDummyImage creates a dummy image with the specified dimensions
+func createDummyImage(t *testing.T, width, height int) []byte {
+ img := image.NewRGBA(image.Rect(0, 0, width, height))
+ // encode img to buffer
+ buf := new(bytes.Buffer)
+ require.NoError(t, png.Encode(buf, img))
+ return buf.Bytes()
+}
+
+func (s *FeedbackSuite) Test_CreateFeedback_OneFile() {
+ cron.StorageDir = "test_one_image/"
+ defer func(path string) {
+ err := os.RemoveAll(path)
+ if err != nil {
+ s.T().Fatal(err)
+ }
+ }(cron.StorageDir)
+
+ server := CampusServer{db: s.DB}
+ s.mock.ExpectBegin()
+ returnedTime := time.Now()
+ s.mock.ExpectQuery(regexp.QuoteMeta("INSERT INTO `files` (`name`,`path`,`downloads`,`downloaded`) VALUES (?,?,?,?) RETURNING `url`,`file`")).
+ WithArgs("0.txt", sqlmock.AnyArg(), 1, true).
+ WillReturnRows(sqlmock.NewRows([]string{"url", "file"}).AddRow(nil, 1))
+ s.mock.ExpectQuery(regexp.QuoteMeta("INSERT INTO `files` (`name`,`path`,`downloads`,`downloaded`) VALUES (?,?,?,?) RETURNING `url`,`file`")).
+ WithArgs("1.png", sqlmock.AnyArg(), 1, true).
+ WillReturnRows(sqlmock.NewRows([]string{"url", "file"}).AddRow(nil, 1))
+ s.mock.ExpectQuery(regexp.QuoteMeta("INSERT INTO `feedback` (`image_count`,`email_id`,`receiver`,`reply_to`,`feedback`,`latitude`,`longitude`,`os_version`,`app_version`,`processed`) VALUES (?,?,?,?,?,?,?,?,?,?) RETURNING `timestamp`,`id`")).
+ WithArgs(2, sqlmock.AnyArg(), "app@tum.de", "testing@example.com", "Hello World", nil, nil, nil, nil, false).
+ WillReturnRows(sqlmock.NewRows([]string{"timestamp", "id"}).AddRow(returnedTime, 1))
+ s.mock.ExpectCommit()
+
+ dummyImage := createDummyImage(s.T(), 10, 10)
+ dummyText := []byte("Dummy Text")
+ stream := mockedFeedbackStream{
+ T: s.T(),
+ recived: []*pb.CreateFeedbackRequest{
+ {Recipient: pb.CreateFeedbackRequest_TUM_DEV, FromEmail: "testing@example.com", Message: "Hello World", Attachment: dummyText},
+ {Attachment: dummyImage},
+ },
+ reply: &pb.CreateFeedbackReply{},
+ }
+ require.NoError(s.T(), server.CreateFeedback(stream))
+
+ // check that the correct operations happened to the file system
+ files := extractUploadedFiles(s.T(), cron.StorageDir, 2)
+ expectFileMatches(s.T(), (*files)[0], "0.txt", returnedTime, dummyText)
+ expectFileMatches(s.T(), (*files)[1], "1.png", returnedTime, dummyImage)
+}
+
+func expectFileMatches(t *testing.T, file os.DirEntry, name string, returnedTime time.Time, content []byte) {
+ require.Equal(t, name, file.Name())
+ require.True(t, file.Type().IsRegular())
+ info, err := file.Info()
+ require.NoError(t, err)
+ require.LessOrEqual(t, returnedTime.Unix(), info.ModTime().Unix())
+ require.Len(t, content, int(info.Size()))
+}
+
+func (s *FeedbackSuite) Test_CreateFeedback_NoImage() {
+ cron.StorageDir = "test_no_image/"
+
+ server := CampusServer{db: s.DB}
+ s.mock.ExpectBegin()
+ s.mock.ExpectQuery(regexp.QuoteMeta("INSERT INTO `feedback` (`image_count`,`email_id`,`receiver`,`reply_to`,`feedback`,`latitude`,`longitude`,`os_version`,`app_version`,`processed`) VALUES (?,?,?,?,?,?,?,?,?,?) RETURNING `timestamp`,`id`")).
+ WithArgs(0, sqlmock.AnyArg(), "app@tum.de", "testing@example.com", "Hello World", nil, nil, nil, nil, false).
+ WillReturnRows(sqlmock.NewRows([]string{"timestamp", "id"}).AddRow(time.Now(), 1))
+ s.mock.ExpectCommit()
+
+ stream := mockedFeedbackStream{
+ T: s.T(),
+ recived: []*pb.CreateFeedbackRequest{
+ {Recipient: pb.CreateFeedbackRequest_TUM_DEV, FromEmail: "testing@example.com", Message: "Hello World"},
+ {}, // empty images should be ignored
+ },
+ reply: &pb.CreateFeedbackReply{},
+ }
+ require.NoError(s.T(), server.CreateFeedback(stream))
+
+ // no image should be uploaded to the file system
+ extractUploadedFiles(s.T(), cron.StorageDir, 0)
+}
+
+func extractUploadedFiles(t *testing.T, storageRoot string, expected int) *[]os.DirEntry {
+ parentDir, err := os.ReadDir(path.Join(storageRoot, "feedback"))
+ if expected == 0 {
+ require.Error(t, err, os.ErrNotExist.Error())
+ require.Empty(t, parentDir)
+ return nil
+ }
+
+ require.NoError(t, err)
+ require.Len(t, parentDir, 1)
+ dir, err := os.ReadDir(path.Join(storageRoot, "feedback", parentDir[0].Name()))
+ require.NoError(t, err)
+ require.Len(t, dir, expected)
+ return &dir
+}
+
+func (s *FeedbackSuite) AfterTest(_, _ string) {
+ require.NoError(s.T(), s.mock.ExpectationsWereMet())
+}
+
+// In order for 'go test' to run this suite, we need to create
+// a normal test function and pass our suite to suite.Run
+func TestExampleTestSuite(t *testing.T) {
+ suite.Run(t, new(FeedbackSuite))
+}
diff --git a/server/backend/firebase/messaging.go b/server/backend/firebase/messaging.go
deleted file mode 100644
index 4d2f909e..00000000
--- a/server/backend/firebase/messaging.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package firebase
-
-import "gorm.io/gorm"
-
-type MessagingService struct {
- db *gorm.DB
-}
-
-func New(db *gorm.DB) *MessagingService {
-
- return &MessagingService{db: db}
-}
-
-func (c *MessagingService) Run() error {
-
- return nil
-}
diff --git a/server/backend/influx/influxClient.go b/server/backend/influx/influxClient.go
deleted file mode 100644
index afb985d6..00000000
--- a/server/backend/influx/influxClient.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Package influx provides a handy wrapper around the influxdb client
-package influx
-
-import (
- "crypto/sha256"
- "encoding/hex"
- "errors"
- "os"
-
- "github.com/TUM-Dev/Campus-Backend/server/env"
- influxdb2 "github.com/influxdata/influxdb-client-go/v2"
- "github.com/influxdata/influxdb-client-go/v2/api"
- "github.com/influxdata/influxdb-client-go/v2/api/write"
- log "github.com/sirupsen/logrus"
-)
-
-var (
- influxOrg = os.Getenv("INFLUXDB_ORG")
- influxBucket = os.Getenv("INFLUXDB_BUCKET")
-
- ErrInfluxClientNotConfigured = errors.New("influx client not configured")
-)
-
-var Client *influxdb2.Client
-
-func GetClient() influxdb2.Client {
- return *Client
-}
-
-func SetClient(client *influxdb2.Client) {
- Client = client
-}
-
-func hashSha256(s string) string {
- h := sha256.New()
-
- h.Write([]byte(s))
-
- return hex.EncodeToString(h.Sum(nil))
-}
-
-func LogPoint(p *write.Point) {
- w, err := writeAPI()
-
- if err != nil {
- log.Warn("could not log because influx client is not configured")
- return
- }
-
- w.WritePoint(p)
-
- flushIfDevelop(w)
-}
-
-func flushIfDevelop(write api.WriteAPI) {
- if env.IsDev() {
- write.Flush()
- }
-}
-
-func writeAPI() (api.WriteAPI, error) {
- if Client != nil {
- return GetClient().WriteAPI(influxOrg, influxBucket), nil
- }
-
- return nil, ErrInfluxClientNotConfigured
-}
diff --git a/server/backend/influx/iosLogging.go b/server/backend/influx/iosLogging.go
deleted file mode 100644
index 5183d957..00000000
--- a/server/backend/influx/iosLogging.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package influx
-
-import influxdb2 "github.com/influxdata/influxdb-client-go/v2"
-
-func LogIOSRegisterDevice(deviceId string) {
- hashedDeviceId := hashSha256(deviceId)
-
- p := influxdb2.NewPointWithMeasurement("ios_register_device").
- AddTag("device_id", hashedDeviceId)
-
- LogPoint(p)
-}
-
-func LogIOSRemoveDevice(deviceId string) {
- hashedDeviceId := hashSha256(deviceId)
-
- p := influxdb2.NewPointWithMeasurement("ios_remove_device").
- AddTag("device_id", hashedDeviceId)
-
- LogPoint(p)
-}
-
-func LogIOSNewGrades(deviceId string, gradesCount int) {
- hashedDeviceId := hashSha256(deviceId)
-
- p := influxdb2.NewPointWithMeasurement("ios_new_grades").
- AddTag("device_id", hashedDeviceId).
- AddField("new_grades_count", gradesCount)
-
- LogPoint(p)
-}
-
-func LogIOSSchedulingDevicesToUpdate(devicesToUpdateCount int, priority int) {
- p := influxdb2.NewPointWithMeasurement("ios_scheduling_devices_to_update").
- AddTag("priority", string(rune(priority))).
- AddField("devices_to_update", devicesToUpdateCount)
-
- LogPoint(p)
-}
-
-func LogIOSBackgroundRequest(deviceId, requestType, reason string) {
- hashedDeviceId := hashSha256(deviceId)
-
- p := influxdb2.NewPointWithMeasurement("ios_campus_token_request").
- AddTag("device_id", hashedDeviceId).
- AddField("request_type", requestType).
- AddField("notification_reason_response", reason)
-
- LogPoint(p)
-}
-
-func LogIOSBackgroundRequestResponse(deviceId, requestType string) {
- hashedDeviceId := hashSha256(deviceId)
-
- p := influxdb2.NewPointWithMeasurement("ios_campus_token_response").
- AddTag("device_id", hashedDeviceId).
- AddField("request_type", requestType)
-
- LogPoint(p)
-}
diff --git a/server/backend/influxdb.go b/server/backend/influxdb.go
deleted file mode 100644
index 28ae23d9..00000000
--- a/server/backend/influxdb.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package backend
-
-import (
- "context"
- "errors"
- "os"
-
- "github.com/TUM-Dev/Campus-Backend/server/backend/influx"
- influxdb2 "github.com/influxdata/influxdb-client-go/v2"
-)
-
-const (
- // InfluxBatchSize is the number of points that are sent to influxdb at once
- // This is to reduce the number of requests to the database
- InfluxBatchSize = 500
-)
-
-var (
- influxToken = os.Getenv("INFLUXDB_TOKEN")
- influxURL = os.Getenv("INFLUXDB_URL")
-
- ErrInfluxTokenNotConfigured = errors.New("influxdb token not configured")
- ErrInfluxURLNotConfigured = errors.New("influxdb url not configured")
-)
-
-func ConnectToInfluxDB() error {
- if influxToken == "" {
- return ErrInfluxTokenNotConfigured
- }
-
- if influxURL == "" {
- return ErrInfluxURLNotConfigured
- }
-
- client := influxdb2.NewClientWithOptions(influxURL, influxToken,
- influxdb2.DefaultOptions().SetBatchSize(InfluxBatchSize))
-
- influx.SetClient(&client)
-
- _, err := influx.GetClient().Health(context.Background())
-
- return err
-}
diff --git a/server/backend/iosNotifications.go b/server/backend/iosNotifications.go
deleted file mode 100644
index bc759e92..00000000
--- a/server/backend/iosNotifications.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package backend
-
-import (
- "context"
-
- pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_apns"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_apns/ios_apns_jwt"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_device"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_request_response"
- "gorm.io/gorm"
-)
-
-type IOSNotificationsService struct {
- DB *gorm.DB
- APNSToken *ios_apns_jwt.Token
- IsActive bool
-}
-
-func (s *CampusServer) GetIOSDeviceService() *ios_device.Service {
- repository := ios_device.NewRepository(s.db)
-
- return ios_device.NewService(repository)
-}
-
-func (s *CampusServer) GetIOSAPNsService() *ios_apns.Service {
- repository := ios_apns.NewRepository(s.db, s.GetIOSNotificationsService().APNSToken)
-
- return ios_apns.NewService(repository)
-}
-
-func (s *CampusServer) GetIOSRequestResponseService() *ios_request_response.Service {
- repository := ios_request_response.NewRepository(s.db, s.GetIOSNotificationsService().APNSToken)
-
- return ios_request_response.NewService(repository)
-}
-
-func (s *CampusServer) IOSDeviceRequestResponse(_ context.Context, req *pb.IOSDeviceRequestResponseRequest) (*pb.IOSDeviceRequestResponseReply, error) {
- service := s.GetIOSRequestResponseService()
- return service.HandleDeviceRequestResponse(req, s.iOSNotificationsService.IsActive)
-}
diff --git a/server/backend/ios_notifications.go b/server/backend/ios_notifications.go
new file mode 100644
index 00000000..392997fd
--- /dev/null
+++ b/server/backend/ios_notifications.go
@@ -0,0 +1,40 @@
+package backend
+
+import (
+ "context"
+
+ pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/apns"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/device"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/request_response"
+ "gorm.io/gorm"
+)
+
+type IOSNotificationsService struct {
+ DB *gorm.DB
+ APNSToken *apns.JWTToken
+ IsActive bool
+}
+
+func (s *CampusServer) GetIOSDeviceService() *device.Service {
+ repository := device.NewRepository(s.db)
+
+ return device.NewService(repository)
+}
+
+func (s *CampusServer) GetIOSAPNsService() *apns.Service {
+ repository := apns.NewRepository(s.db, s.GetIOSNotificationsService().APNSToken)
+
+ return apns.NewService(repository)
+}
+
+func (s *CampusServer) GetIOSRequestResponseService() *request_response.Service {
+ repository := request_response.NewRepository(s.db, s.GetIOSNotificationsService().APNSToken)
+
+ return request_response.NewService(repository)
+}
+
+func (s *CampusServer) IOSDeviceRequestResponse(_ context.Context, req *pb.IOSDeviceRequestResponseRequest) (*pb.IOSDeviceRequestResponseReply, error) {
+ service := s.GetIOSRequestResponseService()
+ return service.HandleDeviceRequestResponse(req, s.iOSNotificationsService.IsActive)
+}
diff --git a/server/backend/ios_notifications/ios_apns/ios_apns_jwt/iosAPNsToken.go b/server/backend/ios_notifications/apns/jwt_token.go
similarity index 89%
rename from server/backend/ios_notifications/ios_apns/ios_apns_jwt/iosAPNsToken.go
rename to server/backend/ios_notifications/apns/jwt_token.go
index cb9cecd3..45d0dfc0 100644
--- a/server/backend/ios_notifications/ios_apns/ios_apns_jwt/iosAPNsToken.go
+++ b/server/backend/ios_notifications/apns/jwt_token.go
@@ -1,5 +1,5 @@
-// Package ios_apns_jwt handles the generation and validation of the JWT token for the APNs service
-package ios_apns_jwt
+// Package apns handles the generation and validation of the JWT token for the APNs service
+package apns
import (
"crypto/ecdsa"
@@ -29,7 +29,7 @@ var (
ApnsP8FilePath = os.Getenv("APNS_P8_FILE_PATH")
)
-type Token struct {
+type JWTToken struct {
sync.Mutex
EncryptionKey *ecdsa.PrivateKey
KeyId string
@@ -38,13 +38,13 @@ type Token struct {
Bearer string
}
-func NewToken() (*Token, error) {
+func NewToken() (*JWTToken, error) {
encryptionKey, err := APNsEncryptionKeyFromFile()
if err != nil {
return nil, err
}
- token := Token{
+ token := JWTToken{
EncryptionKey: encryptionKey,
KeyId: ApnsKeyId,
TeamId: ApnsTeamId,
@@ -99,7 +99,7 @@ func APNsEncryptionKeyFromFile() (*ecdsa.PrivateKey, error) {
return nil, ErrorAuthKeyNotEcdsa
}
-func (t *Token) GenerateNewTokenIfExpired() (bearer string) {
+func (t *JWTToken) GenerateNewTokenIfExpired() (bearer string) {
t.Lock()
defer t.Unlock()
@@ -113,11 +113,11 @@ func (t *Token) GenerateNewTokenIfExpired() (bearer string) {
return t.Bearer
}
-func (t *Token) IsExpired() bool {
+func (t *JWTToken) IsExpired() bool {
return currentTimestamp() >= (t.IssuedAt + TokenTimeout)
}
-func (t *Token) Generate() error {
+func (t *JWTToken) Generate() error {
if t.EncryptionKey == nil {
return ErrorAuthKeyNil
}
diff --git a/server/backend/ios_notifications/ios_apns/iosAPNsRepository.go b/server/backend/ios_notifications/apns/repository.go
similarity index 91%
rename from server/backend/ios_notifications/ios_apns/iosAPNsRepository.go
rename to server/backend/ios_notifications/apns/repository.go
index 3108b090..41d905d6 100644
--- a/server/backend/ios_notifications/ios_apns/iosAPNsRepository.go
+++ b/server/backend/ios_notifications/apns/repository.go
@@ -1,4 +1,4 @@
-package ios_apns
+package apns
import (
"bytes"
@@ -9,7 +9,6 @@ import (
"strconv"
"time"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_apns/ios_apns_jwt"
"github.com/TUM-Dev/Campus-Backend/server/env"
"github.com/TUM-Dev/Campus-Backend/server/model"
log "github.com/sirupsen/logrus"
@@ -38,7 +37,7 @@ var (
type Repository struct {
DB gorm.DB
- Token *ios_apns_jwt.Token
+ Token *JWTToken
httpClient *http.Client
}
@@ -48,7 +47,6 @@ func (r *Repository) ApnsUrl() string {
if env.IsProd() {
return ApnsProductionURL
}
-
return ApnsDevelopmentURL
}
@@ -87,7 +85,6 @@ func (r *Repository) SendNotification(notification *model.IOSNotificationPayload
url := r.ApnsUrl() + "/3/device/" + notification.DeviceId
body, _ := notification.MarshalJSON()
- client := r.httpClient
req, _ := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(body))
// can be e.g. alert or background
@@ -99,7 +96,7 @@ func (r *Repository) SendNotification(notification *model.IOSNotificationPayload
bearer := r.Token.GenerateNewTokenIfExpired()
req.Header.Set("authorization", "bearer "+bearer)
- resp, err := client.Do(req)
+ resp, err := r.httpClient.Do(req)
if err != nil {
log.WithError(err).Error("Could not send notification")
return nil, ErrCouldNotSendNotification
@@ -119,7 +116,7 @@ func (r *Repository) SendNotification(notification *model.IOSNotificationPayload
return &response, nil
}
-func NewRepository(db *gorm.DB, token *ios_apns_jwt.Token) *Repository {
+func NewRepository(db *gorm.DB, token *JWTToken) *Repository {
transport := &http2.Transport{
ReadIdleTimeout: ReadIdleTimeout,
}
@@ -140,9 +137,9 @@ func NewCronRepository(db *gorm.DB) (*Repository, error) {
return nil, err
}
- token, err := ios_apns_jwt.NewToken()
+ token, err := NewToken()
if err != nil {
- log.WithError(err).Fatal("Could not create APNs token")
+ log.WithError(err).Error("Could not create APNs token")
}
return NewRepository(db, token), nil
diff --git a/server/backend/ios_notifications/ios_apns/iosAPNsService.go b/server/backend/ios_notifications/apns/service.go
similarity index 74%
rename from server/backend/ios_notifications/ios_apns/iosAPNsService.go
rename to server/backend/ios_notifications/apns/service.go
index ef79c2e1..8e3f8c65 100644
--- a/server/backend/ios_notifications/ios_apns/iosAPNsService.go
+++ b/server/backend/ios_notifications/apns/service.go
@@ -1,12 +1,10 @@
-// Package ios_apns contains the logic for sending push notifications to iOS devices.
+// Package apns contains the logic for sending push notifications to iOS devices.
// and communicating with the Apple Push Notification Service (APNs).
-package ios_apns
+package apns
import (
"errors"
- "github.com/TUM-Dev/Campus-Backend/server/backend/influx"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_apns/ios_apns_jwt"
"github.com/TUM-Dev/Campus-Backend/server/model"
log "github.com/sirupsen/logrus"
"gorm.io/gorm"
@@ -27,7 +25,6 @@ type Service struct {
// and the request ID.
func (s *Service) RequestGradeUpdateForDevice(deviceID string) error {
campusRequestToken, err := s.Repository.CreateCampusTokenRequest(deviceID)
-
if err != nil {
log.WithError(err).Error("Could not create campus token request")
return ErrCouldNotCreateTokenRequest
@@ -35,32 +32,27 @@ func (s *Service) RequestGradeUpdateForDevice(deviceID string) error {
notification := model.NewIOSNotificationPayload(deviceID).Background(campusRequestToken.RequestID, model.IOSBackgroundCampusTokenRequest)
- res, err := s.Repository.SendBackgroundNotification(notification)
-
- if err != nil {
+ if _, err := s.Repository.SendBackgroundNotification(notification); err != nil {
log.WithError(err).Error("Could not send background notification")
return ErrCouldNotSendNotification
}
-
- influx.LogIOSBackgroundRequest(deviceID, campusRequestToken.RequestType, res.Reason)
-
return nil
}
func ValidateRequirementsForIOSNotificationsService() error {
- if ios_apns_jwt.ApnsKeyId == "" {
+ if ApnsKeyId == "" {
return errors.New("APNS_KEY_ID env variable is not set")
}
- if ios_apns_jwt.ApnsTeamId == "" {
+ if ApnsTeamId == "" {
return errors.New("APNS_TEAM_ID env variable is not set")
}
- if ios_apns_jwt.ApnsP8FilePath == "" {
+ if ApnsP8FilePath == "" {
return errors.New("APNS_P8_FILE_PATH env variable is not set")
}
- if _, err := ios_apns_jwt.APNsEncryptionKeyFromFile(); err != nil {
+ if _, err := APNsEncryptionKeyFromFile(); err != nil {
return errors.New("APNS P8 token is not valid or not set")
}
diff --git a/server/backend/ios_notifications/ios_crypto/encryptedString.go b/server/backend/ios_notifications/crypto/encrypted_string.go
similarity index 95%
rename from server/backend/ios_notifications/ios_crypto/encryptedString.go
rename to server/backend/ios_notifications/crypto/encrypted_string.go
index 24a7aac4..3ee6fd7c 100644
--- a/server/backend/ios_notifications/ios_crypto/encryptedString.go
+++ b/server/backend/ios_notifications/crypto/encrypted_string.go
@@ -1,5 +1,5 @@
-// Package ios_crypto provides functions for encrypting and decrypting strings using AES-256-GCM.
-package ios_crypto
+// Package crypto provides functions for encrypting and decrypting strings using AES-256-GCM.
+package crypto
import (
"crypto/aes"
diff --git a/server/backend/ios_notifications/ios_device/iosDeviceRepository.go b/server/backend/ios_notifications/device/repository.go
similarity index 95%
rename from server/backend/ios_notifications/ios_device/iosDeviceRepository.go
rename to server/backend/ios_notifications/device/repository.go
index 969256c0..13fe053c 100644
--- a/server/backend/ios_notifications/ios_device/iosDeviceRepository.go
+++ b/server/backend/ios_notifications/device/repository.go
@@ -1,4 +1,4 @@
-package ios_device
+package device
import (
"errors"
@@ -11,7 +11,7 @@ type Repository struct {
DB *gorm.DB
}
-func (repository *Repository) RegisterDevice(device *model.IOSDevice) error {
+func (repository *Repository) CreateDevice(device *model.IOSDevice) error {
return repository.DB.Transaction(func(tx *gorm.DB) error {
@@ -40,7 +40,7 @@ func (repository *Repository) RegisterDevice(device *model.IOSDevice) error {
})
}
-func (repository *Repository) RemoveDevice(deviceId string) error {
+func (repository *Repository) DeleteDevice(deviceId string) error {
if err := repository.DB.Delete(&model.IOSDevice{DeviceID: deviceId}).Error; err != nil {
return err
}
diff --git a/server/backend/ios_notifications/device/service.go b/server/backend/ios_notifications/device/service.go
new file mode 100644
index 00000000..80cc264d
--- /dev/null
+++ b/server/backend/ios_notifications/device/service.go
@@ -0,0 +1,60 @@
+// Package device provides functions to create/delete ios devices
+package device
+
+import (
+ pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/promauto"
+)
+
+type Service struct {
+ Repository *Repository
+}
+
+var (
+ ErrCouldNotCreateDevice = status.Error(codes.Internal, "Could not create device")
+ ErrCouldNotDeleteDevice = status.Error(codes.Internal, "Could not delete device")
+
+ iosRegisteredDevices = promauto.NewGauge(prometheus.GaugeOpts{
+ Subsystem: "ios",
+ Name: "ios_created_devices",
+ Help: "The number of currently created ios devices",
+ })
+)
+
+func (service *Service) CreateDevice(request *pb.CreateDeviceRequest) (*pb.CreateDeviceReply, error) {
+ device := model.IOSDevice{
+ DeviceID: request.GetDeviceId(),
+ PublicKey: request.GetPublicKey(),
+ }
+
+ if err := service.Repository.CreateDevice(&device); err != nil {
+ return nil, ErrCouldNotCreateDevice
+ }
+ iosRegisteredDevices.Inc()
+
+ return &pb.CreateDeviceReply{
+ DeviceId: device.DeviceID,
+ }, nil
+}
+
+func (service *Service) DeleteDevice(request *pb.DeleteDeviceRequest) (*pb.DeleteDeviceReply, error) {
+ if err := service.Repository.DeleteDevice(request.GetDeviceId()); err != nil {
+ return nil, ErrCouldNotDeleteDevice
+ }
+
+ iosRegisteredDevices.Dec()
+ return &pb.DeleteDeviceReply{
+ DeviceId: request.GetDeviceId(),
+ }, nil
+}
+
+func NewService(db *Repository) *Service {
+ return &Service{
+ Repository: db,
+ }
+}
diff --git a/server/backend/ios_notifications/ios_devices_activity_reset/iosDevicesActivityResetRepository.go b/server/backend/ios_notifications/devices_activity_reset/repository.go
similarity index 98%
rename from server/backend/ios_notifications/ios_devices_activity_reset/iosDevicesActivityResetRepository.go
rename to server/backend/ios_notifications/devices_activity_reset/repository.go
index e2c02b0d..251187c6 100644
--- a/server/backend/ios_notifications/ios_devices_activity_reset/iosDevicesActivityResetRepository.go
+++ b/server/backend/ios_notifications/devices_activity_reset/repository.go
@@ -1,4 +1,4 @@
-package ios_devices_activity_reset
+package devices_activity_reset
import (
"time"
diff --git a/server/backend/ios_notifications/ios_devices_activity_reset/iosDevicesActivityResetService.go b/server/backend/ios_notifications/devices_activity_reset/service.go
similarity index 94%
rename from server/backend/ios_notifications/ios_devices_activity_reset/iosDevicesActivityResetService.go
rename to server/backend/ios_notifications/devices_activity_reset/service.go
index 764c590e..f808a983 100644
--- a/server/backend/ios_notifications/ios_devices_activity_reset/iosDevicesActivityResetService.go
+++ b/server/backend/ios_notifications/devices_activity_reset/service.go
@@ -1,9 +1,9 @@
-package ios_devices_activity_reset
+package devices_activity_reset
import (
"time"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_device"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/device"
log "github.com/sirupsen/logrus"
"gorm.io/gorm"
)
@@ -41,7 +41,7 @@ func (service *Service) HandleScheduledActivityReset() error {
now := time.Now()
- devicesRepo := ios_device.NewRepository(service.Repository.DB)
+ devicesRepo := device.NewRepository(service.Repository.DB)
if now.Sub(daily.LastReset).Hours() > 24 {
if err := service.Repository.ResettedDevicesDaily(); err != nil {
diff --git a/server/backend/ios_notifications/ios_device/iosDeviceService.go b/server/backend/ios_notifications/ios_device/iosDeviceService.go
deleted file mode 100644
index 8f5209d7..00000000
--- a/server/backend/ios_notifications/ios_device/iosDeviceService.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Package ios_device provides functions to register and remove ios devices
-package ios_device
-
-import (
- pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
- "github.com/TUM-Dev/Campus-Backend/server/backend/influx"
- "github.com/TUM-Dev/Campus-Backend/server/model"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
-)
-
-type Service struct {
- Repository *Repository
-}
-
-var (
- ErrCouldNotRegisterDevice = status.Error(codes.Internal, "Could not register device")
- ErrCouldNotRemoveDevice = status.Error(codes.Internal, "Could not remove device")
-)
-
-func (service *Service) RegisterDevice(request *pb.RegisterDeviceRequest) (*pb.RegisterDeviceReply, error) {
- device := model.IOSDevice{
- DeviceID: request.GetDeviceId(),
- PublicKey: request.GetPublicKey(),
- }
-
- err := service.Repository.RegisterDevice(&device)
-
- if err != nil {
- return nil, ErrCouldNotRegisterDevice
- }
-
- influx.LogIOSRegisterDevice(request.GetDeviceId())
-
- return &pb.RegisterDeviceReply{
- DeviceId: device.DeviceID,
- }, nil
-}
-
-func (service *Service) RemoveDevice(request *pb.RemoveDeviceRequest) (*pb.RemoveDeviceReply, error) {
- err := service.Repository.RemoveDevice(request.GetDeviceId())
-
- if err != nil {
- return nil, ErrCouldNotRemoveDevice
- }
-
- influx.LogIOSRemoveDevice(request.GetDeviceId())
-
- return &pb.RemoveDeviceReply{
- DeviceId: request.GetDeviceId(),
- }, nil
-}
-
-func NewService(db *Repository) *Service {
- return &Service{
- Repository: db,
- }
-}
diff --git a/server/backend/ios_notifications/ios_request_response/iosRequestResponseRepository.go b/server/backend/ios_notifications/request_response/repository.go
similarity index 91%
rename from server/backend/ios_notifications/ios_request_response/iosRequestResponseRepository.go
rename to server/backend/ios_notifications/request_response/repository.go
index b1fab13b..9e2b39cc 100644
--- a/server/backend/ios_notifications/ios_request_response/iosRequestResponseRepository.go
+++ b/server/backend/ios_notifications/request_response/repository.go
@@ -1,14 +1,14 @@
-package ios_request_response
+package request_response
import (
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_apns/ios_apns_jwt"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/apns"
"github.com/TUM-Dev/Campus-Backend/server/model"
"gorm.io/gorm"
)
type Repository struct {
DB *gorm.DB
- Token *ios_apns_jwt.Token
+ Token *apns.JWTToken
}
func (r *Repository) SaveEncryptedGrade(grade *model.IOSEncryptedGrade) error {
@@ -70,7 +70,7 @@ func (r *Repository) DeleteAllRequestLogsForThisDeviceWithType(requestLog *model
return nil
}
-func NewRepository(db *gorm.DB, token *ios_apns_jwt.Token) *Repository {
+func NewRepository(db *gorm.DB, token *apns.JWTToken) *Repository {
return &Repository{
DB: db,
Token: token,
diff --git a/server/backend/ios_notifications/ios_request_response/iosRequestResponseService.go b/server/backend/ios_notifications/request_response/service.go
similarity index 90%
rename from server/backend/ios_notifications/ios_request_response/iosRequestResponseService.go
rename to server/backend/ios_notifications/request_response/service.go
index 4bc9bfec..85f58a72 100644
--- a/server/backend/ios_notifications/ios_request_response/iosRequestResponseService.go
+++ b/server/backend/ios_notifications/request_response/service.go
@@ -1,16 +1,18 @@
-// Package ios_request_response provides functionality to handle device requests.
+// Package request_response provides functionality to handle device requests.
// Device Requests are requests that are sent from the device to the server when the
// device received a background push notification from the backend.
-package ios_request_response
+package request_response
import (
"fmt"
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/promauto"
+
pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
"github.com/TUM-Dev/Campus-Backend/server/backend/campus_api"
- "github.com/TUM-Dev/Campus-Backend/server/backend/influx"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_apns"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_device"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/apns"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/device"
"github.com/TUM-Dev/Campus-Backend/server/model"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
@@ -28,6 +30,12 @@ var (
ErrInternalHandleGrades = status.Error(codes.Internal, "Could not handle grades request")
ErrCouldNotGetDevice = status.Error(codes.Internal, "Could not get device")
ErrAPNSNotActive = status.Error(codes.Internal, "APNS is not active")
+
+ collectedNewGrades = promauto.NewHistogram(prometheus.HistogramOpts{
+ Name: "ios_new_grades",
+ Help: "The total number of processed events",
+ Buckets: prometheus.LinearBuckets(0, 5, 5),
+ })
)
func (service *Service) HandleDeviceRequestResponse(request *pb.IOSDeviceRequestResponseRequest, apnsIsActive bool) (*pb.IOSDeviceRequestResponseReply, error) {
@@ -43,8 +51,6 @@ func (service *Service) HandleDeviceRequestResponse(request *pb.IOSDeviceRequest
return nil, ErrOutdatedRequest
}
- influx.LogIOSBackgroundRequestResponse(requestLog.DeviceID, requestLog.RequestType)
-
switch requestLog.RequestType {
case model.IOSBackgroundCampusTokenRequest.String():
campusToken := request.GetPayload()
@@ -66,7 +72,7 @@ func (service *Service) HandleDeviceRequestResponse(request *pb.IOSDeviceRequest
func (service *Service) handleDeviceCampusTokenRequest(requestLog *model.IOSDeviceRequestLog, campusToken string) (*pb.IOSDeviceRequestResponseReply, error) {
log.WithField("DeviceID", requestLog.DeviceID).Info("Handling campus token request")
- userRepo := ios_device.NewRepository(service.Repository.DB)
+ userRepo := device.NewRepository(service.Repository.DB)
device, err := userRepo.GetDevice(requestLog.DeviceID)
@@ -94,6 +100,7 @@ func (service *Service) handleDeviceCampusTokenRequest(requestLog *model.IOSDevi
}
newGrades := compareAndFindNewGrades(apiGrades.Grades, oldGrades)
+ collectedNewGrades.Observe(float64(len(newGrades)))
if len(newGrades) == 0 {
log.Info("No new grades found")
service.deleteRequestLog(requestLog)
@@ -114,9 +121,8 @@ func (service *Service) handleDeviceCampusTokenRequest(requestLog *model.IOSDevi
log.WithFields(log.Fields{"old": len(oldGrades), "new": len(newGrades)}).Info("Found grades")
if len(newGrades) > 0 && len(oldGrades) > 0 {
- apnsRepository := ios_apns.NewRepository(service.Repository.DB, service.Repository.Token)
+ apnsRepository := apns.NewRepository(service.Repository.DB, service.Repository.Token)
sendGradesToDevice(device, newGrades, apnsRepository)
- influx.LogIOSNewGrades(requestLog.DeviceID, len(newGrades))
}
service.deleteRequestLog(requestLog)
@@ -189,7 +195,7 @@ func (service *Service) encryptGradesAndStoreInDatabase(grades []model.IOSGrade,
}
}
-func sendGradesToDevice(device *model.IOSDevice, grades []model.IOSGrade, apns *ios_apns.Repository) {
+func sendGradesToDevice(device *model.IOSDevice, grades []model.IOSGrade, apns *apns.Repository) {
alertTitle := fmt.Sprintf("%d New Grades Available", len(grades))
if len(grades) == 1 {
diff --git a/server/backend/ios_notifications/ios_scheduled_update_log/iosScheduledUpdateLogRepository.go b/server/backend/ios_notifications/scheduled_update_log/repository.go
similarity index 83%
rename from server/backend/ios_notifications/ios_scheduled_update_log/iosScheduledUpdateLogRepository.go
rename to server/backend/ios_notifications/scheduled_update_log/repository.go
index 116c338d..e85ae0af 100644
--- a/server/backend/ios_notifications/ios_scheduled_update_log/iosScheduledUpdateLogRepository.go
+++ b/server/backend/ios_notifications/scheduled_update_log/repository.go
@@ -1,6 +1,6 @@
-// Package ios_scheduled_update_log provides functionality for logging scheduler updates
+// Package scheduled_update_log provides functionality for logging scheduler updates
// E.g. when a device updated its grades, the scheduler will log the update
-package ios_scheduled_update_log
+package scheduled_update_log
import (
"github.com/TUM-Dev/Campus-Backend/server/model"
diff --git a/server/backend/ios_notifications/ios_scheduling/iosSchedulingRepository.go b/server/backend/ios_notifications/scheduling/repository.go
similarity index 94%
rename from server/backend/ios_notifications/ios_scheduling/iosSchedulingRepository.go
rename to server/backend/ios_notifications/scheduling/repository.go
index d1a11d51..01c9ac2d 100644
--- a/server/backend/ios_notifications/ios_scheduling/iosSchedulingRepository.go
+++ b/server/backend/ios_notifications/scheduling/repository.go
@@ -1,4 +1,4 @@
-package ios_scheduling
+package scheduling
import (
"github.com/TUM-Dev/Campus-Backend/server/model"
diff --git a/server/backend/ios_notifications/ios_scheduling/iosSchedulingService.go b/server/backend/ios_notifications/scheduling/service.go
similarity index 81%
rename from server/backend/ios_notifications/ios_scheduling/iosSchedulingService.go
rename to server/backend/ios_notifications/scheduling/service.go
index 715684db..4c7aa2cb 100644
--- a/server/backend/ios_notifications/ios_scheduling/iosSchedulingService.go
+++ b/server/backend/ios_notifications/scheduling/service.go
@@ -1,14 +1,16 @@
-// Package ios_scheduling provides functionality for updating user information
+// Package scheduling provides functionality for updating user information
// and optionally sending notifications to iOS devices.
-package ios_scheduling
+package scheduling
import (
"sync"
- "github.com/TUM-Dev/Campus-Backend/server/backend/influx"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_apns"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_device"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_scheduled_update_log"
+ "github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/promauto"
+
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/apns"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/device"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/scheduled_update_log"
"github.com/TUM-Dev/Campus-Backend/server/model"
log "github.com/sirupsen/logrus"
)
@@ -18,12 +20,17 @@ const (
MaxRoutineCount = 10
)
+var devicesToUpdate = promauto.NewGauge(prometheus.GaugeOpts{
+ Name: "ios_scheduling_devices_to_update",
+ Help: "The numer of devices that should be updated for a given priority",
+})
+
type Service struct {
Repository *Repository
- DevicesRepository *ios_device.Repository
- SchedulerLogRepository *ios_scheduled_update_log.Repository
+ DevicesRepository *device.Repository
+ SchedulerLogRepository *scheduled_update_log.Repository
Priority *model.IOSSchedulingPriority
- APNs *ios_apns.Service
+ APNs *apns.Service
}
func (service *Service) HandleScheduledCron() error {
@@ -41,12 +48,9 @@ func (service *Service) HandleScheduledCron() error {
log.WithError(err).Error("can't get devices")
return err
}
+ devicesToUpdate.Set(float64(len(devices)))
- devicesLen := len(devices)
-
- influx.LogIOSSchedulingDevicesToUpdate(devicesLen, currentPriority.Priority)
-
- if devicesLen == 0 {
+ if len(devices) == 0 {
log.Info("No devices to update")
return nil
}
@@ -61,15 +65,12 @@ func (service *Service) HandleScheduledCron() error {
}
func (service *Service) handleDevices(devices []model.IOSDeviceLastUpdated) {
- routinesCount := routineCount(devices)
-
+ routinesCount := min(len(devices), MaxRoutineCount)
chunkSize := len(devices) / routinesCount
-
- perfectChunkable := (len(devices) % routinesCount) == 0
+ perfectlyChunkable := (len(devices) % routinesCount) == 0
chunksArrSize := routinesCount
-
- if !perfectChunkable {
+ if !perfectlyChunkable {
chunksArrSize = routinesCount + 1
}
@@ -79,7 +80,7 @@ func (service *Service) handleDevices(devices []model.IOSDeviceLastUpdated) {
chunks[i] = devices[i*chunkSize : (i+1)*chunkSize]
}
- if !perfectChunkable {
+ if !perfectlyChunkable {
chunks[routinesCount] = devices[routinesCount*chunkSize:]
}
@@ -108,14 +109,6 @@ func (service *Service) handleDevicesChunk(devices []model.IOSDeviceLastUpdated)
}
}
-func routineCount(devices []model.IOSDeviceLastUpdated) int {
- if len(devices) < MaxRoutineCount {
- return len(devices)
- }
-
- return MaxRoutineCount
-}
-
func (service *Service) LogScheduledUpdate(deviceID string) error {
scheduleLog := model.IOSScheduledUpdateLog{
DeviceID: deviceID,
@@ -171,9 +164,9 @@ func mergeIOSSchedulingPriorities(priorities []model.IOSSchedulingPriority) *mod
}
func NewService(repository *Repository,
- devicesRepository *ios_device.Repository,
- schedulerRepository *ios_scheduled_update_log.Repository,
- apnsService *ios_apns.Service,
+ devicesRepository *device.Repository,
+ schedulerRepository *scheduled_update_log.Repository,
+ apnsService *apns.Service,
) *Service {
return &Service{
Repository: repository,
diff --git a/server/backend/migration/20210709193000.go b/server/backend/migration/20210709193000.go
index c8e3967a..4968b74e 100644
--- a/server/backend/migration/20210709193000.go
+++ b/server/backend/migration/20210709193000.go
@@ -1,14 +1,21 @@
package migration
import (
- "database/sql"
-
"github.com/TUM-Dev/Campus-Backend/server/model"
"github.com/go-gormigrate/gormigrate/v2"
"github.com/guregu/null"
"gorm.io/gorm"
)
+type File struct {
+ File int64 `gorm:"primary_key;AUTO_INCREMENT;column:file;type:int;" json:"file"`
+ Name string `gorm:"column:name;type:text;size:16777215;" json:"name"`
+ Path string `gorm:"column:path;type:text;size:16777215;" json:"path"`
+ Downloads int32 `gorm:"column:downloads;type:int;default:0;" json:"downloads"`
+ URL null.String `gorm:"column:url;default:null;" json:"url"` // URL of the files source (if any)
+ Downloaded null.Bool `gorm:"column:downloaded;type:boolean;default:1;" json:"downloaded"` // true when file is ready to be served, false when still being downloaded
+}
+
// migrate20210709193000
// adds a "url" column to the database containing the url the file was downloaded from.
// adds a "finished" column to the database that indicates, that a files download is finished.
@@ -17,9 +24,14 @@ func (m TumDBMigrator) migrate20210709193000() *gormigrate.Migration {
return &gormigrate.Migration{
ID: "20210709193000",
Migrate: func(tx *gorm.DB) error {
+ if err := tx.AutoMigrate(
+ &File{},
+ ); err != nil {
+ return err
+ }
type Files struct {
- URL sql.NullString `gorm:"column:url;default:null;" json:"url"` // URL of the file source (if any)
- Downloaded sql.NullBool `gorm:"column:downloaded;type:boolean;default:1;" json:"downloaded"` // true when file is ready to be served, false when still being downloaded
+ URL null.String `gorm:"column:url;default:null;" json:"url"` // URL of the file source (if any)
+ Downloaded null.Bool `gorm:"column:downloaded;type:boolean;default:1;" json:"downloaded"` // true when file is ready to be served, false when still being downloaded
}
if err := tx.AutoMigrate(
&Files{},
@@ -29,7 +41,7 @@ func (m TumDBMigrator) migrate20210709193000() *gormigrate.Migration {
}
return tx.Create(&model.Crontab{
Interval: 300,
- Type: null.String{NullString: sql.NullString{String: "fileDownload", Valid: true}},
+ Type: null.StringFrom("fileDownload"),
}).Error
},
Rollback: func(tx *gorm.DB) error {
@@ -39,7 +51,7 @@ func (m TumDBMigrator) migrate20210709193000() *gormigrate.Migration {
if err := tx.Migrator().DropColumn("files", "finished"); err != nil {
return err
}
- return tx.Delete(&model.Crontab{}, "type = ? AND interval = ?", "fileDownload", 300).Error
+ return tx.Delete(&model.Crontab{}, "type = 'fileDownload'").Error
},
}
}
diff --git a/server/backend/migration/20220713000000.go b/server/backend/migration/20220713000000.go
index a8e53033..0f3eadf5 100644
--- a/server/backend/migration/20220713000000.go
+++ b/server/backend/migration/20220713000000.go
@@ -40,11 +40,11 @@ func (m TumDBMigrator) migrate20220713000000() *gormigrate.Migration {
},
Rollback: func(tx *gorm.DB) error {
- res := tx.Delete(&model.Crontab{}, "type = ? AND interval = ?", "dishNameDownload", 300).Error
+ res := tx.Delete(&model.Crontab{}, "type = 'dishNameDownload'").Error
if res != nil {
return res
}
- return tx.Delete(&model.Crontab{}, "type = ? AND interval = ?", "averageRatingComputation", 300).Error
+ return tx.Delete(&model.Crontab{}, "type = 'averageRatingComputation'").Error
},
}
}
diff --git a/server/backend/migration/20221119131300.go b/server/backend/migration/20221119131300.go
index 393bf9ee..8ea73cea 100644
--- a/server/backend/migration/20221119131300.go
+++ b/server/backend/migration/20221119131300.go
@@ -1,11 +1,9 @@
package migration
import (
- "database/sql"
_ "embed"
"encoding/json"
- "github.com/TUM-Dev/Campus-Backend/server/backend/cron"
"github.com/TUM-Dev/Campus-Backend/server/model"
"github.com/go-gormigrate/gormigrate/v2"
"github.com/guregu/null"
@@ -35,7 +33,7 @@ func (m TumDBMigrator) migrate20221119131300() *gormigrate.Migration {
return err
}
- if err := SafeEnumMigrate(tx, &model.Crontab{}, "type", "iosNotifications", "iosActivityReset"); err != nil {
+ if err := SafeEnumAdd(tx, &model.Crontab{}, "type", "iosNotifications", "iosActivityReset"); err != nil {
return err
}
@@ -53,7 +51,7 @@ func (m TumDBMigrator) migrate20221119131300() *gormigrate.Migration {
err := tx.Create(&model.Crontab{
Interval: 60,
- Type: null.String{NullString: sql.NullString{String: cron.IOSNotifications, Valid: true}},
+ Type: null.StringFrom("iosNotifications"),
}).Error
if err != nil {
@@ -62,12 +60,7 @@ func (m TumDBMigrator) migrate20221119131300() *gormigrate.Migration {
}
return tx.Create(&model.Crontab{
- Type: null.String{
- NullString: sql.NullString{
- String: cron.IOSActivityReset,
- Valid: true,
- },
- },
+ Type: null.StringFrom("iosActivityReset"),
Interval: 86400,
}).Error
},
@@ -92,18 +85,18 @@ func (m TumDBMigrator) migrate20221119131300() *gormigrate.Migration {
return err
}
- err := tx.Delete(&model.Crontab{}, "type = ? AND interval = ?", cron.IOSNotifications, 60).Error
+ err := tx.Delete(&model.Crontab{}, "type = 'iosNotifications'").Error
if err != nil {
return err
}
- err = tx.Delete(&model.Crontab{}, "type = ? AND interval = ?", cron.IOSActivityReset, 86400).Error
+ err = tx.Delete(&model.Crontab{}, "type = 'iosActivityReset'").Error
if err != nil {
return err
}
- return SafeEnumRollback(tx, &model.Crontab{}, "type", "iosNotifications", "iosActivityReset")
+ return SafeEnumRemove(tx, &model.Crontab{}, "type", "iosNotifications", "iosActivityReset")
},
}
}
diff --git a/server/backend/migration/20221210000000.go b/server/backend/migration/20221210000000.go
index 4baac263..9ec49d3c 100644
--- a/server/backend/migration/20221210000000.go
+++ b/server/backend/migration/20221210000000.go
@@ -1,8 +1,6 @@
package migration
import (
- "database/sql"
-
"github.com/TUM-Dev/Campus-Backend/server/model"
"github.com/go-gormigrate/gormigrate/v2"
"github.com/guregu/null"
@@ -24,23 +22,23 @@ func (m TumDBMigrator) migrate20221210000000() *gormigrate.Migration {
}
// allow "canteenHeadCount" in the enum
- if err := SafeEnumMigrate(tx, model.Crontab{}, "type", "canteenHeadCount"); err != nil {
+ if err := SafeEnumAdd(tx, model.Crontab{}, "type", "canteenHeadCount"); err != nil {
return err
}
return tx.Create(&model.Crontab{
Interval: 60 * 5, // Every 5 minutes
- Type: null.String{NullString: sql.NullString{String: "canteenHeadCount", Valid: true}},
+ Type: null.StringFrom("canteenHeadCount"),
}).Error
},
Rollback: func(tx *gorm.DB) error {
- err := tx.Delete(&model.Crontab{}, "type = ?", "canteenHeadCount").Error
+ err := tx.Delete(&model.Crontab{}, "type = 'canteenHeadCount'").Error
if err != nil {
return err
}
// Remove the 'canteenHeadCount' from the enum
- return SafeEnumRollback(tx, model.Crontab{}, "type", "canteenHeadCount")
+ return SafeEnumRemove(tx, model.Crontab{}, "type", "canteenHeadCount")
},
}
}
diff --git a/server/backend/migration/20230530000000.go b/server/backend/migration/20230530000000.go
new file mode 100644
index 00000000..add100b8
--- /dev/null
+++ b/server/backend/migration/20230530000000.go
@@ -0,0 +1,67 @@
+package migration
+
+import (
+ _ "embed"
+ "time"
+
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ "github.com/go-gormigrate/gormigrate/v2"
+ "github.com/guregu/null"
+ "gorm.io/gorm"
+)
+
+type PublishedExamResult struct {
+ Date time.Time
+ ExamID string `gorm:"primary_key"`
+ LectureTitle string
+ LectureType string
+ LectureSem string
+ Published bool
+}
+
+type NewExamResultsSubscriber struct {
+ CallbackUrl string `gorm:"primary_key"`
+ ApiKey null.String
+ CreatedAt time.Time `gorm:"autoCreateTime"`
+ LastNotifiedAt null.Time
+}
+
+func (m TumDBMigrator) migrate20230530000000() *gormigrate.Migration {
+ return &gormigrate.Migration{
+ ID: "20230530000000",
+ Migrate: func(tx *gorm.DB) error {
+
+ if err := tx.AutoMigrate(
+ &PublishedExamResult{},
+ &NewExamResultsSubscriber{},
+ ); err != nil {
+ return err
+ }
+
+ err := SafeEnumAdd(tx, model.Crontab{}, "type", "newExamResultsHook")
+ if err != nil {
+ return err
+ }
+
+ return tx.Create(&model.Crontab{
+ Interval: 60 * 10, // Every 10 minutes
+ Type: null.StringFrom("newExamResultsHook"),
+ }).Error
+ },
+ Rollback: func(tx *gorm.DB) error {
+ if err := tx.Migrator().DropTable(&PublishedExamResult{}); err != nil {
+ return err
+ }
+ if err := tx.Migrator().DropTable(&NewExamResultsSubscriber{}); err != nil {
+ return err
+ }
+
+ err := SafeEnumRemove(tx, model.Crontab{}, "type", "newExamResultsHook")
+ if err != nil {
+ return err
+ }
+
+ return tx.Delete(&model.Crontab{}, "type = 'newExamResultsHook'").Error
+ },
+ }
+}
diff --git a/server/backend/migration/20230825000000.go b/server/backend/migration/20230825000000.go
index 2e49d370..db35ca9d 100644
--- a/server/backend/migration/20230825000000.go
+++ b/server/backend/migration/20230825000000.go
@@ -1,8 +1,6 @@
package migration
import (
- "database/sql"
-
"github.com/TUM-Dev/Campus-Backend/server/model"
"github.com/go-gormigrate/gormigrate/v2"
"github.com/guregu/null"
@@ -18,15 +16,15 @@ func (m TumDBMigrator) migrate20230825000000() *gormigrate.Migration {
if err := tx.Delete(&model.Crontab{}, "type = 'chat'").Error; err != nil {
return err
}
- return SafeEnumRollback(tx, &model.Crontab{}, "type", "chat")
+ return SafeEnumRemove(tx, &model.Crontab{}, "type", "chat")
},
Rollback: func(tx *gorm.DB) error {
- if err := SafeEnumMigrate(tx, &model.Crontab{}, "type", "chat"); err != nil {
+ if err := SafeEnumAdd(tx, &model.Crontab{}, "type", "chat"); err != nil {
return err
}
return tx.Create(&model.Crontab{
Interval: 60 * 10, // Every 10 minutes
- Type: null.String{NullString: sql.NullString{String: "chat", Valid: true}},
+ Type: null.StringFrom("chat"),
}).Error
},
}
diff --git a/server/backend/migration/20230826000000.go b/server/backend/migration/20230826000000.go
new file mode 100644
index 00000000..3b8fe0dc
--- /dev/null
+++ b/server/backend/migration/20230826000000.go
@@ -0,0 +1,64 @@
+package migration
+
+import (
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ "github.com/go-gormigrate/gormigrate/v2"
+ "github.com/guregu/null"
+ "gorm.io/gorm"
+)
+
+type Feedback struct {
+ Processed bool `gorm:"column:processed;type:boolean;default:false;not null;"`
+ OsVersion null.String `gorm:"column:os_version;type:text;null;"`
+ AppVersion null.String `gorm:"column:app_version;type:text;null;"`
+}
+
+// TableName sets the insert table name for this struct type
+func (n *Feedback) TableName() string {
+ return "feedback"
+}
+
+// migrate20230826000000
+// adds a "feedbackEmail" cron job that runs every 30 minutes.
+func (m TumDBMigrator) migrate20230826000000() *gormigrate.Migration {
+ return &gormigrate.Migration{
+ ID: "20230826000000",
+ Migrate: func(tx *gorm.DB) error {
+ if err := tx.Migrator().AddColumn(&Feedback{}, "Processed"); err != nil {
+ return err
+ }
+ if err := tx.Migrator().AddColumn(&Feedback{}, "OsVersion"); err != nil {
+ return err
+ }
+ if err := tx.Migrator().AddColumn(&Feedback{}, "AppVersion"); err != nil {
+ return err
+ }
+ if err := tx.Exec("UPDATE feedback SET processed = true WHERE processed != true;").Error; err != nil {
+ return err
+ }
+ if err := SafeEnumAdd(tx, &model.Crontab{}, "type", "feedbackEmail"); err != nil {
+ return err
+ }
+ return tx.Create(&model.Crontab{
+ Interval: 60 * 30, // Every 30 minutes
+ Type: null.StringFrom("feedbackEmail"),
+ }).Error
+ },
+
+ Rollback: func(tx *gorm.DB) error {
+ if err := tx.Migrator().DropColumn(&Feedback{}, "Processed"); err != nil {
+ return err
+ }
+ if err := tx.Migrator().DropColumn(&Feedback{}, "OsVersion"); err != nil {
+ return err
+ }
+ if err := tx.Migrator().DropColumn(&Feedback{}, "AppVersion"); err != nil {
+ return err
+ }
+ if err := tx.Delete(&model.Crontab{}, "type = 'feedbackEmail'").Error; err != nil {
+ return err
+ }
+ return SafeEnumAdd(tx, &model.Crontab{}, "type", "feedbackEmail")
+ },
+ }
+}
diff --git a/server/backend/migration/20230904000000.go b/server/backend/migration/20230904000000.go
index b397022b..6c96cba6 100644
--- a/server/backend/migration/20230904000000.go
+++ b/server/backend/migration/20230904000000.go
@@ -1,8 +1,6 @@
package migration
import (
- "database/sql"
-
"github.com/TUM-Dev/Campus-Backend/server/model"
"github.com/go-gormigrate/gormigrate/v2"
"github.com/guregu/null"
@@ -19,19 +17,19 @@ func (m TumDBMigrator) migrate20230904000000() *gormigrate.Migration {
if err := tx.Delete(&model.Crontab{}, "type = 'ticketsales'").Error; err != nil {
return err
}
- if err := SafeEnumRollback(tx, model.Crontab{}, "type", "ticketsales"); err != nil {
+ if err := SafeEnumRemove(tx, model.Crontab{}, "type", "ticketsales"); err != nil {
return err
}
return nil
},
Rollback: func(tx *gorm.DB) error {
- if err := SafeEnumMigrate(tx, model.Crontab{}, "type", "ticketsales"); err != nil {
+ if err := SafeEnumAdd(tx, model.Crontab{}, "type", "ticketsales"); err != nil {
return err
}
return tx.Create(&model.Crontab{
Interval: 60 * 10, // Every 10 minutes
- Type: null.String{NullString: sql.NullString{String: "ticketsales", Valid: true}},
+ Type: null.StringFrom("ticketsales"),
}).Error
},
}
diff --git a/server/backend/migration/20230904100000.go b/server/backend/migration/20230904100000.go
new file mode 100644
index 00000000..c744432c
--- /dev/null
+++ b/server/backend/migration/20230904100000.go
@@ -0,0 +1,76 @@
+package migration
+
+import (
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ "github.com/go-gormigrate/gormigrate/v2"
+ "github.com/guregu/null"
+ "gorm.io/gorm"
+)
+
+// NewsSource struct is a row record of the newsSource table in the tca database
+type NewsSource struct {
+ Source int64 `gorm:"primary_key;AUTO_INCREMENT;column:source;type:int;"`
+ Title string `gorm:"column:title;type:text;size:16777215;"`
+ URL null.String `gorm:"column:url;type:text;size:16777215;"`
+ FileID int64 `gorm:"column:icon;not null;type:int;"`
+ File model.File `gorm:"foreignKey:FileID;references:file;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
+ Hook null.String `gorm:"column:hook;type:char;size:12;"`
+}
+
+// migrate20230904100000
+// migrates the crontab from kino to movie crontab
+func (m TumDBMigrator) migrate20230904100000() *gormigrate.Migration {
+ return &gormigrate.Migration{
+ ID: "20230904100000",
+ Migrate: func(tx *gorm.DB) error {
+ // modify the crontab
+ if err := tx.Delete(&model.Crontab{}, "type = 'kino'").Error; err != nil {
+ return err
+ }
+ if err := SafeEnumRemove(tx, &model.Crontab{}, "type", "kino"); err != nil {
+ return err
+ }
+ if err := SafeEnumAdd(tx, &model.Crontab{}, "type", "movie"); err != nil {
+ return err
+ }
+ if err := tx.AutoMigrate(&NewsSource{}); err != nil {
+ return err
+ }
+ // tu film news source is now inlined
+ if err := tx.Delete(&NewsSource{Source: 2}).Error; err != nil {
+ return err
+ }
+ return tx.Create(&model.Crontab{
+ Interval: 60 * 60 * 24, // daily
+ Type: null.StringFrom("movie"),
+ }).Error
+ },
+
+ Rollback: func(tx *gorm.DB) error {
+ // modify the crontab
+ if err := tx.Delete(&model.Crontab{}, "type = 'movie'").Error; err != nil {
+ return err
+ }
+ if err := SafeEnumRemove(tx, &model.Crontab{}, "type", "movie"); err != nil {
+ return err
+ }
+ if err := SafeEnumAdd(tx, &model.Crontab{}, "type", "kino"); err != nil {
+ return err
+ }
+ if err := tx.Create(&NewsSource{
+ Source: 2,
+ Title: "TU Film",
+ URL: null.StringFrom("http://www.tu-film.de/programm/index/upcoming.rss"),
+ FileID: 2,
+ Hook: null.String{},
+ }).Error; err != nil {
+ return err
+ }
+ return tx.Create(&model.Crontab{
+ Interval: 24 * 60 * 60, // daily
+ Type: null.StringFrom("kino"),
+ ID: null.IntFrom(2),
+ }).Error
+ },
+ }
+}
diff --git a/server/backend/migration/20231003000000.go b/server/backend/migration/20231003000000.go
new file mode 100644
index 00000000..b15eea95
--- /dev/null
+++ b/server/backend/migration/20231003000000.go
@@ -0,0 +1,232 @@
+package migration
+
+import (
+ "embed"
+ "encoding/json"
+
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ "github.com/guregu/null"
+
+ "gorm.io/gorm/logger"
+
+ "github.com/TUM-Dev/Campus-Backend/server/backend"
+ "github.com/go-gormigrate/gormigrate/v2"
+ log "github.com/sirupsen/logrus"
+ "gorm.io/gorm"
+)
+
+type multiLanguageTags struct {
+ MultiLanguageTags []tag `json:"tags"`
+}
+type tag struct {
+ TagNameEnglish string `json:"tagNameEnglish"`
+ TagNameGerman string `json:"tagNameGerman"`
+}
+
+type multiLanguageNameTags struct {
+ MultiLanguageNameTags []nameTag `json:"tags"`
+}
+type nameTag struct {
+ TagNameEnglish string `json:"tagNameEnglish"`
+ TagNameGerman string `json:"tagNameGerman"`
+ NotIncluded []string `json:"notincluded"`
+ CanBeIncluded []string `json:"canbeincluded"`
+}
+
+// State of the models at this migration
+type CafeteriaRatingTagOption struct {
+ CafeteriaRatingsTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingTagOption;type:int;not null;" json:"canteenRatingTagOption"`
+ DE string `gorm:"column:DE;text;default:de;not null;" json:"DE"`
+ EN string `gorm:"column:EN;text;default:en;not null;" json:"EN"`
+}
+
+type DishRatingTagOption struct {
+ DishRatingTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTagOption;type:int;not null;" json:"dishRatingTagOption"`
+ DE string `gorm:"column:DE;type:text;default:de;not null;" json:"DE"`
+ EN string `gorm:"column:EN;type:text;default:en;not null;" json:"EN"`
+}
+
+type DishNameTagOption struct {
+ DishNameTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOption;type:int;not null;" json:"dishNameTagOption"`
+ DE string `gorm:"column:DE;type:text;not null;" json:"DE"`
+ EN string `gorm:"column:EN;type:text;not null;" json:"EN"`
+}
+
+// TableName sets the insert table name for this struct type
+func (n *DishNameTagOption) TableName() string {
+ return "dish_name_tag_option"
+}
+
+type DishNameTagOptionExcluded struct {
+ DishNameTagOptionExcluded int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionExcluded;type:int;not null;" json:"dishNameTagOptionExcluded"`
+ NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"`
+ Expression string `gorm:"column:expression;type:text;" json:"expression"`
+}
+
+// TableName sets the insert table name for this struct type
+func (n *DishNameTagOptionExcluded) TableName() string {
+ return "dish_name_tag_option_excluded"
+}
+
+type DishNameTagOptionIncluded struct {
+ DishNameTagOptionIncluded int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionIncluded;type:int;not null;" json:"dishNameTagOptionIncluded"`
+ NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"`
+ Expression string `gorm:"column:expression;type:text;" json:"expression"`
+}
+
+// TableName sets the insert table name for this struct type
+func (n *DishNameTagOptionIncluded) TableName() string {
+ return "dish_name_tag_option_included"
+}
+
+//go:embed static_data
+var staticData embed.FS
+
+// migrate20231003000000
+// migrates the static data for the canteen rating system and adds the necessary cronjob entries
+func (m TumDBMigrator) migrate20231003000000() *gormigrate.Migration {
+ return &gormigrate.Migration{
+ ID: "20231003000000",
+ Migrate: func(tx *gorm.DB) error {
+ if err := tx.Where("1=1").Delete(&DishNameTagOption{}, &CafeteriaRatingTagOption{}, &DishNameTagOptionIncluded{}, &DishNameTagOptionExcluded{}).Error; err != nil {
+ return err
+ }
+
+ setTagTable("static_data/dishRatingTags.json", tx, backend.DISH)
+ setTagTable("static_data/cafeteriaRatingTags.json", tx, backend.CAFETERIA)
+ setNameTagOptions(tx)
+ if err := SafeEnumAdd(tx, &model.Crontab{}, "type", "averageRatingComputation", "dishNameDownload"); err != nil {
+ return err
+ }
+ if err := tx.Create(&model.Crontab{
+ Interval: 300,
+ Type: null.StringFrom("averageRatingComputation"),
+ }).Error; err != nil {
+ return err
+ }
+ return tx.Create(&model.Crontab{
+ Interval: 302400,
+ Type: null.StringFrom("dishNameDownload"),
+ }).Error
+ },
+ Rollback: func(tx *gorm.DB) error {
+ if err := tx.Where("1=1").Delete(&DishNameTagOption{}, &CafeteriaRatingTagOption{}, &DishNameTagOptionIncluded{}, &DishNameTagOptionExcluded{}).Error; err != nil {
+ return err
+ }
+ if err := tx.Delete(&model.Crontab{}, "type = 'averageRatingComputation'").Error; err != nil {
+ return err
+ }
+ if err := tx.Delete(&model.Crontab{}, "type = 'dishNameDownload'").Error; err != nil {
+ return err
+ }
+ return SafeEnumRemove(tx, &model.Crontab{}, "type", "dishNameDownload", "averageRatingComputation")
+ },
+ }
+}
+
+/*
+setNameTagOptions updates the list of dishtags.
+If a tag with the exact german and english name does not exist yet, it will be created.
+Old tags won't be removed to prevent problems with foreign keys.
+*/
+func setNameTagOptions(db *gorm.DB) {
+ file, err := staticData.ReadFile("static_data/dishNameTags.json")
+ if err != nil {
+ log.WithError(err).Error("Error including json.")
+ }
+
+ var tagsNames multiLanguageNameTags
+ if err := json.Unmarshal(file, &tagsNames); err != nil {
+ log.WithError(err).Error("Error parsing nameTagList to json.")
+ }
+ for _, v := range tagsNames.MultiLanguageNameTags {
+ parent := DishNameTagOption{
+ DE: v.TagNameGerman,
+ EN: v.TagNameEnglish,
+ }
+
+ if err := db.Session(&gorm.Session{Logger: logger.Default.LogMode(logger.Silent)}).Create(&parent).Error; err != nil {
+ fields := log.Fields{"en": v.TagNameEnglish, "de": v.TagNameGerman}
+ log.WithError(err).WithFields(fields).Error("Error while creating tag")
+ }
+
+ addCanBeIncluded(parent.DishNameTagOption, db, v)
+ addNotIncluded(parent.DishNameTagOption, db, v)
+ }
+}
+
+func addNotIncluded(parentId int64, db *gorm.DB, v nameTag) {
+ for _, expression := range v.NotIncluded {
+ fields := log.Fields{"expression": expression, "parentId": parentId}
+ err := db.
+ Session(&gorm.Session{Logger: logger.Default.LogMode(logger.Silent)}).
+ Create(&DishNameTagOptionExcluded{
+ Expression: expression,
+ NameTagID: parentId}).Error
+ if err != nil {
+ log.WithError(err).WithFields(fields).Error("Unable to create new DishNameTagOptionExcluded")
+ }
+ }
+}
+
+func addCanBeIncluded(parentId int64, db *gorm.DB, v nameTag) {
+ for _, expression := range v.CanBeIncluded {
+ fields := log.Fields{"expression": expression, "parentId": parentId}
+
+ err := db.
+ Session(&gorm.Session{Logger: logger.Default.LogMode(logger.Silent)}).
+ Create(&DishNameTagOptionIncluded{
+ Expression: expression,
+ NameTagID: parentId,
+ }).Error
+ if err != nil {
+ log.WithError(err).WithFields(fields).Error("Unable to create new can be excluded tag")
+ }
+ }
+}
+
+/*
+Reads the json file at the given path and checks whether the values have already been inserted into the corresponding table.
+If an entry with the same German and English name exists, the entry won't be added.
+The TagType is used to identify the corresponding model
+*/
+func setTagTable(path string, db *gorm.DB, tagType backend.ModelType) {
+ tagsDish := generateRatingTagListFromFile(path)
+
+ for _, v := range tagsDish.MultiLanguageTags {
+ fields := log.Fields{"de": v.TagNameGerman, "en": v.TagNameEnglish}
+ var err error
+ if tagType == backend.CAFETERIA {
+ element := CafeteriaRatingTagOption{
+ DE: v.TagNameGerman,
+ EN: v.TagNameEnglish,
+ }
+ err = db.Create(&element).Error
+ } else {
+ element := DishRatingTagOption{
+ DE: v.TagNameGerman,
+ EN: v.TagNameEnglish,
+ }
+ err = db.Session(&gorm.Session{Logger: logger.Default.LogMode(logger.Silent)}).Create(&element).Error
+ }
+
+ if err != nil {
+ log.WithError(err).WithFields(fields).Error("Unable to create new can be excluded tag")
+ } else {
+ log.WithFields(fields).Debug("New Tag successfully created")
+ }
+ }
+}
+
+func generateRatingTagListFromFile(path string) multiLanguageTags {
+ file, err := staticData.ReadFile(path)
+ if err != nil {
+ log.WithError(err).Error("Error including json.")
+ }
+
+ var tags multiLanguageTags
+ if err := json.Unmarshal(file, &tags); err != nil {
+ log.WithError(err).Error("Error parsing ratingTagList to json.")
+ }
+ return tags
+}
diff --git a/server/backend/migration/migration.go b/server/backend/migration/migration.go
index 7cd9acf6..710c333f 100644
--- a/server/backend/migration/migration.go
+++ b/server/backend/migration/migration.go
@@ -26,7 +26,7 @@ func (m TumDBMigrator) Migrate() error {
err := m.database.AutoMigrate(
&model.TopNews{},
&model.Crontab{},
- &model.Files{},
+ &model.File{},
&model.NewsSource{},
&model.NewsAlert{},
&model.News{},
@@ -50,6 +50,10 @@ func (m TumDBMigrator) Migrate() error {
m.migrate20221210000000(),
m.migrate20230825000000(),
m.migrate20230904000000(),
+ m.migrate20230530000000(),
+ m.migrate20230904100000(),
+ m.migrate20230826000000(),
+ m.migrate20231003000000(),
})
err := mig.Migrate()
return err
diff --git a/server/backend/migration/safeEnumMigrate.go b/server/backend/migration/safe_enum_migrate.go
similarity index 93%
rename from server/backend/migration/safeEnumMigrate.go
rename to server/backend/migration/safe_enum_migrate.go
index 376bdaa4..c034f861 100644
--- a/server/backend/migration/safeEnumMigrate.go
+++ b/server/backend/migration/safe_enum_migrate.go
@@ -8,7 +8,7 @@ import (
"gorm.io/gorm"
)
-func SafeEnumMigrate(tx *gorm.DB, table interface{}, column string, additionalTypes ...string) error {
+func SafeEnumAdd(tx *gorm.DB, table interface{}, column string, additionalTypes ...string) error {
enumTypes, err := getEnumTypesFromDB(tx, table, column)
if err != nil {
@@ -21,7 +21,7 @@ func SafeEnumMigrate(tx *gorm.DB, table interface{}, column string, additionalTy
return alterEnumColumn(tx, table, column, enumTypes)
}
-func SafeEnumRollback(tx *gorm.DB, table interface{}, column string, rollbackTypes ...string) error {
+func SafeEnumRemove(tx *gorm.DB, table interface{}, column string, rollbackTypes ...string) error {
enumTypes, err := getEnumTypesFromDB(tx, table, column)
if err != nil {
diff --git a/server/backend/migration/safeEnumMigrate_test.go b/server/backend/migration/safe_enum_migrate_test.go
similarity index 100%
rename from server/backend/migration/safeEnumMigrate_test.go
rename to server/backend/migration/safe_enum_migrate_test.go
diff --git a/server/backend/static_data/cafeteriaRatingTags.json b/server/backend/migration/static_data/cafeteriaRatingTags.json
similarity index 100%
rename from server/backend/static_data/cafeteriaRatingTags.json
rename to server/backend/migration/static_data/cafeteriaRatingTags.json
diff --git a/server/backend/static_data/dishNameTags.json b/server/backend/migration/static_data/dishNameTags.json
similarity index 100%
rename from server/backend/static_data/dishNameTags.json
rename to server/backend/migration/static_data/dishNameTags.json
diff --git a/server/backend/static_data/dishRatingTags.json b/server/backend/migration/static_data/dishRatingTags.json
similarity index 100%
rename from server/backend/static_data/dishRatingTags.json
rename to server/backend/migration/static_data/dishRatingTags.json
diff --git a/server/backend/movie.go b/server/backend/movie.go
new file mode 100644
index 00000000..12981ccd
--- /dev/null
+++ b/server/backend/movie.go
@@ -0,0 +1,46 @@
+package backend
+
+import (
+ "context"
+
+ pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ log "github.com/sirupsen/logrus"
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+ "google.golang.org/protobuf/types/known/timestamppb"
+)
+
+func (s *CampusServer) ListMovies(ctx context.Context, req *pb.ListMoviesRequest) (*pb.ListMoviesReply, error) {
+ var movies []model.Kino
+ tx := s.db.WithContext(ctx).Joins("File")
+ if req.OldestDateAt.GetSeconds() != 0 || req.OldestDateAt.GetNanos() != 0 {
+ tx = tx.Where("date > ?", req.OldestDateAt.AsTime())
+ }
+ if err := tx.Find(&movies, "kino > ?", req.LastId).Error; err != nil {
+ log.WithError(err).Error("Error while fetching movies from database")
+ return nil, status.Error(codes.Internal, "Error while fetching movies from database")
+ }
+ var movieResponse []*pb.Movie
+ for _, movie := range movies {
+ movieResponse = append(movieResponse, &pb.Movie{
+ MovieId: movie.Id,
+ Date: timestamppb.New(movie.Date),
+ Created: timestamppb.New(movie.Created),
+ Title: movie.Title,
+ ReleaseYear: movie.Year,
+ Runtime: movie.Runtime,
+ Genre: movie.Genre,
+ Director: movie.Director,
+ Actors: movie.Actors,
+ ImdbRating: movie.ImdbRating,
+ Description: movie.Description,
+ CoverUrl: movie.File.FullExternalUrl(),
+ CoverId: movie.File.File,
+ Link: movie.Link,
+ })
+ }
+ return &pb.ListMoviesReply{
+ Movies: movieResponse,
+ }, nil
+}
diff --git a/server/backend/movie_test.go b/server/backend/movie_test.go
new file mode 100644
index 00000000..db06e585
--- /dev/null
+++ b/server/backend/movie_test.go
@@ -0,0 +1,119 @@
+package backend
+
+import (
+ "context"
+ "database/sql"
+ "testing"
+ "time"
+
+ "github.com/DATA-DOG/go-sqlmock"
+ pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
+ "github.com/stretchr/testify/require"
+ "github.com/stretchr/testify/suite"
+ "google.golang.org/protobuf/types/known/timestamppb"
+ "gorm.io/driver/mysql"
+ "gorm.io/gorm"
+)
+
+type MovieSuite struct {
+ suite.Suite
+ DB *gorm.DB
+ mock sqlmock.Sqlmock
+}
+
+func (s *MovieSuite) SetupSuite() {
+ var (
+ db *sql.DB
+ err error
+ )
+
+ db, s.mock, err = sqlmock.New()
+ require.NoError(s.T(), err)
+
+ dialector := mysql.New(mysql.Config{
+ Conn: db,
+ DriverName: "mysql",
+ })
+ s.mock.ExpectQuery("SELECT VERSION()").
+ WillReturnRows(sqlmock.NewRows([]string{"VERSION()"}).AddRow("10.11.4-MariaDB"))
+ s.DB, err = gorm.Open(dialector, &gorm.Config{})
+ require.NoError(s.T(), err)
+}
+
+var (
+ movie1 = pb.Movie{
+ MovieId: 1,
+ Date: timestamppb.New(time.Now()),
+ Created: timestamppb.New(time.Now()),
+ Title: "Mission Impossible 4 - Ghost Protocol",
+ ReleaseYear: "2011",
+ Runtime: "133 min",
+ Genre: "Action, Adventure, Thriller",
+ Director: "Brad Bird",
+ Actors: "Tom Cruise, Jeremy Renner, Simon Pegg, Paula Patton",
+ ImdbRating: "7.4",
+ Description: "The IMF is shut down when it's implicated in the bombing of the Kremlin, causing Ethan Hunt and his new team to go rogue to clear their organization's name.",
+ CoverUrl: "https://api.tum.app/files/movie/mission_impossible_4.jpg",
+ CoverId: 1,
+ Link: "https://www.imdb.com/title/tt1229238/",
+ }
+ movie2 = pb.Movie{
+ MovieId: 2,
+ Date: timestamppb.New(time.Now()),
+ Created: timestamppb.New(time.Now()),
+ Title: "Mission Impossible 5 - Rogue Nation",
+ ReleaseYear: "2015",
+ Runtime: "131 min",
+ Genre: "Action, Adventure, Thriller",
+ Director: "Christopher McQuarrie",
+ Actors: "Tom Cruise, Jeremy Renner, Simon Pegg, Rebecca Ferguson",
+ ImdbRating: "7.4",
+ Description: "Ethan and his team take on their most impossible mission yet when they have to eradicate an international rogue organization as highly skilled as they are and committed to destroying the IMF.",
+ CoverUrl: "https://api.tum.app/files/movie/mission_impossible_5.jpg",
+ CoverId: 2,
+ Link: "https://www.imdb.com/title/tt2381249/",
+ }
+)
+
+func (s *MovieSuite) Test_ListMoviesAll() {
+ server := CampusServer{db: s.DB}
+ s.mock.ExpectQuery("SELECT `kino`.`kino`,`kino`.`date`,`kino`.`created`,`kino`.`title`,`kino`.`year`,`kino`.`runtime`,`kino`.`genre`,`kino`.`director`,`kino`.`actors`,`kino`.`rating`,`kino`.`description`,`kino`.`trailer`,`kino`.`cover`,`kino`.`link`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `kino` LEFT JOIN `files` `File` ON `kino`.`cover` = `File`.`file` WHERE kino > ?").
+ WithArgs(-1).
+ WillReturnRows(sqlmock.NewRows([]string{"kino", "date", "created", "title", "year", "runtime", "genre", "director", "actors", "rating", "description", "trailer", "cover", "link", "File__file", "File__name", "File__path", "File__downloads", "File__url", "File__downloaded"}).
+ AddRow(movie2.MovieId, movie2.Date.AsTime(), movie2.Created.AsTime(), movie2.Title, movie2.ReleaseYear, movie2.Runtime, movie2.Genre, movie2.Director, movie2.Actors, movie2.ImdbRating, movie2.Description, nil, movie2.CoverId, movie2.Link, movie2.CoverId, "mission_impossible_5.jpg", "movie/", 1, "", 1).
+ AddRow(movie1.MovieId, movie1.Date.AsTime(), movie1.Created.AsTime(), movie1.Title, movie1.ReleaseYear, movie1.Runtime, movie1.Genre, movie1.Director, movie1.Actors, movie1.ImdbRating, movie1.Description, nil, movie1.CoverId, movie1.Link, movie1.CoverId, "mission_impossible_4.jpg", "movie/", 1, "", 1))
+ response, err := server.ListMovies(context.Background(), &pb.ListMoviesRequest{LastId: -1})
+ require.NoError(s.T(), err)
+ require.Equal(s.T(), &pb.ListMoviesReply{Movies: []*pb.Movie{&movie2, &movie1}}, response)
+}
+
+func (s *MovieSuite) Test_ListMoviesOne() {
+ server := CampusServer{db: s.DB}
+ s.mock.ExpectQuery("SELECT `kino`.`kino`,`kino`.`date`,`kino`.`created`,`kino`.`title`,`kino`.`year`,`kino`.`runtime`,`kino`.`genre`,`kino`.`director`,`kino`.`actors`,`kino`.`rating`,`kino`.`description`,`kino`.`trailer`,`kino`.`cover`,`kino`.`link`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `kino` LEFT JOIN `files` `File` ON `kino`.`cover` = `File`.`file` WHERE kino > ?").
+ WithArgs(1).
+ WillReturnRows(sqlmock.NewRows([]string{"kino", "date", "created", "title", "year", "runtime", "genre", "director", "actors", "rating", "description", "trailer", "cover", "link", "File__file", "File__name", "File__path", "File__downloads", "File__url", "File__downloaded"}).
+ AddRow(movie1.MovieId, movie1.Date.AsTime(), movie1.Created.AsTime(), movie1.Title, movie1.ReleaseYear, movie1.Runtime, movie1.Genre, movie1.Director, movie1.Actors, movie1.ImdbRating, movie1.Description, nil, movie1.CoverId, movie1.Link, movie1.CoverId, "mission_impossible_4.jpg", "movie/", 1, "", 1))
+ response, err := server.ListMovies(context.Background(), &pb.ListMoviesRequest{LastId: 1})
+ require.NoError(s.T(), err)
+ require.Equal(s.T(), &pb.ListMoviesReply{Movies: []*pb.Movie{&movie1}}, response)
+}
+
+func (s *MovieSuite) Test_ListMoviesNone() {
+ server := CampusServer{db: s.DB}
+ s.mock.ExpectQuery("SELECT `kino`.`kino`,`kino`.`date`,`kino`.`created`,`kino`.`title`,`kino`.`year`,`kino`.`runtime`,`kino`.`genre`,`kino`.`director`,`kino`.`actors`,`kino`.`rating`,`kino`.`description`,`kino`.`trailer`,`kino`.`cover`,`kino`.`link`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `kino` LEFT JOIN `files` `File` ON `kino`.`cover` = `File`.`file` WHERE kino > ?").
+ WithArgs(42).
+ WillReturnRows(sqlmock.NewRows([]string{"kino", "date", "created", "title", "year", "runtime", "genre", "director", "actors", "rating", "description", "trailer", "cover", "link", "File__file", "File__name", "File__path", "File__downloads", "File__url", "File__downloaded"}))
+ response, err := server.ListMovies(context.Background(), &pb.ListMoviesRequest{LastId: 42})
+ require.NoError(s.T(), err)
+ require.Equal(s.T(), &pb.ListMoviesReply{Movies: []*pb.Movie(nil)}, response)
+}
+
+func (s *MovieSuite) AfterTest(_, _ string) {
+ require.NoError(s.T(), s.mock.ExpectationsWereMet())
+}
+
+// In order for 'go test' to run this suite, we need to create
+// a normal test function and pass our suite to suite.Run
+func TestMovieSuite(t *testing.T) {
+ suite.Run(t, new(MovieSuite))
+}
diff --git a/server/backend/new_exam_results_hook/scheduling/repository.go b/server/backend/new_exam_results_hook/scheduling/repository.go
new file mode 100644
index 00000000..558cb6c6
--- /dev/null
+++ b/server/backend/new_exam_results_hook/scheduling/repository.go
@@ -0,0 +1,41 @@
+package scheduling
+
+import (
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ "gorm.io/gorm"
+ "gorm.io/gorm/logger"
+)
+
+type Repository struct {
+ DB *gorm.DB
+}
+
+func (repository *Repository) StoreExamResultsPublished(examResultsPublished []model.PublishedExamResult) error {
+ db := repository.DB
+
+ return db.Transaction(func(tx *gorm.DB) error {
+ err := tx.Where("1 = 1").Delete(&model.PublishedExamResult{}).Error
+
+ if err != nil {
+ return err
+ }
+
+ // disabled logging because this query always prints a warning because it takes longer then normal
+ // to execute because we bulk insert a lot of data
+ return tx.Session(&gorm.Session{Logger: logger.Default.LogMode(logger.Silent)}).
+ Create(examResultsPublished).Error
+ })
+}
+
+func (repository *Repository) FindAllExamResultsPublished() (*[]model.PublishedExamResult, error) {
+ var results []model.PublishedExamResult
+ err := repository.DB.Find(&results).Error
+
+ return &results, err
+}
+
+func NewRepository(db *gorm.DB) *Repository {
+ return &Repository{
+ DB: db,
+ }
+}
diff --git a/server/backend/new_exam_results_hook/scheduling/service.go b/server/backend/new_exam_results_hook/scheduling/service.go
new file mode 100644
index 00000000..e1b68c13
--- /dev/null
+++ b/server/backend/new_exam_results_hook/scheduling/service.go
@@ -0,0 +1,99 @@
+package scheduling
+
+import (
+ "os"
+
+ "github.com/TUM-Dev/Campus-Backend/server/backend/campus_api"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/apns"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/device"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/new_exam_results_hook/subscriber"
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ log "github.com/sirupsen/logrus"
+)
+
+var (
+ CampusApiToken = os.Getenv("CAMPUS_API_TOKEN")
+)
+
+type Service struct {
+ Repository *Repository
+ DevicesRepository *device.Repository
+ Priority *model.IOSSchedulingPriority
+ APNs *apns.Service
+}
+
+func (service *Service) HandleScheduledCron() error {
+ log.Info("Fetching published exam results")
+
+ apiResult, err := campus_api.FetchExamResultsPublished(CampusApiToken)
+ if err != nil {
+ return err
+ }
+
+ var apiExamResults []model.PublishedExamResult
+ for _, apiExamResult := range apiResult.ExamResults {
+ apiExamResults = append(apiExamResults, *apiExamResult.ToDBExamResult())
+ }
+
+ storedExamResults, err := service.Repository.FindAllExamResultsPublished()
+ if err != nil {
+ return err
+ }
+
+ newPublishedExamResults := service.findNewPublishedExamResults(&apiExamResults, storedExamResults)
+
+ if len(*newPublishedExamResults) > 0 {
+ service.notifySubscribers(newPublishedExamResults)
+ } else {
+ log.Info("No new published exam results")
+ }
+
+ return service.Repository.StoreExamResultsPublished(apiExamResults)
+}
+
+func (service *Service) findNewPublishedExamResults(apiExamResults, storedExamResults *[]model.PublishedExamResult) *[]model.PublishedExamResult {
+ var apiExamResultsMap = make(map[string]model.PublishedExamResult)
+ for _, apiExamResult := range *apiExamResults {
+ apiExamResultsMap[apiExamResult.ExamID] = apiExamResult
+ }
+
+ var storedExamResultsMap = make(map[string]model.PublishedExamResult)
+ for _, storedExamResult := range *storedExamResults {
+ storedExamResultsMap[storedExamResult.ExamID] = storedExamResult
+ }
+
+ var newPublishedExamResults []model.PublishedExamResult
+
+ for id, result := range apiExamResultsMap {
+ if storedResult, ok := storedExamResultsMap[id]; ok && !storedResult.Published && result.Published {
+ newPublishedExamResults = append(newPublishedExamResults, result)
+ }
+ }
+
+ return &newPublishedExamResults
+}
+
+func (service *Service) notifySubscribers(newPublishedExamResults *[]model.PublishedExamResult) {
+ log.Infof("Notifying subscribers about %d published exam results", len(*newPublishedExamResults))
+
+ subscribersRepo := subscriber.NewRepository(service.Repository.DB)
+ subscribersService := subscriber.NewService(subscribersRepo)
+
+ err := subscribersService.NotifySubscribers(newPublishedExamResults)
+ if err != nil {
+ log.WithError(err).Error("Failed to notify subscribers")
+ return
+ }
+}
+
+func NewService(repository *Repository,
+ devicesRepository *device.Repository,
+ apnsService *apns.Service,
+) *Service {
+ return &Service{
+ Repository: repository,
+ DevicesRepository: devicesRepository,
+ Priority: model.DefaultIOSSchedulingPriority(),
+ APNs: apnsService,
+ }
+}
diff --git a/server/backend/new_exam_results_hook/subscriber/repository.go b/server/backend/new_exam_results_hook/subscriber/repository.go
new file mode 100644
index 00000000..a8059293
--- /dev/null
+++ b/server/backend/new_exam_results_hook/subscriber/repository.go
@@ -0,0 +1,59 @@
+package subscriber
+
+import (
+ "bytes"
+ "encoding/json"
+ "net/http"
+
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ log "github.com/sirupsen/logrus"
+ "gorm.io/gorm"
+)
+
+type Repository struct {
+ DB *gorm.DB
+}
+
+func (repository *Repository) FindAllSubscribers() (*[]model.NewExamResultsSubscriber, error) {
+ db := repository.DB
+
+ var subscribers []model.NewExamResultsSubscriber
+
+ err := db.Find(&subscribers).Error
+
+ return &subscribers, err
+}
+
+func (repository *Repository) NotifySubscriber(subscriber *model.NewExamResultsSubscriber, newGrades *[]model.PublishedExamResult) error {
+ url := subscriber.CallbackUrl
+
+ body, err := json.Marshal(newGrades)
+ if err != nil {
+ log.WithError(err).Error("Error while marshalling newGrades")
+ return err
+ }
+
+ req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(body))
+ if err != nil {
+ log.WithError(err).Error("Error while creating request")
+ return err
+ }
+ req.Header.Set("Content-Type", "application/json")
+ if subscriber.ApiKey.Valid {
+ req.Header.Set("Authorization", subscriber.ApiKey.String)
+ }
+
+ _, err = http.DefaultClient.Do(req)
+ if err != nil {
+ log.WithField("url", url).WithError(err).Error("Error while fetching url")
+ return err
+ }
+
+ return nil
+}
+
+func NewRepository(db *gorm.DB) *Repository {
+ return &Repository{
+ DB: db,
+ }
+}
diff --git a/server/backend/new_exam_results_hook/subscriber/service.go b/server/backend/new_exam_results_hook/subscriber/service.go
new file mode 100644
index 00000000..ef8509f6
--- /dev/null
+++ b/server/backend/new_exam_results_hook/subscriber/service.go
@@ -0,0 +1,34 @@
+package subscriber
+
+import (
+ "github.com/TUM-Dev/Campus-Backend/server/model"
+ log "github.com/sirupsen/logrus"
+)
+
+type Service struct {
+ Repository *Repository
+}
+
+func (service *Service) NotifySubscribers(newGrades *[]model.PublishedExamResult) error {
+ repository := service.Repository
+
+ subscribers, err := repository.FindAllSubscribers()
+ if err != nil {
+ return err
+ }
+
+ for _, subscriber := range *subscribers {
+ if err := repository.NotifySubscriber(&subscriber, newGrades); err != nil {
+ log.WithError(err).Error("Failed to notify subscriber")
+ continue
+ }
+ }
+
+ return nil
+}
+
+func NewService(repository *Repository) *Service {
+ return &Service{
+ Repository: repository,
+ }
+}
diff --git a/server/backend/news.go b/server/backend/news.go
index 1b86ef33..f8f29847 100644
--- a/server/backend/news.go
+++ b/server/backend/news.go
@@ -2,35 +2,113 @@ package backend
import (
"context"
+ "errors"
"fmt"
+ "gorm.io/gorm"
+
+ "google.golang.org/protobuf/types/known/timestamppb"
+
pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
"github.com/TUM-Dev/Campus-Backend/server/model"
log "github.com/sirupsen/logrus"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
- "google.golang.org/protobuf/types/known/emptypb"
)
-func (s *CampusServer) GetNewsSources(ctx context.Context, _ *emptypb.Empty) (newsSources *pb.NewsSourceReply, err error) {
- if err = s.checkDevice(ctx); err != nil {
- return
+func (s *CampusServer) ListNewsSources(ctx context.Context, _ *pb.ListNewsSourcesRequest) (*pb.ListNewsSourcesReply, error) {
+ if err := s.checkDevice(ctx); err != nil {
+ return nil, err
}
var sources []model.NewsSource
- if err := s.db.Joins("Files").Find(&sources).Error; err != nil {
+ if err := s.db.WithContext(ctx).Joins("File").Find(&sources).Error; err != nil {
log.WithError(err).Error("could not find newsSources")
- return nil, status.Error(codes.Internal, "could not GetNewsSources")
+ return nil, status.Error(codes.Internal, "could not ListNewsSources")
}
var resp []*pb.NewsSource
for _, source := range sources {
log.WithField("title", source.Title).Trace("sending news source")
resp = append(resp, &pb.NewsSource{
- Source: fmt.Sprintf("%d", source.Source),
- Title: source.Title,
- Icon: source.Files.URL.String,
+ Source: fmt.Sprintf("%d", source.Source),
+ Title: source.Title,
+ IconUrl: source.File.FullExternalUrl(),
+ })
+ }
+ return &pb.ListNewsSourcesReply{Sources: resp}, nil
+}
+
+func (s *CampusServer) ListNews(ctx context.Context, req *pb.ListNewsRequest) (*pb.ListNewsReply, error) {
+ if err := s.checkDevice(ctx); err != nil {
+ return nil, err
+ }
+
+ var newsEntries []model.News
+ tx := s.db.WithContext(ctx).Joins("File").Joins("NewsSource").Joins("NewsSource.File")
+ if req.NewsSource != 0 {
+ tx = tx.Where("src = ?", req.NewsSource)
+ }
+ if req.OldestDateAt.GetSeconds() != 0 || req.OldestDateAt.GetNanos() != 0 {
+ tx = tx.Where("date > ?", req.OldestDateAt.AsTime())
+ }
+ if req.LastNewsId != 0 {
+ tx = tx.Where("news > ?", req.LastNewsId)
+ }
+ if err := tx.Find(&newsEntries).Error; err != nil {
+ log.WithError(err).Error("could not find news item")
+ return nil, status.Error(codes.Internal, "could not ListNews")
+ }
+
+ resp := make([]*pb.News, len(newsEntries))
+ for i, item := range newsEntries {
+ log.WithField("title", item.Title).Trace("sending news")
+ imgUrl := ""
+ if item.File != nil {
+ imgUrl = item.File.FullExternalUrl()
+ }
+ resp[i] = &pb.News{
+ Id: item.News,
+ Title: item.Title,
+ Text: item.Description,
+ Link: item.Link,
+ ImageUrl: imgUrl,
+ SourceId: fmt.Sprintf("%d", item.NewsSource.Source),
+ SourceTitle: item.NewsSource.Title,
+ SourceIconUrl: item.NewsSource.File.FullExternalUrl(),
+ Created: timestamppb.New(item.Created),
+ Date: timestamppb.New(item.Date),
+ }
+ }
+ return &pb.ListNewsReply{News: resp}, nil
+}
+
+func (s *CampusServer) ListNewsAlerts(ctx context.Context, req *pb.ListNewsAlertsRequest) (*pb.ListNewsAlertsReply, error) {
+ if err := s.checkDevice(ctx); err != nil {
+ return nil, err
+ }
+
+ var res []*model.NewsAlert
+ tx := s.db.WithContext(ctx).Joins("File").Where("news_alert.to >= NOW()")
+ if req.LastNewsAlertId != 0 {
+ tx = tx.Where("news_alert.news_alert > ?", req.LastNewsAlertId)
+ }
+ if err := tx.Find(&res).Error; errors.Is(err, gorm.ErrRecordNotFound) {
+ return nil, status.Error(codes.NotFound, "no news alerts")
+ } else if err != nil {
+ log.WithError(err).Error("could not ListNewsAlerts")
+ return nil, status.Error(codes.Internal, "could not ListNewsAlerts")
+ }
+
+ var alerts []*pb.NewsAlert
+ for _, alert := range res {
+ alerts = append(alerts, &pb.NewsAlert{
+ ImageUrl: alert.File.FullExternalUrl(),
+ Link: alert.Link.String,
+ Created: timestamppb.New(alert.Created),
+ From: timestamppb.New(alert.From),
+ To: timestamppb.New(alert.To),
})
}
- return &pb.NewsSourceReply{Sources: resp}, nil
+ return &pb.ListNewsAlertsReply{Alerts: alerts}, nil
}
diff --git a/server/backend/newsAlerts.go b/server/backend/newsAlerts.go
deleted file mode 100644
index c35f32a9..00000000
--- a/server/backend/newsAlerts.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package backend
-
-import (
- "context"
- "errors"
-
- pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
- "github.com/TUM-Dev/Campus-Backend/server/model"
- log "github.com/sirupsen/logrus"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/status"
- "google.golang.org/protobuf/types/known/emptypb"
- "google.golang.org/protobuf/types/known/timestamppb"
- "gorm.io/gorm"
-)
-
-func (s *CampusServer) GetTopNews(ctx context.Context, _ *emptypb.Empty) (*pb.GetTopNewsReply, error) {
- if err := s.checkDevice(ctx); err != nil {
- return nil, err
- }
-
- var res *model.NewsAlert
- err := s.db.Joins("Files").Where("NOW() between `from` and `to`").First(&res).Error
- if errors.Is(err, gorm.ErrRecordNotFound) {
- return nil, status.Error(codes.NotFound, "no current active top news")
- } else if err != nil {
- log.WithError(err).Error("could not GetTopNews")
- return nil, status.Error(codes.Internal, "could not GetTopNews")
- }
-
- return &pb.GetTopNewsReply{
- ImageUrl: res.Files.URL.String,
- Link: res.Link.String,
- Created: timestamppb.New(res.Created),
- From: timestamppb.New(res.From),
- To: timestamppb.New(res.To),
- }, nil
-}
diff --git a/server/backend/newsAlerts_test.go b/server/backend/newsAlerts_test.go
deleted file mode 100644
index 68c7e1eb..00000000
--- a/server/backend/newsAlerts_test.go
+++ /dev/null
@@ -1,115 +0,0 @@
-package backend
-
-import (
- "context"
- "database/sql"
- "regexp"
- "testing"
- "time"
-
- "github.com/DATA-DOG/go-sqlmock"
- pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
- "github.com/TUM-Dev/Campus-Backend/server/model"
- "github.com/guregu/null"
- "github.com/stretchr/testify/require"
- "github.com/stretchr/testify/suite"
- "google.golang.org/grpc/codes"
- "google.golang.org/grpc/metadata"
- "google.golang.org/grpc/status"
- "google.golang.org/protobuf/types/known/timestamppb"
- "gorm.io/driver/mysql"
- "gorm.io/gorm"
-)
-
-type NewsAlertSuite struct {
- suite.Suite
- DB *gorm.DB
- mock sqlmock.Sqlmock
- deviceBuf *deviceBuffer
-}
-
-func (s *NewsAlertSuite) SetupSuite() {
- var (
- db *sql.DB
- err error
- )
-
- db, s.mock, err = sqlmock.New()
- require.NoError(s.T(), err)
-
- dialector := mysql.New(mysql.Config{
- Conn: db,
- DriverName: "mysql",
- })
- s.mock.ExpectQuery("SELECT VERSION()").
- WillReturnRows(sqlmock.NewRows([]string{"VERSION()"}).AddRow("10.11.4-MariaDB"))
- s.DB, err = gorm.Open(dialector, &gorm.Config{})
- require.NoError(s.T(), err)
-
- s.deviceBuf = newDeviceBuffer()
-}
-
-const ExpectedGetTopNewsQuery = "SELECT `news_alert`.`news_alert`,`news_alert`.`file`,`news_alert`.`name`,`news_alert`.`link`,`news_alert`.`created`,`news_alert`.`from`,`news_alert`.`to`,`Files`.`file` AS `Files__file`,`Files`.`name` AS `Files__name`,`Files`.`path` AS `Files__path`,`Files`.`downloads` AS `Files__downloads`,`Files`.`url` AS `Files__url`,`Files`.`downloaded` AS `Files__downloaded` FROM `news_alert` LEFT JOIN `files` `Files` ON `news_alert`.`file` = `Files`.`file` WHERE NOW() between `from` and `to` ORDER BY `news_alert`.`news_alert` LIMIT 1"
-
-func (s *NewsAlertSuite) Test_GetTopNewsOne() {
- expectedAlert := model.NewsAlert{
- NewsAlert: 1,
- FilesID: 3001,
- Files: model.Files{
- File: 3001,
- Name: "Tournament_app_02-02.png",
- Path: "newsalerts/",
- Downloads: 0,
- URL: sql.NullString{Valid: false},
- Downloaded: sql.NullBool{Bool: true, Valid: true},
- },
- Name: null.String{NullString: sql.NullString{String: "Exzellenzuniversität", Valid: true}},
- Link: null.String{NullString: sql.NullString{String: "https://tum.de", Valid: true}},
- Created: time.Time.Add(time.Now(), time.Hour*-4),
- From: time.Time.Add(time.Now(), time.Hour*-2),
- To: time.Time.Add(time.Now(), time.Hour*2),
- }
- s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedGetTopNewsQuery)).
- WillReturnRows(sqlmock.NewRows([]string{"news_alert", "file", "name", "link", "created", "from", "to", "Files__file", "Files__name", "Files__path", "Files__downloads", "Files__url", "Files__downloaded"}).
- AddRow(expectedAlert.NewsAlert, expectedAlert.FilesID, expectedAlert.Name, expectedAlert.Link, expectedAlert.Created, expectedAlert.From, expectedAlert.To, expectedAlert.Files.File, expectedAlert.Files.Name, expectedAlert.Files.Path, expectedAlert.Files.Downloads, expectedAlert.Files.URL, expectedAlert.Files.Downloaded))
-
- meta := metadata.MD{}
- server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
- response, err := server.GetTopNews(metadata.NewIncomingContext(context.Background(), meta), nil)
- require.NoError(s.T(), err)
- require.Equal(s.T(), &pb.GetTopNewsReply{
- ImageUrl: expectedAlert.Files.URL.String,
- Link: expectedAlert.Link.String,
- Created: timestamppb.New(expectedAlert.Created),
- From: timestamppb.New(expectedAlert.From),
- To: timestamppb.New(expectedAlert.To),
- }, response)
-}
-func (s *NewsAlertSuite) Test_GetTopNewsNone() {
- s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedGetTopNewsQuery)).WillReturnError(gorm.ErrRecordNotFound)
-
- meta := metadata.MD{}
- server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
- response, err := server.GetTopNews(metadata.NewIncomingContext(context.Background(), meta), nil)
- require.Equal(s.T(), status.Error(codes.NotFound, "no current active top news"), err)
- require.Nil(s.T(), response)
-}
-func (s *NewsAlertSuite) Test_GetTopNewsError() {
- s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedGetTopNewsQuery)).WillReturnError(gorm.ErrInvalidDB)
-
- meta := metadata.MD{}
- server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
- response, err := server.GetTopNews(metadata.NewIncomingContext(context.Background(), meta), nil)
- require.Equal(s.T(), status.Error(codes.Internal, "could not GetTopNews"), err)
- require.Nil(s.T(), response)
-}
-
-func (s *NewsAlertSuite) AfterTest(_, _ string) {
- require.NoError(s.T(), s.mock.ExpectationsWereMet())
-}
-
-// In order for 'go test' to run this suite, we need to create
-// a normal test function and pass our suite to suite.Run
-func TestNewsAlertSuite(t *testing.T) {
- suite.Run(t, new(NewsAlertSuite))
-}
diff --git a/server/backend/news_test.go b/server/backend/news_test.go
index 6345bf7a..62922c7c 100644
--- a/server/backend/news_test.go
+++ b/server/backend/news_test.go
@@ -6,6 +6,12 @@ import (
"fmt"
"regexp"
"testing"
+ "time"
+
+ "google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
+
+ "google.golang.org/protobuf/types/known/timestamppb"
"github.com/DATA-DOG/go-sqlmock"
pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
@@ -46,74 +52,226 @@ func (s *NewsSuite) SetupSuite() {
s.deviceBuf = newDeviceBuffer()
}
-func file(id int32) *model.Files {
- return &model.Files{
+func newsFile(id int64) *model.File {
+ return &model.File{
File: id,
Name: fmt.Sprintf("src_%d.png", id),
- Path: "news/sources",
+ Path: "news/sources/",
Downloads: 1,
- URL: sql.NullString{Valid: false},
- Downloaded: sql.NullBool{Bool: true, Valid: true},
+ URL: null.String{},
+ Downloaded: null.BoolFrom(true),
}
}
func source1() *model.NewsSource {
return &model.NewsSource{
- Source: 1,
- Title: "Amazing News 1",
- URL: null.String{NullString: sql.NullString{String: "https://example.com/amazing1", Valid: true}},
- FilesID: file(2).File,
- Files: *file(2),
- Hook: null.String{NullString: sql.NullString{String: "", Valid: true}},
+ Source: 1,
+ Title: "Amazing News 1",
+ URL: null.StringFrom("https://example.com/amazing1"),
+ FileID: newsFile(1).File,
+ File: *newsFile(1),
+ Hook: null.StringFrom(""),
}
}
func source2() *model.NewsSource {
return &model.NewsSource{
- Source: 2,
- Title: "Amazing News 2",
- URL: null.String{NullString: sql.NullString{String: "https://example.com/amazing2", Valid: true}},
- FilesID: file(2).File,
- Files: *file(2),
- Hook: null.String{NullString: sql.NullString{String: "hook", Valid: true}},
+ Source: 2,
+ Title: "Amazing News 2",
+ URL: null.StringFrom("https://example.com/amazing2"),
+ FileID: newsFile(2).File,
+ File: *newsFile(2),
+ Hook: null.StringFrom("hook"),
}
}
-const ExpectedGetSourceQuery = "SELECT `newsSource`.`source`,`newsSource`.`title`,`newsSource`.`url`,`newsSource`.`icon`,`newsSource`.`hook`,`Files`.`file` AS `Files__file`,`Files`.`name` AS `Files__name`,`Files`.`path` AS `Files__path`,`Files`.`downloads` AS `Files__downloads`,`Files`.`url` AS `Files__url`,`Files`.`downloaded` AS `Files__downloaded` FROM `newsSource` LEFT JOIN `files` `Files` ON `newsSource`.`icon` = `Files`.`file`"
+const ExpectedListNewsSourcesQuery = "SELECT `newsSource`.`source`,`newsSource`.`title`,`newsSource`.`url`,`newsSource`.`icon`,`newsSource`.`hook`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `newsSource` LEFT JOIN `files` `File` ON `newsSource`.`icon` = `File`.`file`"
-func (s *NewsSuite) Test_GetNewsSourcesMultiple() {
- s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedGetSourceQuery)).
- WillReturnRows(sqlmock.NewRows([]string{"source", "title", "url", "icon", "hook", "Files__file", "Files__name", "Files__path", "Files__downloads", "Files__url", "Files__downloaded"}).
- AddRow(source1().Source, source1().Title, source1().URL, source1().FilesID, source1().Hook, source1().Files.File, source1().Files.Name, source1().Files.Path, source1().Files.Downloads, source1().Files.URL, source1().Files.Downloaded).
- AddRow(source2().Source, source2().Title, source2().URL, source2().FilesID, source2().Hook, source2().Files.File, source2().Files.Name, source2().Files.Path, source2().Files.Downloads, source2().Files.URL, source2().Files.Downloaded))
+func (s *NewsSuite) Test_ListNewsSourcesMultiple() {
+ s1, s2 := source1(), source2()
+ s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsSourcesQuery)).
+ WillReturnRows(sqlmock.NewRows([]string{"source", "title", "url", "icon", "hook", "File__file", "File__name", "File__path", "File__downloads", "File__url", "File__downloaded"}).
+ AddRow(s1.Source, s1.Title, s1.URL, s1.FileID, s1.Hook, s1.File.File, s1.File.Name, s1.File.Path, s1.File.Downloads, s1.File.URL, s1.File.Downloaded).
+ AddRow(s2.Source, s2.Title, s2.URL, s2.FileID, s2.Hook, s2.File.File, s2.File.Name, s2.File.Path, s2.File.Downloads, s2.File.URL, s2.File.Downloaded))
meta := metadata.MD{}
server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
- response, err := server.GetNewsSources(metadata.NewIncomingContext(context.Background(), meta), nil)
+ response, err := server.ListNewsSources(metadata.NewIncomingContext(context.Background(), meta), nil)
require.NoError(s.T(), err)
- expectedResp := &pb.NewsSourceReply{
+ expectedResp := &pb.ListNewsSourcesReply{
Sources: []*pb.NewsSource{
- {Source: fmt.Sprintf("%d", source1().Source), Title: source1().Title, Icon: source1().Files.URL.String},
- {Source: fmt.Sprintf("%d", source2().Source), Title: source2().Title, Icon: source2().Files.URL.String},
+ {Source: fmt.Sprintf("%d", s1.Source), Title: s1.Title, IconUrl: "https://api.tum.app/files/news/sources/src_1.png"},
+ {Source: fmt.Sprintf("%d", s2.Source), Title: s2.Title, IconUrl: "https://api.tum.app/files/news/sources/src_2.png"},
},
}
require.Equal(s.T(), expectedResp, response)
}
-func (s *NewsSuite) Test_GetNewsSourcesNone() {
- s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedGetSourceQuery)).
- WillReturnRows(sqlmock.NewRows([]string{"source", "title", "url", "icon", "hook", "Files__file", "Files__name", "Files__path", "Files__downloads", "Files__url", "Files__downloaded"}))
+func news1() *model.News {
+ return &model.News{
+ News: 1,
+ Title: "Amazing News 1",
+ Link: "https://example.com/amazing2",
+ FileID: null.IntFrom(newsFile(1).File),
+ File: newsFile(1),
+ }
+}
+
+func news2() *model.News {
+ return &model.News{
+ News: 2,
+ Title: "Amazing News 2",
+ Link: "https://example.com/amazing2",
+ FileID: null.Int{},
+ File: nil,
+ }
+}
+
+func (s *NewsSuite) Test_ListNewsSourcesNone() {
+ s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsSourcesQuery)).
+ WillReturnRows(sqlmock.NewRows([]string{"source", "title", "url", "icon", "hook", "File__file", "File__name", "File__path", "File__downloads", "File__url", "File__downloaded"}))
meta := metadata.MD{}
server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
- response, err := server.GetNewsSources(metadata.NewIncomingContext(context.Background(), meta), nil)
+ response, err := server.ListNewsSources(metadata.NewIncomingContext(context.Background(), meta), nil)
require.NoError(s.T(), err)
- expectedResp := &pb.NewsSourceReply{
+ expectedResp := &pb.ListNewsSourcesReply{
Sources: []*pb.NewsSource(nil),
}
require.Equal(s.T(), expectedResp, response)
}
+const ExpectedListNewsQuery = "SELECT `news`.`news`,`news`.`date`,`news`.`created`,`news`.`title`,`news`.`description`,`news`.`src`,`news`.`link`,`news`.`image`,`news`.`file`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded`,`NewsSource`.`source` AS `NewsSource__source`,`NewsSource`.`title` AS `NewsSource__title`,`NewsSource`.`url` AS `NewsSource__url`,`NewsSource`.`icon` AS `NewsSource__icon`,`NewsSource`.`hook` AS `NewsSource__hook`,`NewsSource__File`.`file` AS `NewsSource__File__file`,`NewsSource__File`.`name` AS `NewsSource__File__name`,`NewsSource__File`.`path` AS `NewsSource__File__path`,`NewsSource__File`.`downloads` AS `NewsSource__File__downloads`,`NewsSource__File`.`url` AS `NewsSource__File__url`,`NewsSource__File`.`downloaded` AS `NewsSource__File__downloaded` FROM `news` LEFT JOIN `files` `File` ON `news`.`file` = `File`.`file` LEFT JOIN `newsSource` `NewsSource` ON `news`.`src` = `NewsSource`.`source` LEFT JOIN `files` `NewsSource__File` ON `NewsSource`.`icon` = `NewsSource__File`.`file`"
+
+func (s *NewsSuite) Test_ListNewsNone_withFilters() {
+ s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsQuery+" WHERE src = ? AND news > ?")).
+ WithArgs(1, 2).
+ WillReturnRows(sqlmock.NewRows([]string{"news", "date", "created", "title", "description", "src", "link", "image", "file", "File__file", "File__name", "File__path", "File__downloads", "File__url", "File__downloaded", "source", "NewsSource__source", "NewsSource__title", "NewsSource__url", "NewsSource__icon", "NewsSource__hook", "NewsSource__File__file", "NewsSource__File__name", "NewsSource__File__path", "NewsSource__File__downloads", "NewsSource__File__url", "NewsSource__File__downloaded"}))
+
+ meta := metadata.NewIncomingContext(context.Background(), metadata.MD{})
+ server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
+ response, err := server.ListNews(meta, &pb.ListNewsRequest{NewsSource: 1, LastNewsId: 2})
+ require.NoError(s.T(), err)
+ expectedResp := &pb.ListNewsReply{
+ News: []*pb.News{},
+ }
+ require.Equal(s.T(), expectedResp, response)
+}
+func (s *NewsSuite) Test_ListNewsNone() {
+ s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsQuery)).
+ WillReturnRows(sqlmock.NewRows([]string{"news", "date", "created", "title", "description", "src", "link", "image", "file", "File__file", "File__name", "File__path", "File__downloads", "File__url", "File__downloaded", "source", "NewsSource__source", "NewsSource__title", "NewsSource__url", "NewsSource__icon", "NewsSource__hook", "NewsSource__File__file", "NewsSource__File__name", "NewsSource__File__path", "NewsSource__File__downloads", "NewsSource__File__url", "NewsSource__File__downloaded"}))
+
+ meta := metadata.NewIncomingContext(context.Background(), metadata.MD{})
+ server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
+ response, err := server.ListNews(meta, &pb.ListNewsRequest{})
+ require.NoError(s.T(), err)
+ expectedResp := &pb.ListNewsReply{
+ News: []*pb.News{},
+ }
+ require.Equal(s.T(), expectedResp, response)
+}
+func (s *NewsSuite) Test_ListNewsMultiple() {
+ n1 := news1()
+ n2 := news2()
+ s.mock.ExpectQuery(regexp.QuoteMeta(" ")).
+ WillReturnRows(sqlmock.NewRows([]string{"news", "date", "created", "title", "description", "src", "link", "image", "file", "File__file", "File__name", "File__path", "File__downloads", "File__url", "File__downloaded"}).
+ AddRow(n1.News, n1.Date, n1.Created, n1.Title, n1.Description, n1.NewsSourceID, n1.Link, n1.Image, n1.FileID, n1.File.File, n1.File.Name, n1.File.Path, n1.File.Downloads, n1.File.URL, n1.File.Downloaded).
+ AddRow(n2.News, n2.Date, n2.Created, n2.Title, n2.Description, n2.NewsSourceID, n2.Link, n2.Image, nil, nil, nil, nil, nil, nil, nil))
+
+ meta := metadata.NewIncomingContext(context.Background(), metadata.MD{})
+ server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
+ response, err := server.ListNews(meta, &pb.ListNewsRequest{})
+ require.NoError(s.T(), err)
+ expectedResp := &pb.ListNewsReply{
+ News: []*pb.News{
+ {Id: n1.News, Title: n1.Title, Text: n1.Description, Link: n1.Link, ImageUrl: "https://api.tum.app/files/news/sources/src_1.png", SourceId: fmt.Sprintf("%d", n1.NewsSourceID), SourceIconUrl: n1.NewsSource.File.FullExternalUrl(), SourceTitle: n1.NewsSource.Title, Created: timestamppb.New(n1.Created), Date: timestamppb.New(n1.Date)},
+ {Id: n2.News, Title: n2.Title, Text: n2.Description, Link: n2.Link, ImageUrl: "", SourceId: fmt.Sprintf("%d", n2.NewsSourceID), SourceIconUrl: n2.NewsSource.File.FullExternalUrl(), SourceTitle: n2.NewsSource.Title, Created: timestamppb.New(n2.Created), Date: timestamppb.New(n2.Date)},
+ },
+ }
+ require.Equal(s.T(), expectedResp, response)
+}
+
+func newsAlertFile(id int64) *model.File {
+ return &model.File{
+ File: id,
+ Name: fmt.Sprintf("src_%d.png", id),
+ Path: "news/sources/",
+ Downloads: 1,
+ URL: null.String{},
+ Downloaded: null.BoolFrom(true),
+ }
+}
+func alert1() *model.NewsAlert {
+ return &model.NewsAlert{
+ NewsAlert: 1,
+ FileID: newsAlertFile(1).File,
+ File: *newsAlertFile(1),
+ Name: null.String{},
+ Link: null.String{},
+ Created: time.Time.Add(time.Now(), time.Hour*-4),
+ From: time.Time.Add(time.Now(), time.Hour*-2),
+ To: time.Time.Add(time.Now(), time.Hour*-2),
+ }
+}
+
+func alert2() *model.NewsAlert {
+ return &model.NewsAlert{
+ NewsAlert: 2,
+ FileID: newsAlertFile(2).File,
+ File: *newsAlertFile(2),
+ Name: null.String{},
+ Link: null.String{},
+ Created: time.Time.Add(time.Now(), time.Hour),
+ From: time.Time.Add(time.Now(), time.Hour*2),
+ To: time.Time.Add(time.Now(), time.Hour*3),
+ }
+}
+
+const ExpectedListNewsAlertsQuery = "SELECT `news_alert`.`news_alert`,`news_alert`.`file`,`news_alert`.`name`,`news_alert`.`link`,`news_alert`.`created`,`news_alert`.`from`,`news_alert`.`to`,`File`.`file` AS `File__file`,`File`.`name` AS `File__name`,`File`.`path` AS `File__path`,`File`.`downloads` AS `File__downloads`,`File`.`url` AS `File__url`,`File`.`downloaded` AS `File__downloaded` FROM `news_alert` LEFT JOIN `files` `File` ON `news_alert`.`file` = `File`.`file` WHERE news_alert.to >= NOW()"
+
+func (s *NewsSuite) Test_ListNewsAlertsError() {
+ s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsAlertsQuery)).WillReturnError(gorm.ErrInvalidDB)
+
+ meta := metadata.MD{}
+ server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
+ response, err := server.ListNewsAlerts(metadata.NewIncomingContext(context.Background(), meta), &pb.ListNewsAlertsRequest{})
+ require.Equal(s.T(), status.Error(codes.Internal, "could not ListNewsAlerts"), err)
+ require.Nil(s.T(), response)
+}
+func (s *NewsSuite) Test_ListNewsAlertsNone_noFilter() {
+ s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsAlertsQuery)).WillReturnError(gorm.ErrRecordNotFound)
+
+ server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
+ response, err := server.ListNewsAlerts(metadata.NewIncomingContext(context.Background(), metadata.MD{}), &pb.ListNewsAlertsRequest{})
+ require.Equal(s.T(), status.Error(codes.NotFound, "no news alerts"), err)
+ require.Nil(s.T(), response)
+}
+func (s *NewsSuite) Test_ListNewsAlertsNone_Filter() {
+ s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsAlertsQuery + " AND news_alert.news_alert > ?")).WithArgs(42).WillReturnError(gorm.ErrRecordNotFound)
+
+ server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
+ response, err := server.ListNewsAlerts(metadata.NewIncomingContext(context.Background(), metadata.MD{}), &pb.ListNewsAlertsRequest{LastNewsAlertId: 42})
+ require.Equal(s.T(), status.Error(codes.NotFound, "no news alerts"), err)
+ require.Nil(s.T(), response)
+}
+func (s *NewsSuite) Test_ListNewsAlertsMultiple() {
+ a1, a2 := alert1(), alert2()
+ s.mock.ExpectQuery(regexp.QuoteMeta(ExpectedListNewsAlertsQuery)).
+ WillReturnRows(sqlmock.NewRows([]string{"news_alert", "file", "name", "link", "created", "from", "to", "File__file", "File__name", "File__path", "File__downloads", "File__url", "File__downloaded"}).
+ AddRow(a1.NewsAlert, a1.FileID, a1.Name, a1.Link, a1.Created, a1.From, a1.To, a1.File.File, a1.File.Name, a1.File.Path, a1.File.Downloads, a1.File.URL, a1.File.Downloaded).
+ AddRow(a2.NewsAlert, a2.FileID, a2.Name, a2.Link, a2.Created, a2.From, a2.To, a2.File.File, a2.File.Name, a2.File.Path, a2.File.Downloads, a2.File.URL, a2.File.Downloaded))
+
+ server := CampusServer{db: s.DB, deviceBuf: s.deviceBuf}
+ response, err := server.ListNewsAlerts(metadata.NewIncomingContext(context.Background(), metadata.MD{}), &pb.ListNewsAlertsRequest{})
+ require.NoError(s.T(), err)
+ expectedResp := &pb.ListNewsAlertsReply{
+ Alerts: []*pb.NewsAlert{
+ {ImageUrl: "https://api.tum.app/files/news/sources/src_1.png", Link: a1.Link.String, Created: timestamppb.New(a1.Created), From: timestamppb.New(a1.From), To: timestamppb.New(a1.To)},
+ {ImageUrl: "https://api.tum.app/files/news/sources/src_2.png", Link: a2.Link.String, Created: timestamppb.New(a2.Created), From: timestamppb.New(a2.From), To: timestamppb.New(a2.To)},
+ }}
+ require.Equal(s.T(), expectedResp, response)
+}
+
func (s *NewsSuite) AfterTest(_, _ string) {
require.NoError(s.T(), s.mock.ExpectationsWereMet())
}
diff --git a/server/backend/rpcserver.go b/server/backend/rpcserver.go
index 1a29439e..aed6b256 100644
--- a/server/backend/rpcserver.go
+++ b/server/backend/rpcserver.go
@@ -3,28 +3,16 @@ package backend
import (
"context"
"errors"
- "net"
pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_apns"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_apns/ios_apns_jwt"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/apns"
"github.com/TUM-Dev/Campus-Backend/server/model"
log "github.com/sirupsen/logrus"
- "google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"gorm.io/gorm"
)
-func (s *CampusServer) GRPCServe(l net.Listener) error {
- grpcServer := grpc.NewServer()
- pb.RegisterCampusServer(grpcServer, s)
- if err := grpcServer.Serve(l); err != nil {
- log.WithError(err).Fatal("failed to serve")
- }
- return grpcServer.Serve(l)
-}
-
type CampusServer struct {
pb.UnimplementedCampusServer
db *gorm.DB
@@ -37,8 +25,6 @@ var _ pb.CampusServer = (*CampusServer)(nil)
func New(db *gorm.DB) *CampusServer {
log.Trace("Server starting up")
- initTagRatingOptions(db)
-
return &CampusServer{
db: db,
deviceBuf: newDeviceBuffer(),
@@ -47,7 +33,7 @@ func New(db *gorm.DB) *CampusServer {
}
func NewIOSNotificationsService() *IOSNotificationsService {
- if err := ios_apns.ValidateRequirementsForIOSNotificationsService(); err != nil {
+ if err := apns.ValidateRequirementsForIOSNotificationsService(); err != nil {
log.WithError(err).Warn("failed to validate requirements for ios notifications service")
return &IOSNotificationsService{
@@ -56,9 +42,9 @@ func NewIOSNotificationsService() *IOSNotificationsService {
}
}
- token, err := ios_apns_jwt.NewToken()
+ token, err := apns.NewToken()
if err != nil {
- log.WithError(err).Fatal("failed to create new token")
+ log.WithError(err).Error("failed to create new token")
}
return &IOSNotificationsService{
@@ -80,7 +66,7 @@ func (s *CampusServer) SearchRooms(ctx context.Context, req *pb.SearchRoomsReque
Campus string
Name string
}
- err := s.db.Raw("SELECT r.*, a.campus, a.name "+
+ err := s.db.WithContext(ctx).Raw("SELECT r.*, a.campus, a.name "+
"FROM roomfinder_rooms r "+
"LEFT JOIN roomfinder_building2area a ON a.building_nr = r.building_nr "+
"WHERE MATCH(room_code, info, address) AGAINST(?)", req.Query).Scan(&res).Error
diff --git a/server/backend/updateNote.go b/server/backend/update_note.go
similarity index 90%
rename from server/backend/updateNote.go
rename to server/backend/update_note.go
index a9f48164..70d1fbb7 100644
--- a/server/backend/updateNote.go
+++ b/server/backend/update_note.go
@@ -19,7 +19,7 @@ func (s *CampusServer) GetUpdateNote(ctx context.Context, req *pb.GetUpdateNoteR
}
res := model.UpdateNote{VersionCode: req.Version}
- if err := s.db.First(&res).Error; errors.Is(err, gorm.ErrRecordNotFound) {
+ if err := s.db.WithContext(ctx).First(&res).Error; errors.Is(err, gorm.ErrRecordNotFound) {
return nil, status.Error(codes.NotFound, "No update note found")
} else if err != nil {
log.WithField("VersionCode", req.Version).WithError(err).Error("Failed to get update note")
diff --git a/server/backend/updateNews_test.go b/server/backend/update_note_test.go
similarity index 100%
rename from server/backend/updateNews_test.go
rename to server/backend/update_note_test.go
diff --git a/server/backend/validators.go b/server/backend/validators.go
index 042c0a1d..234216bb 100644
--- a/server/backend/validators.go
+++ b/server/backend/validators.go
@@ -6,7 +6,7 @@ import (
pb "github.com/TUM-Dev/Campus-Backend/server/api/tumdev"
)
-func ValidateRegisterDevice(request *pb.RegisterDeviceRequest) error {
+func ValidateCreateDevice(request *pb.CreateDeviceRequest) error {
if request.GetDeviceId() == "" {
return errors.New("deviceId is empty")
}
@@ -18,7 +18,7 @@ func ValidateRegisterDevice(request *pb.RegisterDeviceRequest) error {
return nil
}
-func ValidateRemoveDevice(request *pb.RemoveDeviceRequest) error {
+func ValidateDeleteDevice(request *pb.DeleteDeviceRequest) error {
if request.GetDeviceId() == "" {
return errors.New("deviceId is empty")
}
diff --git a/server/go.mod b/server/go.mod
index e25b8ccb..2df4c17b 100644
--- a/server/go.mod
+++ b/server/go.mod
@@ -4,6 +4,7 @@ go 1.21
require (
github.com/DATA-DOG/go-sqlmock v1.5.0
+ github.com/PuerkitoBio/goquery v1.8.1
github.com/disintegration/imaging v1.6.2
github.com/gabriel-vasile/mimetype v1.4.2
github.com/getsentry/sentry-go v0.24.1
@@ -12,45 +13,49 @@ require (
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0
github.com/guregu/null v4.0.0+incompatible
- github.com/influxdata/influxdb-client-go/v2 v2.12.3
github.com/makasim/sentryhook v0.4.2
github.com/microcosm-cc/bluemonday v1.0.25
github.com/mmcdole/gofeed v1.2.1
github.com/onrik/gorm-logrus v0.5.0
+ github.com/prometheus/client_golang v1.17.0
github.com/sirupsen/logrus v1.9.3
github.com/soheilhy/cmux v0.1.5
github.com/stretchr/testify v1.8.4
- golang.org/x/net v0.15.0
+ golang.org/x/net v0.17.0
golang.org/x/sync v0.3.0
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb
- google.golang.org/grpc v1.58.0
+ google.golang.org/grpc v1.58.2
google.golang.org/protobuf v1.31.0
+ gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gorm.io/driver/mysql v1.5.1
gorm.io/gorm v1.25.4
)
require (
- github.com/PuerkitoBio/goquery v1.8.0 // indirect
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
+ github.com/beorn7/perks v1.0.1 // indirect
+ github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/deepmap/oapi-codegen v1.8.2 // indirect
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gorilla/css v1.0.0 // indirect
- github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/json-iterator/go v1.1.12 // indirect
+ github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mmcdole/goxpp v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
+ github.com/prometheus/common v0.44.0 // indirect
+ github.com/prometheus/procfs v0.11.1 // indirect
golang.org/x/image v0.5.0 // indirect
- golang.org/x/sys v0.12.0 // indirect
+ golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
+ gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
diff --git a/server/go.sum b/server/go.sum
index 86e36c83..7749353f 100644
--- a/server/go.sum
+++ b/server/go.sum
@@ -46,8 +46,8 @@ github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20O
github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
-github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U=
-github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI=
+github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
+github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM=
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
@@ -60,12 +60,16 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
+github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=
github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
+github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
@@ -83,15 +87,11 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
-github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/deepmap/oapi-codegen v1.8.2 h1:SegyeYGcdi0jLLrpbCMoJxnUUn8GBXHsvr4rbzjuhfU=
-github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw=
github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk=
github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
@@ -114,14 +114,12 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
-github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
github.com/getsentry/sentry-go v0.17.0/go.mod h1:B82dxtBvxG0KaPD8/hfSV+VcHD+Lg/xUS4JuQn1P4cM=
github.com/getsentry/sentry-go v0.24.1 h1:W6/0GyTy8J6ge6lVCc94WB6Gx2ZuLrgopnn9w8Hiwuk=
github.com/getsentry/sentry-go v0.24.1/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk=
-github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
@@ -131,8 +129,6 @@ github.com/go-gormigrate/gormigrate/v2 v2.1.1 h1:eGS0WTFRV30r103lU8JNXY27KbviRnq
github.com/go-gormigrate/gormigrate/v2 v2.1.1/go.mod h1:L7nJ620PFDKei9QOhJzqA8kRCk+E3UbV2f5gv+1ndLc=
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
-github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
-github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
@@ -188,7 +184,6 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -232,7 +227,6 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORR
github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
-github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
@@ -265,10 +259,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
-github.com/influxdata/influxdb-client-go/v2 v2.12.3 h1:28nRlNMRIV4QbtIUvxhWqaxn0IpXeMSkY/uJa/O/vC4=
-github.com/influxdata/influxdb-client-go/v2 v2.12.3/go.mod h1:IrrLUbCjjfkmRuaCiGQg4m2GbkaeJDcuWoxiWdQEbA0=
-github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU=
-github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=
github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0=
github.com/iris-contrib/httpexpect/v2 v2.3.1/go.mod h1:ICTf89VBKSD3KB0fsyyHviKF8G8hyepP0dOXJPWz3T0=
github.com/iris-contrib/jade v1.1.4/go.mod h1:EDqR+ur9piDl6DUgs6qRrlfzmlx/D5UybogqrXvJTBE=
@@ -311,35 +301,26 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg=
github.com/labstack/echo/v4 v4.9.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks=
-github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mailgun/raymond/v2 v2.0.46/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18=
-github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
-github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/makasim/sentryhook v0.4.2 h1:rqx637SCMMV5mAd9PpSg0OUIpZZaQOQZ6JHONOpUlRI=
github.com/makasim/sentryhook v0.4.2/go.mod h1:AlAU2qjpS3R9bmpfVNcCVQw1tKkH8/lOPa2RQTk8Bzw=
-github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ=
github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
-github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
-github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
+github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
+github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/mediocregopher/radix/v3 v3.8.0/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8=
github.com/microcosm-cc/bluemonday v1.0.20/go.mod h1:yfBmMi8mxvaZut3Yytv+jTXRY8mxyjJ0/kQBTElld50=
github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM=
@@ -406,12 +387,21 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
+github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
+github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM=
+github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
+github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY=
+github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
+github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI=
+github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
-github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
+github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
+github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
@@ -476,7 +466,6 @@ github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
-github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
@@ -519,8 +508,6 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
@@ -619,8 +606,9 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
-golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
-golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
+golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
+golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
+golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -655,7 +643,6 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -664,7 +651,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -674,7 +660,6 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -687,7 +672,6 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -698,7 +682,6 @@ golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -725,11 +708,12 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220928140112-f11e5e49a4ec/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
-golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
+golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -747,7 +731,6 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -905,8 +888,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o=
-google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
+google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I=
+google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -923,6 +906,8 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
+gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -931,6 +916,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
+gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
+gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
diff --git a/server/main.go b/server/main.go
index 9e624b66..01b65ca0 100644
--- a/server/main.go
+++ b/server/main.go
@@ -4,8 +4,6 @@ import (
"context"
"embed"
"encoding/json"
- "errors"
- "io/fs"
"net"
"net/http"
"net/textproto"
@@ -13,6 +11,10 @@ import (
"strings"
"time"
+ "google.golang.org/grpc/reflection"
+
+ "github.com/prometheus/client_golang/prometheus/promhttp"
+
"github.com/TUM-Dev/Campus-Backend/server/env"
"github.com/makasim/sentryhook"
@@ -45,17 +47,7 @@ var swagfs embed.FS
func main() {
setupTelemetry()
- defer sentry.Flush(2 * time.Second) // make sure that sentry handles shutdowns gracefully
-
- // initializing connection to InfluxDB
- err := backend.ConnectToInfluxDB()
- if errors.Is(err, backend.ErrInfluxTokenNotConfigured) {
- log.Warn("InfluxDB token not configured - continuing without InfluxDB")
- } else if errors.Is(err, backend.ErrInfluxURLNotConfigured) {
- log.Warn("InfluxDB url not configured - continuing without InfluxDB")
- } else if err != nil {
- log.WithError(err).Error("InfluxDB connection failed - health check failed")
- }
+ defer sentry.Flush(10 * time.Second) // make sure that sentry handles shutdowns gracefully
db := setupDB()
@@ -82,13 +74,16 @@ func main() {
httpMux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
_, _ = w.Write([]byte("healthy"))
})
+ httpMux.Handle("/metrics", promhttp.Handler())
- static, _ := fs.Sub(swagfs, "swagger")
- httpMux.Handle("/", http.FileServer(http.FS(static)))
+ httpMux.Handle("/", http.RedirectHandler("/swagger/", http.StatusTemporaryRedirect))
+ httpMux.Handle("/files/", http.StripPrefix("/files/", http.FileServer(http.Dir("/Storage"))))
+ httpMux.Handle("/swagger/", http.FileServer(http.FS(swagfs)))
// Main GRPC Server
- grpcServer := grpc.NewServer()
+ grpcServer := grpc.NewServer(grpc.UnaryInterceptor(UnaryRequestLogger), grpc.StreamInterceptor(StreamRequestLogger))
pb.RegisterCampusServer(grpcServer, campusService)
+ reflection.Register(grpcServer)
// GRPC Gateway for HTTP REST -> GRPC
grpcGatewayMux := runtime.NewServeMux(runtime.WithIncomingHeaderMatcher(
@@ -108,7 +103,7 @@ func main() {
grpc.WithUnaryInterceptor(addMethodNameInterceptor),
}
if err := pb.RegisterCampusHandlerFromEndpoint(context.Background(), grpcGatewayMux, httpPort, opts); err != nil {
- log.WithError(err).Panic("could not RegisterCampusHandlerFromEndpoint")
+ log.WithError(err).Fatal("could not RegisterCampusHandlerFromEndpoint")
}
httpMux.Handle("/v1/", http.StripPrefix("/v1", grpcGatewayMux))
@@ -126,20 +121,31 @@ func main() {
}
}
+func UnaryRequestLogger(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
+ start := time.Now()
+ resp, err := handler(ctx, req)
+ fields := log.Fields{"elapsed": time.Since(start)}
+ log.WithContext(ctx).WithFields(fields).WithError(err).Info(info.FullMethod)
+ return resp, err
+}
+func StreamRequestLogger(srv any, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
+ start := time.Now()
+ err := handler(srv, stream)
+ log.WithField("elapsed", time.Since(start)).WithError(err).Info(info.FullMethod)
+ return err
+}
+
// setupDB connects to the database and migrates it if necessary
func setupDB() *gorm.DB {
- // Connect to DB
- var conn gorm.Dialector
- if dbHost := os.Getenv("DB_DSN"); dbHost == "" {
+ dbHost := os.Getenv("DB_DSN")
+ if dbHost == "" {
log.Fatal("Failed to start! The 'DB_DSN' environment variable is not defined. Take a look at the README.md for more details.")
- } else {
- log.Info("Connecting to dsn")
- conn = mysql.Open(dbHost)
}
- db, err := gorm.Open(conn, &gorm.Config{Logger: gorm_logrus.New()})
+ log.Info("Connecting to dsn")
+ db, err := gorm.Open(mysql.Open(dbHost), &gorm.Config{Logger: gorm_logrus.New()})
if err != nil {
- log.WithError(err).Panic("failed to connect database")
+ log.WithError(err).Fatal("failed to connect database")
}
// Migrate the schema
@@ -178,7 +184,7 @@ func setupTelemetry() {
}
}
-// addMethodNameInterceptor adds the method name (e.g. "GetNewsSources") to the metadata as x-campus-method for later use (currently logging the devices api usage)
+// addMethodNameInterceptor adds the method name (e.g. "ListNewsSources") to the metadata as x-campus-method for later use (currently logging the devices api usage)
func addMethodNameInterceptor(ctx context.Context, method string, req interface{}, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
ctx = metadata.AppendToOutgoingContext(ctx, "x-campus-method", method)
return invoker(ctx, method, req, reply, cc, opts...)
diff --git a/server/model/cafeteria.go b/server/model/cafeteria.go
index 7a5988e5..a5c59582 100644
--- a/server/model/cafeteria.go
+++ b/server/model/cafeteria.go
@@ -2,7 +2,7 @@ package model
// Cafeteria stores all Available cafeterias in the format of the eat-api
type Cafeteria struct {
- Cafeteria int32 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteria;type:int;not null;" json:"cafeteria" `
+ Cafeteria int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteria;type:int;not null;" json:"canteen" `
Name string `gorm:"column:name;type:mediumtext;not null;" json:"name" `
Address string `gorm:"column:address;type:text;not null;" json:"address" `
Latitude float32 `gorm:"column:latitude;type:float;not null;" json:"latitude" `
diff --git a/server/model/cafeteriaRatingAverage.go b/server/model/cafeteriaRatingAverage.go
deleted file mode 100644
index 98c5401c..00000000
--- a/server/model/cafeteriaRatingAverage.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package model
-
-// CafeteriaRatingAverage stores all precomputed values for the cafeteria ratings
-type CafeteriaRatingAverage struct {
- CafeteriaRatingAverage int32 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingAverage;type:int;not null;" json:"cafeteriaRatingAverage" `
- CafeteriaID int32 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
- Average float32 `gorm:"column:average;type:float;not null;" json:"average" `
- Min int8 `gorm:"column:min;type:int;not null;" json:"min"`
- Max int8 `gorm:"column:max;type:int;not null;" json:"max"`
- Std float32 `gorm:"column:std;type:float;not null;" json:"std"`
-}
-
-// TableName sets the insert table name for this struct type
-func (n *CafeteriaRatingAverage) TableName() string {
- return "cafeteria_rating_average"
-}
diff --git a/server/model/cafeteriaRating.go b/server/model/cafeteria_rating.go
similarity index 71%
rename from server/model/cafeteriaRating.go
rename to server/model/cafeteria_rating.go
index 1916d6b4..cfa5f686 100644
--- a/server/model/cafeteriaRating.go
+++ b/server/model/cafeteria_rating.go
@@ -6,10 +6,10 @@ import (
// CafeteriaRating stores all Available cafeterias in the format of the eat-api
type CafeteriaRating struct {
- CafeteriaRating int32 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRating;type:int;not null;" json:"cafeteriarating"`
+ CafeteriaRating int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRating;type:int;not null;" json:"canteenrating"`
Points int32 `gorm:"column:points;type:int;not null;" json:"points"`
Comment string `gorm:"column:comment;type:text;" json:"comment" `
- CafeteriaID int32 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
+ CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"canteenID"`
Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;" json:"timestamp" `
Image string `gorm:"column:image;type:text;" json:"image"`
}
diff --git a/server/model/cafeteria_rating_average.go b/server/model/cafeteria_rating_average.go
new file mode 100644
index 00000000..cb624a95
--- /dev/null
+++ b/server/model/cafeteria_rating_average.go
@@ -0,0 +1,16 @@
+package model
+
+// CafeteriaRatingAverage stores all precomputed values for the cafeteria ratings
+type CafeteriaRatingAverage struct {
+ CafeteriaRatingAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingAverage;type:int;not null;" json:"canteenRatingAverage" `
+ CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"canteenID"`
+ Average float64 `gorm:"column:average;type:float;not null;" json:"average" `
+ Min int32 `gorm:"column:min;type:int;not null;" json:"min"`
+ Max int32 `gorm:"column:max;type:int;not null;" json:"max"`
+ Std float64 `gorm:"column:std;type:float;not null;" json:"std"`
+}
+
+// TableName sets the insert table name for this struct type
+func (n *CafeteriaRatingAverage) TableName() string {
+ return "cafeteria_rating_average"
+}
diff --git a/server/model/cafeteriaRatingTag.go b/server/model/cafeteria_rating_tag.go
similarity index 67%
rename from server/model/cafeteriaRatingTag.go
rename to server/model/cafeteria_rating_tag.go
index d266d776..15e964b6 100644
--- a/server/model/cafeteriaRatingTag.go
+++ b/server/model/cafeteria_rating_tag.go
@@ -2,10 +2,10 @@ package model
// CafeteriaRatingTag struct is a row record of the either the dish_tag_rating-table or the cafeteria_rating_tags-table in the database
type CafeteriaRatingTag struct {
- CafeteriaRatingTag int32 `gorm:"primary_key;AUTO_INCREMENT;column:CafeteriaRatingTag;type:int;not null;" json:"CafeteriaRatingTag" `
- CorrespondingRating int32 `gorm:"foreignKey:cafeteriaRatingID;column:correspondingRating;type:int;not null;" json:"correspondingRating"`
+ CafeteriaRatingTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:CafeteriaRatingTag;type:int;not null;" json:"CanteenRatingTag" `
+ CorrespondingRating int64 `gorm:"foreignKey:cafeteriaRatingID;column:correspondingRating;type:int;not null;" json:"correspondingRating"`
Points int32 `gorm:"column:points;type:int;not null;" json:"points"`
- TagID int `gorm:"foreignKey:cafeteriaRatingTagOption;column:tagID;type:int;not null;" json:"tagID"`
+ TagID int64 `gorm:"foreignKey:cafeteriaRatingTagOption;column:tagID;type:int;not null;" json:"tagID"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/cafeteriaRatingTagAverage.go b/server/model/cafeteria_rating_tag_average.go
similarity index 70%
rename from server/model/cafeteriaRatingTagAverage.go
rename to server/model/cafeteria_rating_tag_average.go
index 56491327..6c1abeb7 100644
--- a/server/model/cafeteriaRatingTagAverage.go
+++ b/server/model/cafeteria_rating_tag_average.go
@@ -2,10 +2,10 @@ package model
// CafeteriaRatingTagsAverage stores all precomputed values for the cafeteria ratings
type CafeteriaRatingTagsAverage struct {
- CafeteriaRatingTagsAverage int32 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingTagsAverage;type:int;not null;" json:"cafeteriaRatingTagsAverage" `
- CafeteriaID int32 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
- TagID int32 `gorm:"column:tagID;foreignKey:cafeteriaRatingTagOption;type:int;not null;" json:"tagID"`
- Average float32 `gorm:"column:average;type:float;not null;" json:"average" `
+ CafeteriaRatingTagsAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingTagsAverage;type:int;not null;" json:"canteenRatingTagsAverage"`
+ CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"canteenID"`
+ TagID int64 `gorm:"column:tagID;foreignKey:cafeteriaRatingTagOption;type:int;not null;" json:"tagID"`
+ Average float32 `gorm:"column:average;type:float;not null;" json:"average"`
Min int8 `gorm:"column:min;type:int;not null;" json:"min"`
Max int8 `gorm:"column:max;type:int;not null;" json:"max"`
Std float32 `gorm:"column:std;type:float;not null;" json:"std"`
diff --git a/server/model/cafeteriaRatingTagOptions.go b/server/model/cafeteria_rating_tag_options.go
similarity index 86%
rename from server/model/cafeteriaRatingTagOptions.go
rename to server/model/cafeteria_rating_tag_options.go
index 0760ec34..e5d27d49 100644
--- a/server/model/cafeteriaRatingTagOptions.go
+++ b/server/model/cafeteria_rating_tag_options.go
@@ -2,7 +2,7 @@ package model
// CafeteriaRatingTagOption stores all available options for tags which can be used to quickly rate cafeterias
type CafeteriaRatingTagOption struct {
- CafeteriaRatingsTagOption int32 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingTagOption;type:int;not null;" json:"cafeteriaRatingTagOption"`
+ CafeteriaRatingsTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:cafeteriaRatingTagOption;type:int;not null;" json:"canteenRatingTagOption"`
DE string `gorm:"column:DE;text;default:de;not null;" json:"DE"`
EN string `gorm:"column:EN;text;default:en;not null;" json:"EN"`
}
diff --git a/server/model/canteenHeadCount.go b/server/model/canteen_head_count.go
similarity index 100%
rename from server/model/canteenHeadCount.go
rename to server/model/canteen_head_count.go
diff --git a/server/model/crontab.go b/server/model/crontab.go
index 6e775f14..79d310af 100644
--- a/server/model/crontab.go
+++ b/server/model/crontab.go
@@ -11,9 +11,9 @@ func (Crontab) TableName() string {
// Crontab struct is a row record of the crontab table in the tca database
type Crontab struct {
- Cron int32 `gorm:"primary_key;AUTO_INCREMENT;column:cron;type:int;" json:"cron"`
+ Cron int64 `gorm:"primary_key;AUTO_INCREMENT;column:cron;type:int;" json:"cron"`
Interval int32 `gorm:"column:interval;type:int;default:7200;" json:"interval"`
LastRun int32 `gorm:"column:lastRun;type:int;default:0;" json:"last_run"`
- Type null.String `gorm:"column:type;type:enum ('news', 'mensa', 'kino', 'roomfinder', 'alarm', 'fileDownload','dishNameDownload','averageRatingComputation', 'iosNotifications', 'iosActivityReset', 'canteenHeadCount');" json:"type"`
+ Type null.String `gorm:"column:type;type:enum ('news', 'mensa', 'movie', 'roomfinder', 'alarm', 'fileDownload','dishNameDownload','averageRatingComputation', 'iosNotifications', 'iosActivityReset', 'canteenHeadCount', 'newExamResultsHook');" json:"type"`
ID null.Int `gorm:"column:id;type:int;" json:"id"`
}
diff --git a/server/model/devices.go b/server/model/devices.go
index 213330be..205a5ae9 100755
--- a/server/model/devices.go
+++ b/server/model/devices.go
@@ -8,7 +8,7 @@ import (
// Devices struct is a row record of the devices table in the tca database
type Devices struct {
- Device int32 `gorm:"primary_key;AUTO_INCREMENT;column:device;type:int;" json:"device"`
+ Device int64 `gorm:"primary_key;AUTO_INCREMENT;column:device;type:int;" json:"device"`
Member null.Int `gorm:"column:member;type:int;" json:"member"`
UUID string `gorm:"column:uuid;type:varchar(50);" json:"uuid"`
Created null.Time `gorm:"column:created;type:timestamp;" json:"created"`
diff --git a/server/model/dish.go b/server/model/dish.go
index cb787aad..7ab5c4d7 100644
--- a/server/model/dish.go
+++ b/server/model/dish.go
@@ -13,10 +13,10 @@ var (
// Dish represents one dish fin a specific cafeteria
type Dish struct {
- Dish int32 `gorm:"primary_key;AUTO_INCREMENT;column:dish;type:int;not null;" json:"dish"`
+ Dish int64 `gorm:"primary_key;AUTO_INCREMENT;column:dish;type:int;not null;" json:"dish"`
Name string `gorm:"column:name;type:text;not null;" json:"name" `
Type string `gorm:"column:type;type:text;not null;" json:"type" `
- CafeteriaID int32 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
+ CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/dishNameTag.go b/server/model/dish_name_tag.go
similarity index 68%
rename from server/model/dishNameTag.go
rename to server/model/dish_name_tag.go
index f7795451..1dc52ab4 100644
--- a/server/model/dishNameTag.go
+++ b/server/model/dish_name_tag.go
@@ -1,10 +1,10 @@
package model
type DishNameTag struct {
- DishNameTag int32 `gorm:"primary_key;AUTO_INCREMENT;column:DishNameTag;type:int;not null;" json:"DishNameTag"`
- CorrespondingRating int32 `gorm:"foreignKey:dish;column:correspondingRating;type:int;not null;" json:"correspondingRating"`
+ DishNameTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:DishNameTag;type:int;not null;" json:"DishNameTag"`
+ CorrespondingRating int64 `gorm:"foreignKey:dish;column:correspondingRating;type:int;not null;" json:"correspondingRating"`
Points int32 `gorm:"column:points;type:int;not null;" json:"points"`
- TagNameID int `gorm:"foreignKey:tagRatingID;column:tagNameID;type:int;not null;" json:"tagnameID"`
+ TagNameID int64 `gorm:"foreignKey:tagRatingID;column:tagNameID;type:int;not null;" json:"tagnameID"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/dishNameTagAverage.go b/server/model/dish_name_tag_average.go
similarity index 80%
rename from server/model/dishNameTagAverage.go
rename to server/model/dish_name_tag_average.go
index 8fe17548..2ee05076 100644
--- a/server/model/dishNameTagAverage.go
+++ b/server/model/dish_name_tag_average.go
@@ -2,9 +2,9 @@ package model
// DishNameTagAverage stores all precomputed values for the DishName ratings
type DishNameTagAverage struct {
- DishNameTagAverage int32 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagAverage;type:int;not null;" json:"dishNameTagAverage" `
- CafeteriaID int32 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
- TagID int32 `gorm:"column:tagID;foreignKey:DishNameTagOption;type:int;not null;" json:"tagID"`
+ DishNameTagAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagAverage;type:int;not null;" json:"dishNameTagAverage" `
+ CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
+ TagID int64 `gorm:"column:tagID;foreignKey:DishNameTagOption;type:int;not null;" json:"tagID"`
Average float32 `gorm:"column:average;type:float;not null;" json:"average" `
Min int8 `gorm:"column:min;type:int;not null;" json:"min"`
Max int8 `gorm:"column:max;type:int;not null;" json:"max"`
diff --git a/server/model/dishNameTagOption.go b/server/model/dish_name_tag_option.go
similarity index 72%
rename from server/model/dishNameTagOption.go
rename to server/model/dish_name_tag_option.go
index 17a14462..143eb8a4 100644
--- a/server/model/dishNameTagOption.go
+++ b/server/model/dish_name_tag_option.go
@@ -1,7 +1,7 @@
package model
type DishNameTagOption struct {
- DishNameTagOption int32 `gorm:"column:dishNameTagOption;type:int;primary_key;AUTO_INCREMENT;not null;" json:"dishNameTagOption"`
+ DishNameTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOption;type:int;not null;" json:"dishNameTagOption"`
DE string `gorm:"column:DE;type:text;not null;" json:"DE"`
EN string `gorm:"column:EN;type:text;not null;" json:"EN"`
}
diff --git a/server/model/dishNameTagOptionExcluded.go b/server/model/dish_name_tag_option_excluded.go
similarity index 78%
rename from server/model/dishNameTagOptionExcluded.go
rename to server/model/dish_name_tag_option_excluded.go
index 7c8e6deb..f957ed11 100644
--- a/server/model/dishNameTagOptionExcluded.go
+++ b/server/model/dish_name_tag_option_excluded.go
@@ -1,8 +1,8 @@
package model
type DishNameTagOptionExcluded struct {
- DishNameTagOptionExcluded int32 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionExcluded;type:int;not null;" json:"dishNameTagOptionExcluded"`
- NameTagID int32 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"`
+ DishNameTagOptionExcluded int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionExcluded;type:int;not null;" json:"dishNameTagOptionExcluded"`
+ NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"`
Expression string `gorm:"column:expression;type:text;" json:"expression"`
}
diff --git a/server/model/dishNameTagOptionIncluded.go b/server/model/dish_name_tag_option_included.go
similarity index 78%
rename from server/model/dishNameTagOptionIncluded.go
rename to server/model/dish_name_tag_option_included.go
index 8ed262f0..ddd7683d 100644
--- a/server/model/dishNameTagOptionIncluded.go
+++ b/server/model/dish_name_tag_option_included.go
@@ -1,8 +1,8 @@
package model
type DishNameTagOptionIncluded struct {
- DishNameTagOptionIncluded int32 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionIncluded;type:int;not null;" json:"dishNameTagOptionIncluded"`
- NameTagID int32 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"`
+ DishNameTagOptionIncluded int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishNameTagOptionIncluded;type:int;not null;" json:"dishNameTagOptionIncluded"`
+ NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"`
Expression string `gorm:"column:expression;type:text;" json:"expression"`
}
diff --git a/server/model/dishRating.go b/server/model/dish_rating.go
similarity index 76%
rename from server/model/dishRating.go
rename to server/model/dish_rating.go
index e31086f0..7b8e7f93 100644
--- a/server/model/dishRating.go
+++ b/server/model/dish_rating.go
@@ -5,10 +5,10 @@ import (
)
type DishRating struct {
- DishRating int32 `gorm:"primary_key;AUTO_INCREMENT;column:dishRating;type:int;not null;" json:"dishRating"`
+ DishRating int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRating;type:int;not null;" json:"dishRating"`
Points int32 `gorm:"column:points;type:int;not null;" json:"points"`
- CafeteriaID int32 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
- DishID int32 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"`
+ CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
+ DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"`
Comment string `gorm:"column:comment;type:text;" json:"comment"`
Timestamp time.Time `gorm:"column:timestamp;type:timestamp;not null;" json:"timestamp"`
Image string `gorm:"column:image;type:text;" json:"image"`
diff --git a/server/model/dishRatingAverage.go b/server/model/dish_rating_average.go
similarity index 52%
rename from server/model/dishRatingAverage.go
rename to server/model/dish_rating_average.go
index 61ed1374..2db0571c 100644
--- a/server/model/dishRatingAverage.go
+++ b/server/model/dish_rating_average.go
@@ -2,13 +2,13 @@ package model
// DishRatingAverage stores all precomputed values for the cafeteria ratings
type DishRatingAverage struct {
- DishRatingAverage int32 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingAverage;type:int;not null;" json:"dishRatingAverage" `
- CafeteriaID int32 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
- DishID int32 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"`
- Average float32 `gorm:"column:average;type:float;not null;" json:"average" `
- Min int8 `gorm:"column:min;type:int;not null;" json:"min"`
- Max int8 `gorm:"column:max;type:int;not null;" json:"max"`
- Std float32 `gorm:"column:std;type:float;not null;" json:"std"`
+ DishRatingAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingAverage;type:int;not null;" json:"dishRatingAverage" `
+ CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
+ DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"`
+ Average float64 `gorm:"column:average;type:float;not null;" json:"average" `
+ Min int32 `gorm:"column:min;type:int;not null;" json:"min"`
+ Max int32 `gorm:"column:max;type:int;not null;" json:"max"`
+ Std float64 `gorm:"column:std;type:float;not null;" json:"std"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/dishRatingTag.go b/server/model/dish_rating_tag.go
similarity index 69%
rename from server/model/dishRatingTag.go
rename to server/model/dish_rating_tag.go
index d5248c3c..de2bda74 100644
--- a/server/model/dishRatingTag.go
+++ b/server/model/dish_rating_tag.go
@@ -1,10 +1,10 @@
package model
type DishRatingTag struct {
- DishRatingTag int32 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTag;type:int;not null;" json:"dishRatingTag"`
- CorrespondingRating int32 `gorm:"foreignKey:cafeteriaRating;column:parentRating;type:int;not null;" json:"parentRating"`
+ DishRatingTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTag;type:int;not null;" json:"dishRatingTag"`
+ CorrespondingRating int64 `gorm:"foreignKey:cafeteriaRating;column:parentRating;type:int;not null;" json:"parentRating"`
Points int32 `gorm:"column:points;type:int;not null;" json:"points"`
- TagID int `gorm:"foreignKey:dishRatingTagOption;column:tagID;type:int;not null;" json:"tagID"`
+ TagID int64 `gorm:"foreignKey:dishRatingTagOption;column:tagID;type:int;not null;" json:"tagID"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/dishRatingTagAverage.go b/server/model/dish_rating_tag_average.go
similarity index 76%
rename from server/model/dishRatingTagAverage.go
rename to server/model/dish_rating_tag_average.go
index b7b1d0c7..b1535171 100644
--- a/server/model/dishRatingTagAverage.go
+++ b/server/model/dish_rating_tag_average.go
@@ -2,10 +2,10 @@ package model
// DishRatingTagAverage stores all precomputed values for the cafeteria ratings
type DishRatingTagAverage struct {
- DishRatingTagsAverage int32 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTagsAverage;type:int;not null;" json:"dishRatingTagsAverage" `
- CafeteriaID int32 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
- TagID int32 `gorm:"column:tagID;foreignKey:tagID;type:int;not null;" json:"tagID"`
- DishID int32 `gorm:"column:dishID;foreignKey:dishID;type:int;not null;" json:"dishID"`
+ DishRatingTagsAverage int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTagsAverage;type:int;not null;" json:"dishRatingTagsAverage" `
+ CafeteriaID int64 `gorm:"column:cafeteriaID;foreignKey:cafeteria;type:int;not null;" json:"cafeteriaID"`
+ TagID int64 `gorm:"column:tagID;foreignKey:tagID;type:int;not null;" json:"tagID"`
+ DishID int64 `gorm:"column:dishID;foreignKey:dishID;type:int;not null;" json:"dishID"`
Average float32 `gorm:"column:average;type:float;not null;" json:"average" `
Min int8 `gorm:"column:min;type:int;not null;" json:"min"`
Max int8 `gorm:"column:max;type:int;not null;" json:"max"`
diff --git a/server/model/dishRatingTagOption.go b/server/model/dish_rating_tag_option.go
similarity index 89%
rename from server/model/dishRatingTagOption.go
rename to server/model/dish_rating_tag_option.go
index c1aeb01a..c1cbece0 100644
--- a/server/model/dishRatingTagOption.go
+++ b/server/model/dish_rating_tag_option.go
@@ -2,7 +2,7 @@ package model
// DishRatingTagOption stores all available options for tags which can be used to quickly rate dishes
type DishRatingTagOption struct {
- DishRatingTagOption int32 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTagOption;type:int;not null;" json:"dishRatingTagOption"`
+ DishRatingTagOption int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishRatingTagOption;type:int;not null;" json:"dishRatingTagOption"`
DE string `gorm:"column:DE;type:text;default:de;not null;" json:"DE"`
EN string `gorm:"column:EN;type:text;default:en;not null;" json:"EN"`
}
diff --git a/server/model/dishToDishNameTags.go b/server/model/dish_to_dish_name_tag.go
similarity index 64%
rename from server/model/dishToDishNameTags.go
rename to server/model/dish_to_dish_name_tag.go
index 4c40080b..279ff1c5 100644
--- a/server/model/dishToDishNameTags.go
+++ b/server/model/dish_to_dish_name_tag.go
@@ -1,9 +1,9 @@
package model
type DishToDishNameTag struct {
- DishToDishNameTag int32 `gorm:"primary_key;AUTO_INCREMENT;column:dishToDishNameTag;type:int;not null;" json:"dishToDishNameTag"`
- DishID int32 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"`
- NameTagID int32 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"`
+ DishToDishNameTag int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishToDishNameTag;type:int;not null;" json:"dishToDishNameTag"`
+ DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"`
+ NameTagID int64 `gorm:"foreignKey:dishNameTagOption;column:nameTagID;type:int;not null;" json:"nameTagID"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/dishesOfTheWeek.go b/server/model/dishes_of_the_week.go
similarity index 79%
rename from server/model/dishesOfTheWeek.go
rename to server/model/dishes_of_the_week.go
index 7aa72331..219c306d 100644
--- a/server/model/dishesOfTheWeek.go
+++ b/server/model/dishes_of_the_week.go
@@ -1,11 +1,11 @@
package model
type DishesOfTheWeek struct {
- DishesOfTheWeek int32 `gorm:"primary_key;AUTO_INCREMENT;column:dishesOfTheWeek;type:int;not null;" json:"dishesOfTheWeek"`
+ DishesOfTheWeek int64 `gorm:"primary_key;AUTO_INCREMENT;column:dishesOfTheWeek;type:int;not null;" json:"dishesOfTheWeek"`
Year int32 `gorm:"column:year;type:int;not null;" json:"year"`
Week int32 `gorm:"column:week;type:int;not null;" json:"week"`
Day int32 `gorm:"column:day;type:int;not null;" json:"day"`
- DishID int32 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"`
+ DishID int64 `gorm:"column:dishID;foreignKey:dish;type:int;not null;" json:"dishID"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/exam_result_published.go b/server/model/exam_result_published.go
new file mode 100644
index 00000000..5cd24ffe
--- /dev/null
+++ b/server/model/exam_result_published.go
@@ -0,0 +1,58 @@
+package model
+
+import (
+ "encoding/xml"
+ "time"
+)
+
+type campusApiBool bool
+
+func (p *campusApiBool) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ var value string
+ if err := d.DecodeElement(&value, &start); err != nil {
+ return err
+ }
+ switch value {
+ case "J":
+ *p = true
+ default:
+ *p = false
+ }
+ return nil
+}
+
+type TUMAPIPublishedExamResults struct {
+ XMLName xml.Name `xml:"pruefungen"`
+ ExamResults []TUMAPIPublishedExamResult `xml:"pruefung"`
+}
+
+type TUMAPIPublishedExamResult struct {
+ XMLName xml.Name `xml:"pruefung"`
+ Date customDate `xml:"datum"`
+ ExamID string `xml:"pv_term_nr"`
+ LectureTitle string `xml:"lv_titel"`
+ LectureNumber string `xml:"lv_nummer"`
+ LectureSem string `xml:"lv_semester"`
+ LectureType string `xml:"lv_typ"`
+ Published campusApiBool `xml:"note_veroeffentlicht"`
+}
+
+func (examResult *TUMAPIPublishedExamResult) ToDBExamResult() *PublishedExamResult {
+ return &PublishedExamResult{
+ Date: examResult.Date.Time,
+ ExamID: examResult.ExamID,
+ LectureTitle: examResult.LectureTitle,
+ LectureType: examResult.LectureType,
+ LectureSem: examResult.LectureSem,
+ Published: bool(examResult.Published),
+ }
+}
+
+type PublishedExamResult struct {
+ Date time.Time `json:"date"`
+ ExamID string `gorm:"primary_key" json:"examId"`
+ LectureTitle string `json:"lectureTitle"`
+ LectureType string `json:"lectureType"`
+ LectureSem string `json:"lectureSem"`
+ Published bool `json:"published"`
+}
diff --git a/server/model/feedback.go b/server/model/feedback.go
new file mode 100644
index 00000000..bbc16d1b
--- /dev/null
+++ b/server/model/feedback.go
@@ -0,0 +1,25 @@
+package model
+
+import (
+ "github.com/guregu/null"
+)
+
+type Feedback struct {
+ Id int64 `gorm:"column:id;primary_key;AUTO_INCREMENT;type:int;not null;"`
+ ImageCount int32 `gorm:"column:image_count;type:int;not null;"`
+ EmailId null.String `gorm:"column:email_id;type:text;null"`
+ Recipient null.String `gorm:"column:receiver;type:text;null"`
+ ReplyTo null.String `gorm:"column:reply_to;type:text;null"`
+ Feedback null.String `gorm:"column:feedback;type:text;null"`
+ Latitude null.Float `gorm:"column:latitude;type:float;null;"`
+ Longitude null.Float `gorm:"column:longitude;type:float;null;"`
+ OsVersion null.String `gorm:"column:os_version;type:text;null;"`
+ AppVersion null.String `gorm:"column:app_version;type:text;null;"`
+ Processed bool `gorm:"column:processed;type:boolean;default:false;not null;"`
+ Timestamp null.Time `gorm:"column:timestamp;type:timestamp;default:CURRENT_TIMESTAMP;null;"`
+}
+
+// TableName sets the insert table name for this struct type
+func (n *Feedback) TableName() string {
+ return "feedback"
+}
diff --git a/server/model/file.go b/server/model/file.go
new file mode 100644
index 00000000..be246062
--- /dev/null
+++ b/server/model/file.go
@@ -0,0 +1,35 @@
+package model
+
+import (
+ "database/sql"
+ "fmt"
+ "time"
+
+ "github.com/gofrs/uuid/v5"
+ "github.com/guregu/null"
+)
+
+var (
+ _ = time.Second
+ _ = sql.LevelDefault
+ _ = null.Bool{}
+ _ = uuid.UUID{}
+)
+
+// File struct is a row record of the files table in the tca database
+type File struct {
+ File int64 `gorm:"primary_key;AUTO_INCREMENT;column:file;type:int;" json:"file"`
+ Name string `gorm:"column:name;type:text;size:16777215;" json:"name"`
+ Path string `gorm:"column:path;type:text;size:16777215;" json:"path"`
+ Downloads int32 `gorm:"column:downloads;type:int;default:0;" json:"downloads"`
+ URL null.String `gorm:"column:url;default:null;" json:"url"` // URL of the files source (if any)
+ Downloaded null.Bool `gorm:"column:downloaded;type:boolean;default:1;" json:"downloaded"` // true when file is ready to be served, false when still being downloaded
+}
+
+// FullExternalUrl is the full url of the file after being downloaded for external use
+func (f *File) FullExternalUrl() string {
+ if !f.Downloaded.Valid || !f.Downloaded.Bool {
+ return ""
+ }
+ return fmt.Sprintf("https://api.tum.app/files/%s%s", f.Path, f.Name)
+}
diff --git a/server/model/files.go b/server/model/files.go
deleted file mode 100644
index 01c64983..00000000
--- a/server/model/files.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package model
-
-import (
- "database/sql"
- "time"
-
- "github.com/gofrs/uuid/v5"
- "github.com/guregu/null"
-)
-
-var (
- _ = time.Second
- _ = sql.LevelDefault
- _ = null.Bool{}
- _ = uuid.UUID{}
-)
-
-// Files struct is a row record of the files table in the tca database
-type Files struct {
- File int32 `gorm:"primary_key;AUTO_INCREMENT;column:file;type:int;" json:"file"`
- Name string `gorm:"column:name;type:text;size:16777215;" json:"name"`
- Path string `gorm:"column:path;type:text;size:16777215;" json:"path"`
- Downloads int32 `gorm:"column:downloads;type:int;default:0;" json:"downloads"`
- URL sql.NullString `gorm:"column:url;default:null;" json:"url"` // URL of the files source (if any)
- Downloaded sql.NullBool `gorm:"column:downloaded;type:boolean;default:1;" json:"downloaded"` // true when file is ready to be served, false when still being downloaded
-}
-
-// TableName sets the insert table name for this struct type
-func (f *Files) TableName() string {
- return "files"
-}
diff --git a/server/model/iosDevice.go b/server/model/ios_device.go
similarity index 100%
rename from server/model/iosDevice.go
rename to server/model/ios_device.go
diff --git a/server/model/iosDeviceLastUpdated.go b/server/model/ios_device_last_updated.go
similarity index 73%
rename from server/model/iosDeviceLastUpdated.go
rename to server/model/ios_device_last_updated.go
index d06c185e..be79699c 100644
--- a/server/model/iosDeviceLastUpdated.go
+++ b/server/model/ios_device_last_updated.go
@@ -1,16 +1,17 @@
package model
import (
- "database/sql"
"fmt"
+
+ "github.com/guregu/null"
)
// IOSDeviceLastUpdated used as a result of a query that joins
// IOSDevice and IOSDeviceRequestLog tables.
type IOSDeviceLastUpdated struct {
- DeviceID string `json:"deviceId"`
- LastUpdated sql.NullTime `json:"lastUpdated"`
- PublicKey string `json:"publicKey"`
+ DeviceID string `json:"deviceId"`
+ LastUpdated null.Time `json:"lastUpdated"`
+ PublicKey string `json:"publicKey"`
}
func (device *IOSDeviceLastUpdated) String() string {
diff --git a/server/model/iosDeviceRequestLog.go b/server/model/ios_device_request_log.go
similarity index 100%
rename from server/model/iosDeviceRequestLog.go
rename to server/model/ios_device_request_log.go
diff --git a/server/model/iosDevicesActivityReset.go b/server/model/ios_devices_activity_reset.go
similarity index 100%
rename from server/model/iosDevicesActivityReset.go
rename to server/model/ios_devices_activity_reset.go
diff --git a/server/model/ios_grade.go b/server/model/ios_grade.go
index 1d38cbb1..48a3cc83 100644
--- a/server/model/ios_grade.go
+++ b/server/model/ios_grade.go
@@ -4,7 +4,7 @@ import (
"encoding/xml"
"time"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_crypto"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/crypto"
)
// IOSGrades is a wrapper for a list of grades => XML stuff
@@ -55,7 +55,7 @@ func (grade *IOSGrade) CompareToEncrypted(encryptedGrade *IOSEncryptedGrade) boo
// IOSEncryptedGrade is a grade that can be encrypted.
// Whether it is currently encrypted or not is indicated by the IsEncrypted field.
type IOSEncryptedGrade struct {
- ID uint `gorm:"primaryKey"`
+ ID int64 `gorm:"primaryKey"`
Device IOSDevice `gorm:"constraint:OnDelete:CASCADE"`
DeviceID string `gorm:"index;not null"`
LectureTitle string `gorm:"not null"`
@@ -64,12 +64,12 @@ type IOSEncryptedGrade struct {
}
func (e *IOSEncryptedGrade) Encrypt(key string) error {
- encryptedTitle, err := ios_crypto.SymmetricEncrypt(e.LectureTitle, key)
+ encryptedTitle, err := crypto.SymmetricEncrypt(e.LectureTitle, key)
if err != nil {
return err
}
- encryptedGrade, err := ios_crypto.SymmetricEncrypt(e.Grade, key)
+ encryptedGrade, err := crypto.SymmetricEncrypt(e.Grade, key)
if err != nil {
return err
}
@@ -82,12 +82,12 @@ func (e *IOSEncryptedGrade) Encrypt(key string) error {
}
func (e *IOSEncryptedGrade) Decrypt(key string) error {
- decryptedTitle, err := ios_crypto.SymmetricDecrypt(ios_crypto.EncryptedString(e.LectureTitle), key)
+ decryptedTitle, err := crypto.SymmetricDecrypt(crypto.EncryptedString(e.LectureTitle), key)
if err != nil {
return err
}
- decryptedGrade, err := ios_crypto.SymmetricDecrypt(ios_crypto.EncryptedString(e.Grade), key)
+ decryptedGrade, err := crypto.SymmetricDecrypt(crypto.EncryptedString(e.Grade), key)
if err != nil {
return err
}
diff --git a/server/model/iosRemoteNotification.go b/server/model/ios_remote_notification.go
similarity index 94%
rename from server/model/iosRemoteNotification.go
rename to server/model/ios_remote_notification.go
index 4c7464c9..ee174c50 100644
--- a/server/model/iosRemoteNotification.go
+++ b/server/model/ios_remote_notification.go
@@ -5,7 +5,7 @@ package model
import (
"encoding/json"
- "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/ios_crypto"
+ "github.com/TUM-Dev/Campus-Backend/server/backend/ios_notifications/crypto"
)
type IOSNotificationPayload struct {
@@ -122,7 +122,7 @@ func (np *IOSNotificationPayload) Encrypt(publicKey string) *IOSNotificationPayl
np.aps().MutableContent = 1
if alert.Title != "" {
- res, err := ios_crypto.AsymmetricEncrypt(alert.Title, publicKey)
+ res, err := crypto.AsymmetricEncrypt(alert.Title, publicKey)
if err != nil {
alert.Title = "You have a new notification"
@@ -132,7 +132,7 @@ func (np *IOSNotificationPayload) Encrypt(publicKey string) *IOSNotificationPayl
}
if alert.Body != "" {
- res, err := ios_crypto.AsymmetricEncrypt(alert.Body, publicKey)
+ res, err := crypto.AsymmetricEncrypt(alert.Body, publicKey)
if err != nil {
alert.Body = ""
@@ -142,7 +142,7 @@ func (np *IOSNotificationPayload) Encrypt(publicKey string) *IOSNotificationPayl
}
if alert.Subtitle != "" {
- res, err := ios_crypto.AsymmetricEncrypt(alert.Subtitle, publicKey)
+ res, err := crypto.AsymmetricEncrypt(alert.Subtitle, publicKey)
if err != nil {
alert.Subtitle = ""
diff --git a/server/model/iosScheduledUpdateLog.go b/server/model/ios_scheduled_update_log.go
similarity index 93%
rename from server/model/iosScheduledUpdateLog.go
rename to server/model/ios_scheduled_update_log.go
index 0399e303..8a3c495e 100644
--- a/server/model/iosScheduledUpdateLog.go
+++ b/server/model/ios_scheduled_update_log.go
@@ -12,7 +12,7 @@ const (
// IOSScheduledUpdateLog logs the last time a device was updated.
type IOSScheduledUpdateLog struct {
- ID uint32 `gorm:"primary_key;auto_increment;not_null" json:"id"`
+ ID int64 `gorm:"primary_key;auto_increment;not_null" json:"id"`
DeviceID string `gorm:"index:idx_scheduled_update_log_device,unique" json:"deviceId"`
Device IOSDevice `gorm:"constraint:OnDelete:CASCADE;" json:"device"`
Type string `gorm:"type:enum ('grades');" json:"type"`
diff --git a/server/model/iosSchedulingPriority.go b/server/model/ios_scheduling_priority.go
similarity index 83%
rename from server/model/iosSchedulingPriority.go
rename to server/model/ios_scheduling_priority.go
index ffbb3300..39bd9ab5 100644
--- a/server/model/iosSchedulingPriority.go
+++ b/server/model/ios_scheduling_priority.go
@@ -8,12 +8,12 @@ import (
// IOSSchedulingPriority stores some default priorities for the scheduling of
// grade updates.
type IOSSchedulingPriority struct {
- ID int `gorm:"primary_key;auto_increment;not_null" json:"id"`
- FromDay int `gorm:"not null" json:"from_day"`
- ToDay int `gorm:"not null" json:"to_day"`
- FromHour int `gorm:"not null" json:"from_hour"`
- ToHour int `gorm:"not null" json:"to_hour"`
- Priority int `gorm:"not null" json:"priority"`
+ ID int64 `gorm:"primary_key;auto_increment;not_null" json:"id"`
+ FromDay int `gorm:"not null" json:"from_day"`
+ ToDay int `gorm:"not null" json:"to_day"`
+ FromHour int `gorm:"not null" json:"from_hour"`
+ ToHour int `gorm:"not null" json:"to_hour"`
+ Priority int `gorm:"not null" json:"priority"`
}
// IsCurrentlyInRange returns true if the current time is in the range of the
diff --git a/server/model/kino.go b/server/model/kino.go
new file mode 100644
index 00000000..f8eec7a0
--- /dev/null
+++ b/server/model/kino.go
@@ -0,0 +1,31 @@
+package model
+
+import (
+ "time"
+
+ "github.com/guregu/null"
+)
+
+// Kino stores all movies
+type Kino struct {
+ Id int64 `gorm:"primary_key;AUTO_INCREMENT;column:kino;type:int;not null;"`
+ Date time.Time `gorm:"column:date;type:datetime;not null;"`
+ Created time.Time `gorm:"column:created;type:timestamp;not null;default:CURRENT_TIMESTAMP"`
+ Title string `gorm:"column:title;type:text;not null;"`
+ Year string `gorm:"column:year;type:varchar(4);not null;"`
+ Runtime string `gorm:"column:runtime;type:varchar(40);not null;"`
+ Genre string `gorm:"column:genre;type:varchar(100);not null;"`
+ Director string `gorm:"column:director;type:text;not null;"`
+ Actors string `gorm:"column:actors;type:text;not null;"`
+ ImdbRating string `gorm:"column:rating;type:varchar(4);not null;"`
+ Description string `gorm:"column:description;type:text;not null;"`
+ Trailer null.String `gorm:"column:trailer"`
+ FileID int64 `gorm:"column:cover"`
+ File File `gorm:"foreignKey:FileID;references:file"`
+ Link string `gorm:"column:link;type:varchar(190);not null;unique;"`
+}
+
+// TableName sets the insert table name for this struct type
+func (n *Kino) TableName() string {
+ return "kino"
+}
diff --git a/server/model/new_exam_results_subscriber.go b/server/model/new_exam_results_subscriber.go
new file mode 100644
index 00000000..56bb5661
--- /dev/null
+++ b/server/model/new_exam_results_subscriber.go
@@ -0,0 +1,14 @@
+package model
+
+import (
+ "time"
+
+ "github.com/guregu/null"
+)
+
+type NewExamResultsSubscriber struct {
+ CallbackUrl string `gorm:"primary_key" json:"callbackUrl"`
+ ApiKey null.String `json:"-"`
+ CreatedAt time.Time `gorm:"autoCreateTime" json:"createdAt"`
+ LastNotifiedAt null.Time `json:"lastNotifiedAt"`
+}
diff --git a/server/model/news.go b/server/model/news.go
index 04c32c5f..5de7ace7 100755
--- a/server/model/news.go
+++ b/server/model/news.go
@@ -15,15 +15,17 @@ var (
// News struct is a row record of the news table in the tca database
type News struct {
- News int32 `gorm:"primary_key;AUTO_INCREMENT;column:news;type:int;" json:"news"`
- Date time.Time `gorm:"column:date;type:datetime;" json:"date"`
- Created time.Time `gorm:"column:created;type:timestamp;default:CURRENT_TIMESTAMP;" json:"created"`
- Title string `gorm:"column:title;type:text;size:255;" json:"title"`
- Description string `gorm:"column:description;type:text;size:65535;" json:"description"`
- Src int32 `gorm:"column:src;type:int;" json:"src"`
- Link string `gorm:"column:link;type:varchar(190);" json:"link"`
- Image null.String `gorm:"column:image;type:text;size:65535;" json:"image"`
- File null.Int `gorm:"column:file;type:int;" json:"file"`
+ News int64 `gorm:"primary_key;AUTO_INCREMENT;column:news;type:int;"`
+ Date time.Time `gorm:"column:date;type:datetime;"`
+ Created time.Time `gorm:"column:created;type:timestamp;default:CURRENT_TIMESTAMP;"`
+ Title string `gorm:"column:title;type:text;size:255;"`
+ Description string `gorm:"column:description;type:text;size:65535;"`
+ NewsSourceID int64 `gorm:"column:src;type:int;"`
+ NewsSource NewsSource `gorm:"foreignKey:NewsSourceID;references:source;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
+ Link string `gorm:"column:link;type:varchar(190);"`
+ Image null.String `gorm:"column:image;type:text;size:65535;"`
+ FileID null.Int `gorm:"column:file;type:int;"`
+ File *File `gorm:"foreignKey:FileID;references:file;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/news_alert.go b/server/model/news_alert.go
index 0956940a..076c1ae1 100644
--- a/server/model/news_alert.go
+++ b/server/model/news_alert.go
@@ -17,9 +17,9 @@ var (
// NewsAlert struct is a row record of the news_alert table in the tca database
type NewsAlert struct {
- NewsAlert int32 `gorm:"primary_key;AUTO_INCREMENT;column:news_alert;type:int;" json:"news_alert"`
- FilesID int32 `gorm:"column:file;not null"`
- Files Files `gorm:"foreignKey:FilesID;references:file;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
+ NewsAlert int64 `gorm:"primary_key;AUTO_INCREMENT;column:news_alert;type:int;" json:"news_alert"`
+ FileID int64 `gorm:"column:file;not null"`
+ File File `gorm:"foreignKey:FileID;references:file;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
Name null.String `gorm:"column:name;type:varchar(100);" json:"name"`
Link null.String `gorm:"column:link;type:text;size:65535;" json:"link"`
Created time.Time `gorm:"column:created;type:timestamp;default:CURRENT_TIMESTAMP;" json:"created"`
diff --git a/server/model/news_source.go b/server/model/news_source.go
index 69b91cfe..62cc4ca2 100644
--- a/server/model/news_source.go
+++ b/server/model/news_source.go
@@ -17,12 +17,12 @@ var (
// NewsSource struct is a row record of the newsSource table in the tca database
type NewsSource struct {
- Source int32 `gorm:"primary_key;AUTO_INCREMENT;column:source;type:int;"`
- Title string `gorm:"column:title;type:text;size:16777215;"`
- URL null.String `gorm:"column:url;type:text;size:16777215;"`
- FilesID int32 `gorm:"column:icon;not null"`
- Files Files `gorm:"foreignKey:FilesID;references:file;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
- Hook null.String `gorm:"column:hook;type:char;size:12;"`
+ Source int64 `gorm:"primary_key;AUTO_INCREMENT;column:source;type:int;"`
+ Title string `gorm:"column:title;type:text;size:16777215;"`
+ URL null.String `gorm:"column:url;type:text;size:16777215;"`
+ FileID int64 `gorm:"column:icon;not null;type:int;"`
+ File File `gorm:"foreignKey:FileID;references:file;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
+ Hook null.String `gorm:"column:hook;type:char;size:12;"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/notification.go b/server/model/notification.go
index c6ada430..8c93943d 100644
--- a/server/model/notification.go
+++ b/server/model/notification.go
@@ -17,7 +17,7 @@ var (
// Notification struct is a row record of the notification table in the tca database
type Notification struct {
- Notification int32 `gorm:"primary_key;AUTO_INCREMENT;column:notification;type:int;" json:"notification"`
+ Notification int64 `gorm:"primary_key;AUTO_INCREMENT;column:notification;type:int;" json:"notification"`
Type int32 `gorm:"column:type;type:int;" json:"type"`
Location null.Int `gorm:"column:location;type:int;" json:"location"`
Title string `gorm:"column:title;type:text;size:65535;" json:"title"`
diff --git a/server/model/notification_confirmation.go b/server/model/notification_confirmation.go
index 51b7e88d..f5b6a39c 100644
--- a/server/model/notification_confirmation.go
+++ b/server/model/notification_confirmation.go
@@ -17,8 +17,8 @@ var (
// NotificationConfirmation struct is a row record of the notification_confirmation table in the tca database
type NotificationConfirmation struct {
- Notification int32 `gorm:"primary_key;column:notification;type:int;" json:"notification"`
- Device int32 `gorm:"primary_key;column:device;type:int;" json:"device"`
+ Notification int64 `gorm:"primary_key;column:notification;type:int;" json:"notification"`
+ Device int64 `gorm:"primary_key;column:device;type:int;" json:"device"`
Sent int32 `gorm:"column:sent;type:tinyint;default:0;" json:"sent"`
Created time.Time `gorm:"column:created;type:timestamp;default:CURRENT_TIMESTAMP;" json:"created"`
Received null.Time `gorm:"column:received;type:timestamp;" json:"received"`
diff --git a/server/model/notification_type.go b/server/model/notification_type.go
index 3b2ae0c7..661383d7 100644
--- a/server/model/notification_type.go
+++ b/server/model/notification_type.go
@@ -17,7 +17,7 @@ var (
// NotificationType struct is a row record of the notification_type table in the tca database
type NotificationType struct {
- Type int32 `gorm:"primary_key;AUTO_INCREMENT;column:type;type:int;" json:"type"`
+ Type int64 `gorm:"primary_key;AUTO_INCREMENT;column:type;type:int;" json:"type"`
Name string `gorm:"column:name;type:text;size:65535;" json:"name"`
Confirmation string `gorm:"column:confirmation;type:char;size:5;default:false;" json:"confirmation"`
}
diff --git a/server/model/roomfinder_building2area.go b/server/model/roomfinder_building2area.go
index b8babe58..4f72cda4 100644
--- a/server/model/roomfinder_building2area.go
+++ b/server/model/roomfinder_building2area.go
@@ -17,8 +17,8 @@ var (
// RoomfinderBuilding2area struct is a row record of the roomfinder_building2area table in the tca database
type RoomfinderBuilding2area struct {
- AreaID int32 `gorm:"column:area_id;type:int;" json:"area_id"`
BuildingNr string `gorm:"primary_key;column:building_nr;type:varchar(8);" json:"building_nr"`
+ AreaID int32 `gorm:"column:area_id;type:int;" json:"area_id"`
Campus string `gorm:"column:campus;type:char;size:1;" json:"campus"`
Name string `gorm:"column:name;type:varchar(32);" json:"name"`
}
diff --git a/server/model/roomfinder_buildings2maps.go b/server/model/roomfinder_buildings2maps.go
index 6559cf03..50b3cecf 100644
--- a/server/model/roomfinder_buildings2maps.go
+++ b/server/model/roomfinder_buildings2maps.go
@@ -18,7 +18,7 @@ var (
// RoomfinderBuildings2maps struct is a row record of the roomfinder_buildings2maps table in the tca database
type RoomfinderBuildings2maps struct {
BuildingNr string `gorm:"primary_key;column:building_nr;type:varchar(8);" json:"building_nr"`
- MapID int32 `gorm:"primary_key;column:map_id;type:int;" json:"map_id"`
+ MapID int64 `gorm:"primary_key;column:map_id;type:int;" json:"map_id"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/roomfinder_maps.go b/server/model/roomfinder_maps.go
index a1f2fae7..e34f6a55 100644
--- a/server/model/roomfinder_maps.go
+++ b/server/model/roomfinder_maps.go
@@ -17,7 +17,7 @@ var (
// RoomfinderMaps struct is a row record of the roomfinder_maps table in the tca database
type RoomfinderMaps struct {
- MapID int32 `gorm:"primary_key;column:map_id;type:int;" json:"map_id"`
+ MapID int64 `gorm:"primary_key;column:map_id;type:int;" json:"map_id"`
Description string `gorm:"column:description;type:varchar(64);" json:"description"`
Scale int32 `gorm:"column:scale;type:int;" json:"scale"`
Width int32 `gorm:"column:width;type:int;" json:"width"`
diff --git a/server/model/roomfinder_rooms.go b/server/model/roomfinder_rooms.go
index e7fb8c2e..3b81d041 100644
--- a/server/model/roomfinder_rooms.go
+++ b/server/model/roomfinder_rooms.go
@@ -17,7 +17,7 @@ var (
// RoomfinderRooms struct is a row record of the roomfinder_rooms table in the tca database
type RoomfinderRooms struct {
- RoomID int32 `gorm:"primary_key;column:room_id;type:int;" json:"room_id"`
+ RoomID int64 `gorm:"primary_key;column:room_id;type:int;" json:"room_id"`
RoomCode null.String `gorm:"column:room_code;type:varchar(32);" json:"room_code"`
BuildingNr null.String `gorm:"column:building_nr;type:varchar(8);" json:"building_nr"`
ArchID null.String `gorm:"column:arch_id;type:varchar(16);" json:"arch_id"`
diff --git a/server/model/roomfinder_rooms2maps.go b/server/model/roomfinder_rooms2maps.go
index 1af8d278..a7c7bafc 100644
--- a/server/model/roomfinder_rooms2maps.go
+++ b/server/model/roomfinder_rooms2maps.go
@@ -17,8 +17,8 @@ var (
// RoomfinderRooms2maps struct is a row record of the roomfinder_rooms2maps table in the tca database
type RoomfinderRooms2maps struct {
- RoomID int32 `gorm:"primary_key;column:room_id;type:int;" json:"room_id"`
- MapID int32 `gorm:"primary_key;column:map_id;type:int;" json:"map_id"`
+ RoomID int64 `gorm:"primary_key;column:room_id;type:int;" json:"room_id"`
+ MapID int64 `gorm:"primary_key;column:map_id;type:int;" json:"map_id"`
}
// TableName sets the insert table name for this struct type
diff --git a/server/model/updateNote.go b/server/model/update_note.go
similarity index 84%
rename from server/model/updateNote.go
rename to server/model/update_note.go
index 15ec9c7d..ad83708f 100755
--- a/server/model/updateNote.go
+++ b/server/model/update_note.go
@@ -2,7 +2,7 @@ package model
// UpdateNote struct for update notes
type UpdateNote struct {
- VersionCode int32 `gorm:"primary_key;AUTO_INCREMENT;column:version_code;type:int;"`
+ VersionCode int64 `gorm:"primary_key;AUTO_INCREMENT;column:version_code;type:int;"`
VersionName string `gorm:"column:version_name;type:text;"`
Message string `gorm:"column:message;type:text;"`
}