diff --git a/config.yaml b/config.yaml index 56de33b..b111e53 100644 --- a/config.yaml +++ b/config.yaml @@ -1,16 +1,30 @@ service_name: SILVERMOBI +storage: + db: + type: psql + psql: + host: localhost + dbname: coopgo_platform + user: postgres + password: postgres + sslmode: disable + port: 5432 + schema: silvermobi_backend + tables: + users_firebase: users_firebase services: internal: mobility_accounts: type: grpc - dial: localhost:8090 + dial: 0.0.0.0:8090 push: type: gorush-grpc dial: 0.0.0.0:8095 external: grpc: enable: true + ip: 192.168.0.111 port: 8099 web: enable: true @@ -34,7 +48,8 @@ services: id: cd11c681-4168-4bdf-8f2d-9e3ade5fac8d bearer: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjZDExYzY4MS00MTY4LTRiZGYtOGYyZC05ZTNhZGU1ZmFjOGQiLCJuYW1lIjoiY2VydGluZXJneSIsImlhdCI6MTUxNjIzOTAyMn0.tPwn3uD_6T4FjOTehYDRNg39x2A4E9FFv6qTgduODaA # bearer: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjZDExYzY4MS00MTY4LTRiZGYtOGYyZC05ZTNhZGU1ZmFjOGQiLCJuYW1lIjoiY2VydGluZXJneSIsImlhdCI6MTUxNjIzOTAyMn0.LAr2l5X9XFRbPRPQvZLt8AWyfzbFGS5BO9MlB4U5HJo # PROD - +solidarity_service: + address: 0.0.0.0:8089 identification: local: jwt_secret: JWT_KEY @@ -45,12 +60,7 @@ carpooling_proofs: base_url: https://api.demo.covoiturage.beta.gouv.fr token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhIjoiN2Y4MTQwNzYtOTJmOS00NjExLTlhMmItZjA0MzU4MmMwOWI3IiwibyI6OSwicyI6Im9wZXJhdG9yIiwicCI6WyJjb21tb24uY2VydGlmaWNhdGUuZmluZCIsImNvbW1vbi5jb21wYW55LmZldGNoIiwiY29tbW9uLmNvbXBhbnkuZmluZCIsImNvbW1vbi5ob25vci5zYXZlIiwiY29tbW9uLmhvbm9yLnN0YXRzIiwiY29tbW9uLm9wZXJhdG9yLmxpc3QiLCJjb21tb24ub3BlcmF0b3IuZmluZCIsImNvbW1vbi5wb2xpY3kubGlzdCIsImNvbW1vbi5wb2xpY3kubGlzdC50ZW1wbGF0ZXMiLCJjb21tb24udGVycml0b3J5LmZpbmQiLCJjb21tb24udGVycml0b3J5Lmxpc3QiLCJjb21tb24udGVycml0b3J5LnJlYWQiLCJjb21tb24udHJpcC5zdGF0cyIsImNvbW1vbi51c2VyLnVwZGF0ZSIsImNvbW1vbi51c2VyLmZpbmQiLCJjb21tb24udXNlci5wb2xpY3lTaW11bGF0ZSIsIm9wZXJhdG9yLmFjcXVpc2l0aW9uLmNyZWF0ZSIsIm9wZXJhdG9yLmFjcXVpc2l0aW9uLmNhbmNlbCIsIm9wZXJhdG9yLmFjcXVpc2l0aW9uLnN0YXR1cyIsIm9wZXJhdG9yLmNlcnRpZmljYXRlLmNyZWF0ZSIsIm9wZXJhdG9yLmNlcnRpZmljYXRlLmRvd25sb2FkIiwib3BlcmF0b3IucG9saWN5LnNpbXVsYXRlLmZ1dHVyZSJdLCJ2IjoyLCJpYXQiOjE2NzgwOTg0NTR9.b4ezR41U4kGwa6FVF0-JyvqEE1kKtxGEa5gzqh4ctTU -storage: - kv: - redis: - addr: 0.0.0.0:6379 - db: db0 - type: minio + geocoder: type: pelias diff --git a/go.mod b/go.mod index 0bbafca..eb750e6 100644 --- a/go.mod +++ b/go.mod @@ -3,37 +3,39 @@ module git.coopgo.io/coopgo-apps/silvermobi go 1.20 require ( + git.coopgo.io/coopgo-platform/geocode v0.0.0-20230329105149-1f31b361814e git.coopgo.io/coopgo-platform/mobility-accounts v0.0.0-20230430115320-f5bb2e7c2c26 + git.coopgo.io/coopgo-platform/routing-service v0.0.0-20230403183358-4d30329f06be github.com/appleboy/gorush v1.16.3 - github.com/go-redis/redis/v9 v9.0.0-rc.2 github.com/golang-jwt/jwt/v4 v4.5.0 github.com/golang/protobuf v1.5.3 + github.com/google/uuid v1.3.0 github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 + github.com/lib/pq v1.10.9 + github.com/paulmach/orb v0.9.0 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.29.1 github.com/spf13/viper v1.16.0 + google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 google.golang.org/grpc v1.56.0 google.golang.org/protobuf v1.31.0 gopkg.in/mail.v2 v2.3.1 ) require ( - github.com/cespare/xxhash/v2 v2.2.0 // indirect + cloud.google.com/go/maps v0.7.0 // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect - github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-stack/stack v1.8.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/klauspost/compress v1.16.3 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.18 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect @@ -42,14 +44,15 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.4.2 // indirect + github.com/twpayne/go-polyline v1.1.1 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect - github.com/xdg-go/scram v1.0.2 // indirect - github.com/xdg-go/stringprep v1.0.2 // indirect + github.com/xdg-go/scram v1.1.1 // indirect + github.com/xdg-go/stringprep v1.0.3 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect go.etcd.io/etcd/api/v3 v3.5.9 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect go.etcd.io/etcd/client/v3 v3.5.9 // indirect - go.mongodb.org/mongo-driver v1.9.1 // indirect + go.mongodb.org/mongo-driver v1.11.1 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.21.0 // indirect @@ -58,7 +61,6 @@ require ( golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/go.sum b/go.sum index beec789..8319b9e 100644 --- a/go.sum +++ b/go.sum @@ -28,6 +28,8 @@ cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvu cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/maps v0.7.0 h1:mv9YaczD4oZBZkM5XJl6fXQ984IkJNHPwkc8MUsdkBo= +cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -39,8 +41,12 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +git.coopgo.io/coopgo-platform/geocode v0.0.0-20230329105149-1f31b361814e h1:v7Xjy0cfY6WRi3Z9BeqpW/1GNyhALitgFvRgs1gbtQE= +git.coopgo.io/coopgo-platform/geocode v0.0.0-20230329105149-1f31b361814e/go.mod h1:v1ZKauCJ989bUkLHmsGdaxEa0S/L2OajERePcRqwMM8= git.coopgo.io/coopgo-platform/mobility-accounts v0.0.0-20230430115320-f5bb2e7c2c26 h1:qiYVLLNU29xgT0RRj0Jz0WrjEJnz1Eng1X7l1UW9jGU= git.coopgo.io/coopgo-platform/mobility-accounts v0.0.0-20230430115320-f5bb2e7c2c26/go.mod h1:1typNYtO+PQT6KG77vs/PUv0fO60/nbeSGZL2tt1LLg= +git.coopgo.io/coopgo-platform/routing-service v0.0.0-20230403183358-4d30329f06be h1:VIzWX8NftKzQX1clunLaMf79Ut1dygcCc/ZLV/iWOaY= +git.coopgo.io/coopgo-platform/routing-service v0.0.0-20230403183358-4d30329f06be/go.mod h1:Nh7o15LlV0OuO9zxvJIs9FlelpeAaLYkXtFdgIkFrgg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/appleboy/gorush v1.16.3 h1:g0VfSEggVGoPY/RvOJp6aoCi2c6S1szGLgztvpnLpd0= @@ -48,8 +54,6 @@ github.com/appleboy/gorush v1.16.3/go.mod h1:ZWWQx7W9c7aptKnJuJxdo24leCcSfduINwa github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -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/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -64,10 +68,7 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV 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/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= +github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -82,9 +83,6 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-redis/redis/v9 v9.0.0-rc.2 h1:IN1eI8AvJJeWHjMW/hlFAv2sAfvTun2DVksDDJ3a6a0= -github.com/go-redis/redis/v9 v9.0.0-rc.2/go.mod h1:cgBknjwcBJa2prbnuHH/4k/Mlj4r0pWNV2HBanHujfY= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -177,6 +175,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= 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/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= @@ -188,13 +188,14 @@ github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp9 github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe h1:iruDEfMl2E6fbMZ9s0scYfZQ84/6SPL6zC8ACM2oIL0= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/paulmach/orb v0.9.0 h1:MwA1DqOKtvCgm7u9RZ/pnYejTeDJPnr0+0oFajBbJqk= +github.com/paulmach/orb v0.9.0/go.mod h1:SudmOk85SXtmXAB3sLGyJ6tZy/8pdfrV0o6ef98Xc30= +github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -224,6 +225,7 @@ github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -240,12 +242,14 @@ github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8 github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= +github.com/twpayne/go-polyline v1.1.1 h1:/tSF1BR7rN4HWj4XKqvRUNrCiYVMCvywxTFVofvDV0w= +github.com/twpayne/go-polyline v1.1.1/go.mod h1:ybd9IWWivW/rlXPXuuckeKUyF3yrIim+iqA7kSl4NFY= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= -github.com/xdg-go/scram v1.0.2 h1:akYIkZ28e6A96dkWNJQu3nmCzH3YfwMPQExUYDaRv7w= -github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= -github.com/xdg-go/stringprep v1.0.2 h1:6iq84/ryjjeRmMJwxutI51F2GIPlP5BfTvXHeYjyhBc= -github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg-go/scram v1.1.1 h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -259,8 +263,8 @@ go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2I go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= -go.mongodb.org/mongo-driver v1.9.1 h1:m078y9v7sBItkt1aaoe2YlvWEXcD263e1a4E1fBrJ1c= -go.mongodb.org/mongo-driver v1.9.1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= +go.mongodb.org/mongo-driver v1.11.1 h1:QP0znIRTuL0jf1oBQoAoM0C6ZJfBK4kx0Uumtv1A7w8= +go.mongodb.org/mongo-driver v1.11.1/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -284,8 +288,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/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-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= @@ -392,7 +396,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-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 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= @@ -428,7 +431,6 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 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= @@ -436,7 +438,6 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= @@ -453,7 +454,6 @@ golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -596,6 +596,7 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 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.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 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= @@ -609,7 +610,6 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/mail.v2 v2.3.1 h1:WYFn/oANrAGP2C0dcV6/pbkPzv8yGzqTjPmTeO7qoXk= gopkg.in/mail.v2 v2.3.1/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/handler/account.go b/handler/account.go new file mode 100644 index 0000000..d4dcff9 --- /dev/null +++ b/handler/account.go @@ -0,0 +1,16 @@ +package handler + +import ( + "context" + "git.coopgo.io/coopgo-apps/silvermobi/models" + "git.coopgo.io/coopgo-platform/mobility-accounts/grpcapi" +) + +func (h *SilvermobiHandler) GetAccountInfos(ctx context.Context, id string) (account *models.Account, err error) { + resp, err := h.Services.MobilityAccounts.Client.GetAccount(ctx, &grpcapi.GetAccountRequest{Id: id}) + if err != nil { + return nil, err + } + account = h.Services.MobilityAccounts.ToAccountModel(resp.Account.ToStorageType()) + return account, nil +} diff --git a/handler/geo.go b/handler/geo.go new file mode 100644 index 0000000..1cc3a6f --- /dev/null +++ b/handler/geo.go @@ -0,0 +1,57 @@ +package handler + +import ( + "fmt" + "github.com/paulmach/orb" + "github.com/paulmach/orb/geojson" + "google.golang.org/genproto/googleapis/maps/routing/v2" +) + +func (h *SilvermobiHandler) GeoAutocomplete(text string, lat, lon float64) (*geojson.FeatureCollection, error) { + result, err := h.Services.Geocoder.Autocomplete(text) + if err != nil { + return nil, err + } + return result, nil +} + +func (h *SilvermobiHandler) GeoRoute(locations geojson.FeatureCollection) (route *routing.Route, err error) { + route_locations := []orb.Point{} + + features_type := "" + + for _, f := range locations.Features { + ft := f.Geometry.GeoJSONType() + if features_type != "" && ft != features_type { + return nil, fmt.Errorf("mixing different types of geometries in the feature collection is not allowed : %s and %s found", features_type, ft) + } + + features_type = ft + + if features_type == "Point" { + if point, ok := f.Geometry.(orb.Point); ok { + route_locations = append(route_locations, point) + } + } else { + return nil, fmt.Errorf("feature type %s not supported", features_type) + } + + return nil, err + } + + return route, nil +} + +func (h *SilvermobiHandler) GeoReturnRoute(locations geojson.FeatureCollection) (route *routing.Route, err error) { + loc := locations + route.Polyline.String() + reverse(loc.Features) + + return h.GeoRoute(loc) +} + +func reverse[S ~[]E, E any](s S) { + for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { + s[i], s[j] = s[j], s[i] + } +} diff --git a/handler/handler.go b/handler/handler.go index a24470c..7391c79 100644 --- a/handler/handler.go +++ b/handler/handler.go @@ -7,15 +7,15 @@ import ( ) type SilvermobiHandler struct { - Config *viper.Viper - Services *services.ServicesHandler - KVHandler storage.KVHandler + Config *viper.Viper + Services *services.ServicesHandler + Storage storage.Storage } -func NewSilvermobiHandler(cfg *viper.Viper, services *services.ServicesHandler, KVHandler storage.KVHandler) (*SilvermobiHandler, error) { +func NewSilvermobiHandler(cfg *viper.Viper, services *services.ServicesHandler, storage storage.Storage) (*SilvermobiHandler, error) { return &SilvermobiHandler{ - Config: cfg, - Services: services, - KVHandler: KVHandler, + Config: cfg, + Services: services, + Storage: storage, }, nil } diff --git a/handler/notifications.go b/handler/notifications.go new file mode 100644 index 0000000..9abd266 --- /dev/null +++ b/handler/notifications.go @@ -0,0 +1,64 @@ +package handler + +import ( + "context" + "crypto/tls" + "git.coopgo.io/coopgo-apps/silvermobi/services" + "git.coopgo.io/coopgo-platform/mobility-accounts/grpcapi" + gomail "gopkg.in/mail.v2" +) + +func (h *SilvermobiHandler) PutFirebase(ctx context.Context, id string, token string, device_platform string) (err error) { + err = h.Storage.CreateFirebaseToken(id, token, device_platform) + return err +} + +func (h *SilvermobiHandler) SendNotification(id, title, message string) (err error) { + firebase_token, platfrom, _ := h.Storage.GetFirebaseToken(id) + if err != nil { + return err + } + if platfrom == "android" { + _ = h.Services.Push.Send( + services.Notification{ + Platform: services.PushToAndroid, + Recipients: []string{firebase_token}, + Title: title, + Message: message, + }, + ) + } else { + _ = h.Services.Push.Send( + services.Notification{ + Platform: services.PushToIos, + Recipients: []string{firebase_token}, + Title: title, + Message: message, + }, + ) + } + + return nil + +} +func (h *SilvermobiHandler) SendEmail(id, title, message string) (err error) { + resp, err := h.Services.MobilityAccounts.Client.GetAccount(context.Background(), &grpcapi.GetAccountRequest{Id: id}) + if err != nil { + return err + } + + account := h.Services.MobilityAccounts.ToAccountModel(resp.Account.ToStorageType()) + m := gomail.NewMessage() + m.SetHeader("From", h.Config.GetString("emailing.smtp.username")) + m.SetHeader("To", account.Email) + m.SetHeader("Subject", title) + m.SetBody("text/plain", message) + d := gomail.NewDialer(h.Config.GetString("emailing.smtp.host"), h.Config.GetInt("emailing.smtp.port"), h.Config.GetString("emailing.smtp.username"), + h.Config.GetString("emailing.smtp.password")) + d.TLSConfig = &tls.Config{InsecureSkipVerify: true} + if err := d.DialAndSend(m); err != nil { + return err + } + return nil + +} diff --git a/handler/onboarding_validation.go b/handler/onboarding_validation.go index 19cb261..82ac8ee 100644 --- a/handler/onboarding_validation.go +++ b/handler/onboarding_validation.go @@ -107,6 +107,22 @@ func (h *SilvermobiHandler) GetAccountType(ctx context.Context, id string) (acco } return "", errors.New("account type not set") } +func (h *SilvermobiHandler) GetAccountPhone(ctx context.Context, id string) (phone_number string, err error) { + request := &grpcapi.GetAccountRequest{ + Id: id, + } + resp, err := h.Services.MobilityAccounts.Client.GetAccount(ctx, request) + if err != nil { + return "", err + log.Error().Err(err).Msg("Failed get account type") + } + account := h.Services.MobilityAccounts.ToAccountModel(resp.Account.ToStorageType()) + if account.PhoneNumber != "" { + + return account.PhoneNumber, nil + } + return "", errors.New("invalid request ") +} func (h *SilvermobiHandler) CheckValidation(ctx context.Context, id string) (phone_validation, birth_validation, type_validation bool, err error) { request := &grpcapi.GetAccountRequest{ @@ -127,7 +143,6 @@ func (h *SilvermobiHandler) CheckValidation(ctx context.Context, id string) (pho if account.BirthDate != "" { birth_validation = true } - fmt.Println(account.Type) if account.Type != "" { type_validation = true } diff --git a/main.go b/main.go index 31562fc..229dc12 100644 --- a/main.go +++ b/main.go @@ -25,16 +25,15 @@ func main() { if err != nil { log.Fatal().Err(err).Msg("failed starting services handler") } - kvhandler, err := storage.NewKVHandler(cfg) + storage, err := storage.NewPostgresqlStorage(cfg) if err != nil { log.Fatal().Err(err).Msg("failed starting storage handler") } - handler, err := handler.NewSilvermobiHandler(cfg, services, kvhandler) + handler, err := handler.NewSilvermobiHandler(cfg, services, storage) if err != nil { log.Fatal().Err(err).Msg("failed starting ridygo handler") } - failed := make(chan error) if grpc_enable { diff --git a/models/accounts.go b/models/accounts.go index e4cdcfc..f0f1f3a 100644 --- a/models/accounts.go +++ b/models/accounts.go @@ -7,6 +7,7 @@ import ( type Account struct { ID string `json:"id"` + Email string `json:"email"` FirstName string `json:"firstName,omitempty"` LastName string `json:"lastName,omitempty"` VerifiedIdentity *bool `json:"verifiedIdentity,omitempty"` @@ -15,6 +16,12 @@ type Account struct { LocalCredentials } +type User struct { + ID string `json:"user_id"` + Status string `json:"status"` + BookingID string `json:"booking_id"` +} + type LocalCredentials struct { Email string EmailVerified bool diff --git a/servers/grpcapi/proto/silvermobi-service.pb.go b/servers/grpcapi/proto/silvermobi-service.pb.go index 1348ac7..ab373c1 100644 --- a/servers/grpcapi/proto/silvermobi-service.pb.go +++ b/servers/grpcapi/proto/silvermobi-service.pb.go @@ -7,6 +7,7 @@ package proto import ( + _struct "github.com/golang/protobuf/ptypes/struct" timestamp "github.com/golang/protobuf/ptypes/timestamp" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -64,7 +65,7 @@ func (x AccountTypeRequest_AccountType) Number() protoreflect.EnumNumber { // Deprecated: Use AccountTypeRequest_AccountType.Descriptor instead. func (AccountTypeRequest_AccountType) EnumDescriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{20, 0} + return file_silvermobi_service_proto_rawDescGZIP(), []int{24, 0} } type AccountTypeResponse_AccountType int32 @@ -110,7 +111,202 @@ func (x AccountTypeResponse_AccountType) Number() protoreflect.EnumNumber { // Deprecated: Use AccountTypeResponse_AccountType.Descriptor instead. func (AccountTypeResponse_AccountType) EnumDescriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{21, 0} + return file_silvermobi_service_proto_rawDescGZIP(), []int{25, 0} +} + +type AccountInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *AccountInfoRequest) Reset() { + *x = AccountInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountInfoRequest) ProtoMessage() {} + +func (x *AccountInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[0] + 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 AccountInfoRequest.ProtoReflect.Descriptor instead. +func (*AccountInfoRequest) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{0} +} + +type AccountInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` + LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` +} + +func (x *AccountInfoResponse) Reset() { + *x = AccountInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountInfoResponse) ProtoMessage() {} + +func (x *AccountInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[1] + 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 AccountInfoResponse.ProtoReflect.Descriptor instead. +func (*AccountInfoResponse) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{1} +} + +func (x *AccountInfoResponse) GetFirstName() string { + if x != nil { + return x.FirstName + } + return "" +} + +func (x *AccountInfoResponse) GetLastName() string { + if x != nil { + return x.LastName + } + return "" +} + +type FirebaseTokenRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + DevicePlatform string `protobuf:"bytes,2,opt,name=device_platform,json=devicePlatform,proto3" json:"device_platform,omitempty"` +} + +func (x *FirebaseTokenRequest) Reset() { + *x = FirebaseTokenRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FirebaseTokenRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FirebaseTokenRequest) ProtoMessage() {} + +func (x *FirebaseTokenRequest) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[2] + 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 FirebaseTokenRequest.ProtoReflect.Descriptor instead. +func (*FirebaseTokenRequest) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{2} +} + +func (x *FirebaseTokenRequest) GetToken() string { + if x != nil { + return x.Token + } + return "" +} + +func (x *FirebaseTokenRequest) GetDevicePlatform() string { + if x != nil { + return x.DevicePlatform + } + return "" +} + +type FirebaseTokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Result bool `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"` +} + +func (x *FirebaseTokenResponse) Reset() { + *x = FirebaseTokenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FirebaseTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FirebaseTokenResponse) ProtoMessage() {} + +func (x *FirebaseTokenResponse) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[3] + 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 FirebaseTokenResponse.ProtoReflect.Descriptor instead. +func (*FirebaseTokenResponse) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{3} +} + +func (x *FirebaseTokenResponse) GetResult() bool { + if x != nil { + return x.Result + } + return false } type AuthLoginRequest struct { @@ -125,7 +321,7 @@ type AuthLoginRequest struct { func (x *AuthLoginRequest) Reset() { *x = AuthLoginRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[0] + mi := &file_silvermobi_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -138,7 +334,7 @@ func (x *AuthLoginRequest) String() string { func (*AuthLoginRequest) ProtoMessage() {} func (x *AuthLoginRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[0] + mi := &file_silvermobi_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -151,7 +347,7 @@ func (x *AuthLoginRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthLoginRequest.ProtoReflect.Descriptor instead. func (*AuthLoginRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{0} + return file_silvermobi_service_proto_rawDescGZIP(), []int{4} } func (x *AuthLoginRequest) GetUsername() string { @@ -179,7 +375,7 @@ type AuthLoginResponse struct { func (x *AuthLoginResponse) Reset() { *x = AuthLoginResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[1] + mi := &file_silvermobi_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -192,7 +388,7 @@ func (x *AuthLoginResponse) String() string { func (*AuthLoginResponse) ProtoMessage() {} func (x *AuthLoginResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[1] + mi := &file_silvermobi_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -205,7 +401,7 @@ func (x *AuthLoginResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthLoginResponse.ProtoReflect.Descriptor instead. func (*AuthLoginResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{1} + return file_silvermobi_service_proto_rawDescGZIP(), []int{5} } func (x *AuthLoginResponse) GetToken() string { @@ -230,7 +426,7 @@ type AuthRegisterRequest struct { func (x *AuthRegisterRequest) Reset() { *x = AuthRegisterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[2] + mi := &file_silvermobi_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -243,7 +439,7 @@ func (x *AuthRegisterRequest) String() string { func (*AuthRegisterRequest) ProtoMessage() {} func (x *AuthRegisterRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[2] + mi := &file_silvermobi_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -256,7 +452,7 @@ func (x *AuthRegisterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthRegisterRequest.ProtoReflect.Descriptor instead. func (*AuthRegisterRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{2} + return file_silvermobi_service_proto_rawDescGZIP(), []int{6} } func (x *AuthRegisterRequest) GetEmail() string { @@ -305,7 +501,7 @@ type AuthRegisterResponse struct { func (x *AuthRegisterResponse) Reset() { *x = AuthRegisterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[3] + mi := &file_silvermobi_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -318,7 +514,7 @@ func (x *AuthRegisterResponse) String() string { func (*AuthRegisterResponse) ProtoMessage() {} func (x *AuthRegisterResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[3] + mi := &file_silvermobi_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -331,7 +527,7 @@ func (x *AuthRegisterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthRegisterResponse.ProtoReflect.Descriptor instead. func (*AuthRegisterResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{3} + return file_silvermobi_service_proto_rawDescGZIP(), []int{7} } func (x *AuthRegisterResponse) GetToken() string { @@ -353,7 +549,7 @@ type ForgetAccountRequest struct { func (x *ForgetAccountRequest) Reset() { *x = ForgetAccountRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[4] + mi := &file_silvermobi_service_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -366,7 +562,7 @@ func (x *ForgetAccountRequest) String() string { func (*ForgetAccountRequest) ProtoMessage() {} func (x *ForgetAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[4] + mi := &file_silvermobi_service_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -379,7 +575,7 @@ func (x *ForgetAccountRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ForgetAccountRequest.ProtoReflect.Descriptor instead. func (*ForgetAccountRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{4} + return file_silvermobi_service_proto_rawDescGZIP(), []int{8} } func (x *ForgetAccountRequest) GetUsername() string { @@ -408,7 +604,7 @@ type ForgetAccountResponse struct { func (x *ForgetAccountResponse) Reset() { *x = ForgetAccountResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[5] + mi := &file_silvermobi_service_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -421,7 +617,7 @@ func (x *ForgetAccountResponse) String() string { func (*ForgetAccountResponse) ProtoMessage() {} func (x *ForgetAccountResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[5] + mi := &file_silvermobi_service_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -434,7 +630,7 @@ func (x *ForgetAccountResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ForgetAccountResponse.ProtoReflect.Descriptor instead. func (*ForgetAccountResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{5} + return file_silvermobi_service_proto_rawDescGZIP(), []int{9} } func (x *ForgetAccountResponse) GetResponse() bool { @@ -463,7 +659,7 @@ type UpdatePasswordRequest struct { func (x *UpdatePasswordRequest) Reset() { *x = UpdatePasswordRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[6] + mi := &file_silvermobi_service_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -476,7 +672,7 @@ func (x *UpdatePasswordRequest) String() string { func (*UpdatePasswordRequest) ProtoMessage() {} func (x *UpdatePasswordRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[6] + mi := &file_silvermobi_service_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -489,7 +685,7 @@ func (x *UpdatePasswordRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdatePasswordRequest.ProtoReflect.Descriptor instead. func (*UpdatePasswordRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{6} + return file_silvermobi_service_proto_rawDescGZIP(), []int{10} } func (x *UpdatePasswordRequest) GetEmail() string { @@ -517,7 +713,7 @@ type UpdatePasswordResponse struct { func (x *UpdatePasswordResponse) Reset() { *x = UpdatePasswordResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[7] + mi := &file_silvermobi_service_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -530,7 +726,7 @@ func (x *UpdatePasswordResponse) String() string { func (*UpdatePasswordResponse) ProtoMessage() {} func (x *UpdatePasswordResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[7] + mi := &file_silvermobi_service_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -543,7 +739,7 @@ func (x *UpdatePasswordResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdatePasswordResponse.ProtoReflect.Descriptor instead. func (*UpdatePasswordResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{7} + return file_silvermobi_service_proto_rawDescGZIP(), []int{11} } func (x *UpdatePasswordResponse) GetResponse() bool { @@ -564,7 +760,7 @@ type SetPhoneNumberRequest struct { func (x *SetPhoneNumberRequest) Reset() { *x = SetPhoneNumberRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[8] + mi := &file_silvermobi_service_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -577,7 +773,7 @@ func (x *SetPhoneNumberRequest) String() string { func (*SetPhoneNumberRequest) ProtoMessage() {} func (x *SetPhoneNumberRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[8] + mi := &file_silvermobi_service_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -590,7 +786,7 @@ func (x *SetPhoneNumberRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPhoneNumberRequest.ProtoReflect.Descriptor instead. func (*SetPhoneNumberRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{8} + return file_silvermobi_service_proto_rawDescGZIP(), []int{12} } func (x *SetPhoneNumberRequest) GetPhoneNumber() string { @@ -611,7 +807,7 @@ type SetPhoneNumberResponse struct { func (x *SetPhoneNumberResponse) Reset() { *x = SetPhoneNumberResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[9] + mi := &file_silvermobi_service_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -624,7 +820,7 @@ func (x *SetPhoneNumberResponse) String() string { func (*SetPhoneNumberResponse) ProtoMessage() {} func (x *SetPhoneNumberResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[9] + mi := &file_silvermobi_service_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -637,7 +833,7 @@ func (x *SetPhoneNumberResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPhoneNumberResponse.ProtoReflect.Descriptor instead. func (*SetPhoneNumberResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{9} + return file_silvermobi_service_proto_rawDescGZIP(), []int{13} } func (x *SetPhoneNumberResponse) GetOk() bool { @@ -659,7 +855,7 @@ type VerifyPhoneNumberRequest struct { func (x *VerifyPhoneNumberRequest) Reset() { *x = VerifyPhoneNumberRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[10] + mi := &file_silvermobi_service_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -672,7 +868,7 @@ func (x *VerifyPhoneNumberRequest) String() string { func (*VerifyPhoneNumberRequest) ProtoMessage() {} func (x *VerifyPhoneNumberRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[10] + mi := &file_silvermobi_service_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -685,7 +881,7 @@ func (x *VerifyPhoneNumberRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use VerifyPhoneNumberRequest.ProtoReflect.Descriptor instead. func (*VerifyPhoneNumberRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{10} + return file_silvermobi_service_proto_rawDescGZIP(), []int{14} } func (x *VerifyPhoneNumberRequest) GetPhoneNumber() string { @@ -713,7 +909,7 @@ type VerifyPhoneNumberResponse struct { func (x *VerifyPhoneNumberResponse) Reset() { *x = VerifyPhoneNumberResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[11] + mi := &file_silvermobi_service_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -726,7 +922,7 @@ func (x *VerifyPhoneNumberResponse) String() string { func (*VerifyPhoneNumberResponse) ProtoMessage() {} func (x *VerifyPhoneNumberResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[11] + mi := &file_silvermobi_service_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -739,7 +935,7 @@ func (x *VerifyPhoneNumberResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use VerifyPhoneNumberResponse.ProtoReflect.Descriptor instead. func (*VerifyPhoneNumberResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{11} + return file_silvermobi_service_proto_rawDescGZIP(), []int{15} } func (x *VerifyPhoneNumberResponse) GetOk() bool { @@ -760,7 +956,7 @@ type BirthDateRequest struct { func (x *BirthDateRequest) Reset() { *x = BirthDateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[12] + mi := &file_silvermobi_service_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -773,7 +969,7 @@ func (x *BirthDateRequest) String() string { func (*BirthDateRequest) ProtoMessage() {} func (x *BirthDateRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[12] + mi := &file_silvermobi_service_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -786,7 +982,7 @@ func (x *BirthDateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BirthDateRequest.ProtoReflect.Descriptor instead. func (*BirthDateRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{12} + return file_silvermobi_service_proto_rawDescGZIP(), []int{16} } func (x *BirthDateRequest) GetBirthdate() *timestamp.Timestamp { @@ -807,7 +1003,7 @@ type BirthDateResponse struct { func (x *BirthDateResponse) Reset() { *x = BirthDateResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[13] + mi := &file_silvermobi_service_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -820,7 +1016,7 @@ func (x *BirthDateResponse) String() string { func (*BirthDateResponse) ProtoMessage() {} func (x *BirthDateResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[13] + mi := &file_silvermobi_service_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -833,7 +1029,7 @@ func (x *BirthDateResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BirthDateResponse.ProtoReflect.Descriptor instead. func (*BirthDateResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{13} + return file_silvermobi_service_proto_rawDescGZIP(), []int{17} } func (x *BirthDateResponse) GetOk() bool { @@ -855,7 +1051,7 @@ type KeyValueRequest struct { func (x *KeyValueRequest) Reset() { *x = KeyValueRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[14] + mi := &file_silvermobi_service_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -868,7 +1064,7 @@ func (x *KeyValueRequest) String() string { func (*KeyValueRequest) ProtoMessage() {} func (x *KeyValueRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[14] + mi := &file_silvermobi_service_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -881,7 +1077,7 @@ func (x *KeyValueRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyValueRequest.ProtoReflect.Descriptor instead. func (*KeyValueRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{14} + return file_silvermobi_service_proto_rawDescGZIP(), []int{18} } func (x *KeyValueRequest) GetKey() string { @@ -909,7 +1105,7 @@ type KeyValueResponse struct { func (x *KeyValueResponse) Reset() { *x = KeyValueResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[15] + mi := &file_silvermobi_service_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -922,7 +1118,7 @@ func (x *KeyValueResponse) String() string { func (*KeyValueResponse) ProtoMessage() {} func (x *KeyValueResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[15] + mi := &file_silvermobi_service_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -935,7 +1131,7 @@ func (x *KeyValueResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyValueResponse.ProtoReflect.Descriptor instead. func (*KeyValueResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{15} + return file_silvermobi_service_proto_rawDescGZIP(), []int{19} } func (x *KeyValueResponse) GetOk() bool { @@ -956,7 +1152,7 @@ type KeyRequest struct { func (x *KeyRequest) Reset() { *x = KeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[16] + mi := &file_silvermobi_service_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -969,7 +1165,7 @@ func (x *KeyRequest) String() string { func (*KeyRequest) ProtoMessage() {} func (x *KeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[16] + mi := &file_silvermobi_service_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -982,7 +1178,7 @@ func (x *KeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyRequest.ProtoReflect.Descriptor instead. func (*KeyRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{16} + return file_silvermobi_service_proto_rawDescGZIP(), []int{20} } func (x *KeyRequest) GetKey() string { @@ -1003,7 +1199,7 @@ type ValueResponse struct { func (x *ValueResponse) Reset() { *x = ValueResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[17] + mi := &file_silvermobi_service_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1016,7 +1212,7 @@ func (x *ValueResponse) String() string { func (*ValueResponse) ProtoMessage() {} func (x *ValueResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[17] + mi := &file_silvermobi_service_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1029,7 +1225,7 @@ func (x *ValueResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ValueResponse.ProtoReflect.Descriptor instead. func (*ValueResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{17} + return file_silvermobi_service_proto_rawDescGZIP(), []int{21} } func (x *ValueResponse) GetValue() string { @@ -1048,7 +1244,7 @@ type ValidationRequest struct { func (x *ValidationRequest) Reset() { *x = ValidationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[18] + mi := &file_silvermobi_service_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1061,7 +1257,7 @@ func (x *ValidationRequest) String() string { func (*ValidationRequest) ProtoMessage() {} func (x *ValidationRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[18] + mi := &file_silvermobi_service_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1074,7 +1270,7 @@ func (x *ValidationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidationRequest.ProtoReflect.Descriptor instead. func (*ValidationRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{18} + return file_silvermobi_service_proto_rawDescGZIP(), []int{22} } type ValidationResponse struct { @@ -1090,7 +1286,7 @@ type ValidationResponse struct { func (x *ValidationResponse) Reset() { *x = ValidationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[19] + mi := &file_silvermobi_service_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1103,7 +1299,7 @@ func (x *ValidationResponse) String() string { func (*ValidationResponse) ProtoMessage() {} func (x *ValidationResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[19] + mi := &file_silvermobi_service_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1116,7 +1312,7 @@ func (x *ValidationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidationResponse.ProtoReflect.Descriptor instead. func (*ValidationResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{19} + return file_silvermobi_service_proto_rawDescGZIP(), []int{23} } func (x *ValidationResponse) GetPhone() bool { @@ -1152,7 +1348,7 @@ type AccountTypeRequest struct { func (x *AccountTypeRequest) Reset() { *x = AccountTypeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[20] + mi := &file_silvermobi_service_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1165,7 +1361,7 @@ func (x *AccountTypeRequest) String() string { func (*AccountTypeRequest) ProtoMessage() {} func (x *AccountTypeRequest) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[20] + mi := &file_silvermobi_service_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1178,7 +1374,7 @@ func (x *AccountTypeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountTypeRequest.ProtoReflect.Descriptor instead. func (*AccountTypeRequest) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{20} + return file_silvermobi_service_proto_rawDescGZIP(), []int{24} } func (x *AccountTypeRequest) GetRequest() bool { @@ -1207,7 +1403,7 @@ type AccountTypeResponse struct { func (x *AccountTypeResponse) Reset() { *x = AccountTypeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_silvermobi_service_proto_msgTypes[21] + mi := &file_silvermobi_service_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1220,7 +1416,7 @@ func (x *AccountTypeResponse) String() string { func (*AccountTypeResponse) ProtoMessage() {} func (x *AccountTypeResponse) ProtoReflect() protoreflect.Message { - mi := &file_silvermobi_service_proto_msgTypes[21] + mi := &file_silvermobi_service_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1233,7 +1429,7 @@ func (x *AccountTypeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AccountTypeResponse.ProtoReflect.Descriptor instead. func (*AccountTypeResponse) Descriptor() ([]byte, []int) { - return file_silvermobi_service_proto_rawDescGZIP(), []int{21} + return file_silvermobi_service_proto_rawDescGZIP(), []int{25} } func (x *AccountTypeResponse) GetOk() bool { @@ -1250,165 +1446,851 @@ func (x *AccountTypeResponse) GetType() AccountTypeResponse_AccountType { return AccountTypeResponse_PASSENGER } +type GeoAutocompleteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Text string `protobuf:"bytes,60,opt,name=text,proto3" json:"text,omitempty"` + Lat float64 `protobuf:"fixed64,61,opt,name=lat,proto3" json:"lat,omitempty"` + Lon float64 `protobuf:"fixed64,62,opt,name=lon,proto3" json:"lon,omitempty"` +} + +func (x *GeoAutocompleteRequest) Reset() { + *x = GeoAutocompleteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GeoAutocompleteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeoAutocompleteRequest) ProtoMessage() {} + +func (x *GeoAutocompleteRequest) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[26] + 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 GeoAutocompleteRequest.ProtoReflect.Descriptor instead. +func (*GeoAutocompleteRequest) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{26} +} + +func (x *GeoAutocompleteRequest) GetText() string { + if x != nil { + return x.Text + } + return "" +} + +func (x *GeoAutocompleteRequest) GetLat() float64 { + if x != nil { + return x.Lat + } + return 0 +} + +func (x *GeoAutocompleteRequest) GetLon() float64 { + if x != nil { + return x.Lon + } + return 0 +} + +type GeoAutocompleteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to FeatureCollection: + // + // *GeoAutocompleteResponse_FeatureCollectionRaw + // *GeoAutocompleteResponse_FeatureCollectionImpl + FeatureCollection isGeoAutocompleteResponse_FeatureCollection `protobuf_oneof:"feature_collection"` +} + +func (x *GeoAutocompleteResponse) Reset() { + *x = GeoAutocompleteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GeoAutocompleteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeoAutocompleteResponse) ProtoMessage() {} + +func (x *GeoAutocompleteResponse) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[27] + 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 GeoAutocompleteResponse.ProtoReflect.Descriptor instead. +func (*GeoAutocompleteResponse) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{27} +} + +func (m *GeoAutocompleteResponse) GetFeatureCollection() isGeoAutocompleteResponse_FeatureCollection { + if m != nil { + return m.FeatureCollection + } + return nil +} + +func (x *GeoAutocompleteResponse) GetFeatureCollectionRaw() string { + if x, ok := x.GetFeatureCollection().(*GeoAutocompleteResponse_FeatureCollectionRaw); ok { + return x.FeatureCollectionRaw + } + return "" +} + +func (x *GeoAutocompleteResponse) GetFeatureCollectionImpl() *FeatureCollection { + if x, ok := x.GetFeatureCollection().(*GeoAutocompleteResponse_FeatureCollectionImpl); ok { + return x.FeatureCollectionImpl + } + return nil +} + +type isGeoAutocompleteResponse_FeatureCollection interface { + isGeoAutocompleteResponse_FeatureCollection() +} + +type GeoAutocompleteResponse_FeatureCollectionRaw struct { + FeatureCollectionRaw string `protobuf:"bytes,1,opt,name=feature_collection_raw,json=featureCollectionRaw,proto3,oneof"` +} + +type GeoAutocompleteResponse_FeatureCollectionImpl struct { + FeatureCollectionImpl *FeatureCollection `protobuf:"bytes,2,opt,name=feature_collection_impl,json=featureCollectionImpl,proto3,oneof"` +} + +func (*GeoAutocompleteResponse_FeatureCollectionRaw) isGeoAutocompleteResponse_FeatureCollection() {} + +func (*GeoAutocompleteResponse_FeatureCollectionImpl) isGeoAutocompleteResponse_FeatureCollection() {} + +type GeoRouteRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Locations: + // + // *GeoRouteRequest_LocationsRaw + // *GeoRouteRequest_LocationsImpl + Locations isGeoRouteRequest_Locations `protobuf_oneof:"locations"` +} + +func (x *GeoRouteRequest) Reset() { + *x = GeoRouteRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GeoRouteRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeoRouteRequest) ProtoMessage() {} + +func (x *GeoRouteRequest) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[28] + 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 GeoRouteRequest.ProtoReflect.Descriptor instead. +func (*GeoRouteRequest) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{28} +} + +func (m *GeoRouteRequest) GetLocations() isGeoRouteRequest_Locations { + if m != nil { + return m.Locations + } + return nil +} + +func (x *GeoRouteRequest) GetLocationsRaw() string { + if x, ok := x.GetLocations().(*GeoRouteRequest_LocationsRaw); ok { + return x.LocationsRaw + } + return "" +} + +func (x *GeoRouteRequest) GetLocationsImpl() *FeatureCollection { + if x, ok := x.GetLocations().(*GeoRouteRequest_LocationsImpl); ok { + return x.LocationsImpl + } + return nil +} + +type isGeoRouteRequest_Locations interface { + isGeoRouteRequest_Locations() +} + +type GeoRouteRequest_LocationsRaw struct { + LocationsRaw string `protobuf:"bytes,1,opt,name=locations_raw,json=locationsRaw,proto3,oneof"` +} + +type GeoRouteRequest_LocationsImpl struct { + LocationsImpl *FeatureCollection `protobuf:"bytes,2,opt,name=locations_impl,json=locationsImpl,proto3,oneof"` +} + +func (*GeoRouteRequest_LocationsRaw) isGeoRouteRequest_Locations() {} + +func (*GeoRouteRequest_LocationsImpl) isGeoRouteRequest_Locations() {} + +type GeoRouteResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Polyline string `protobuf:"bytes,1,opt,name=polyline,proto3" json:"polyline,omitempty"` +} + +func (x *GeoRouteResponse) Reset() { + *x = GeoRouteResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GeoRouteResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeoRouteResponse) ProtoMessage() {} + +func (x *GeoRouteResponse) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[29] + 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 GeoRouteResponse.ProtoReflect.Descriptor instead. +func (*GeoRouteResponse) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{29} +} + +func (x *GeoRouteResponse) GetPolyline() string { + if x != nil { + return x.Polyline + } + return "" +} + +type GeoRouteWithReturnRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Locations: + // + // *GeoRouteWithReturnRequest_LocationsRaw + // *GeoRouteWithReturnRequest_LocationsImpl + Locations isGeoRouteWithReturnRequest_Locations `protobuf_oneof:"locations"` +} + +func (x *GeoRouteWithReturnRequest) Reset() { + *x = GeoRouteWithReturnRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GeoRouteWithReturnRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeoRouteWithReturnRequest) ProtoMessage() {} + +func (x *GeoRouteWithReturnRequest) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[30] + 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 GeoRouteWithReturnRequest.ProtoReflect.Descriptor instead. +func (*GeoRouteWithReturnRequest) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{30} +} + +func (m *GeoRouteWithReturnRequest) GetLocations() isGeoRouteWithReturnRequest_Locations { + if m != nil { + return m.Locations + } + return nil +} + +func (x *GeoRouteWithReturnRequest) GetLocationsRaw() string { + if x, ok := x.GetLocations().(*GeoRouteWithReturnRequest_LocationsRaw); ok { + return x.LocationsRaw + } + return "" +} + +func (x *GeoRouteWithReturnRequest) GetLocationsImpl() *FeatureCollection { + if x, ok := x.GetLocations().(*GeoRouteWithReturnRequest_LocationsImpl); ok { + return x.LocationsImpl + } + return nil +} + +type isGeoRouteWithReturnRequest_Locations interface { + isGeoRouteWithReturnRequest_Locations() +} + +type GeoRouteWithReturnRequest_LocationsRaw struct { + LocationsRaw string `protobuf:"bytes,1,opt,name=locations_raw,json=locationsRaw,proto3,oneof"` +} + +type GeoRouteWithReturnRequest_LocationsImpl struct { + LocationsImpl *FeatureCollection `protobuf:"bytes,2,opt,name=locations_impl,json=locationsImpl,proto3,oneof"` +} + +func (*GeoRouteWithReturnRequest_LocationsRaw) isGeoRouteWithReturnRequest_Locations() {} + +func (*GeoRouteWithReturnRequest_LocationsImpl) isGeoRouteWithReturnRequest_Locations() {} + +type GeoRouteWithReturnResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Polyline string `protobuf:"bytes,1,opt,name=polyline,proto3" json:"polyline,omitempty"` + ReturnPolyline string `protobuf:"bytes,2,opt,name=return_polyline,json=returnPolyline,proto3" json:"return_polyline,omitempty"` +} + +func (x *GeoRouteWithReturnResponse) Reset() { + *x = GeoRouteWithReturnResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GeoRouteWithReturnResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeoRouteWithReturnResponse) ProtoMessage() {} + +func (x *GeoRouteWithReturnResponse) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[31] + 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 GeoRouteWithReturnResponse.ProtoReflect.Descriptor instead. +func (*GeoRouteWithReturnResponse) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{31} +} + +func (x *GeoRouteWithReturnResponse) GetPolyline() string { + if x != nil { + return x.Polyline + } + return "" +} + +func (x *GeoRouteWithReturnResponse) GetReturnPolyline() string { + if x != nil { + return x.ReturnPolyline + } + return "" +} + +type FeatureCollection struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Bbox []float64 `protobuf:"fixed64,2,rep,packed,name=bbox,proto3" json:"bbox,omitempty"` + Features []*Feature_ `protobuf:"bytes,3,rep,name=features,proto3" json:"features,omitempty"` +} + +func (x *FeatureCollection) Reset() { + *x = FeatureCollection{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeatureCollection) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeatureCollection) ProtoMessage() {} + +func (x *FeatureCollection) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_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 mi.MessageOf(x) +} + +// Deprecated: Use FeatureCollection.ProtoReflect.Descriptor instead. +func (*FeatureCollection) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{32} +} + +func (x *FeatureCollection) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *FeatureCollection) GetBbox() []float64 { + if x != nil { + return x.Bbox + } + return nil +} + +func (x *FeatureCollection) GetFeatures() []*Feature_ { + if x != nil { + return x.Features + } + return nil +} + +type Feature_ struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Bbox []float64 `protobuf:"fixed64,3,rep,packed,name=bbox,proto3" json:"bbox,omitempty"` + Geometry *Geometry `protobuf:"bytes,4,opt,name=geometry,proto3" json:"geometry,omitempty"` + Properties *_struct.Struct `protobuf:"bytes,5,opt,name=properties,proto3" json:"properties,omitempty"` +} + +func (x *Feature_) Reset() { + *x = Feature_{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Feature_) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Feature_) ProtoMessage() {} + +func (x *Feature_) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[33] + 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 Feature_.ProtoReflect.Descriptor instead. +func (*Feature_) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{33} +} + +func (x *Feature_) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Feature_) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Feature_) GetBbox() []float64 { + if x != nil { + return x.Bbox + } + return nil +} + +func (x *Feature_) GetGeometry() *Geometry { + if x != nil { + return x.Geometry + } + return nil +} + +func (x *Feature_) GetProperties() *_struct.Struct { + if x != nil { + return x.Properties + } + return nil +} + +type Geometry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Geometry) Reset() { + *x = Geometry{} + if protoimpl.UnsafeEnabled { + mi := &file_silvermobi_service_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Geometry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Geometry) ProtoMessage() {} + +func (x *Geometry) ProtoReflect() protoreflect.Message { + mi := &file_silvermobi_service_proto_msgTypes[34] + 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 Geometry.ProtoReflect.Descriptor instead. +func (*Geometry) Descriptor() ([]byte, []int) { + return file_silvermobi_service_proto_rawDescGZIP(), []int{34} +} + var File_silvermobi_service_proto protoreflect.FileDescriptor var file_silvermobi_service_proto_rawDesc = []byte{ 0x0a, 0x18, 0x73, 0x69, 0x6c, 0x76, 0x65, 0x72, 0x6d, 0x6f, 0x62, 0x69, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 0x4a, 0x0a, 0x10, 0x41, - 0x75, 0x74, 0x68, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x29, 0x0a, 0x11, 0x41, 0x75, 0x74, 0x68, 0x4c, - 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x13, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, - 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x14, 0x41, - 0x75, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x50, 0x0a, 0x14, 0x46, 0x6f, 0x72, - 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x54, 0x0a, 0x15, 0x46, - 0x6f, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, - 0x65, 0x22, 0x49, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, - 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x34, 0x0a, 0x16, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, - 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x28, - 0x0a, 0x16, 0x53, 0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x6a, 0x0a, 0x18, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, - 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x19, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x68, - 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, - 0x6b, 0x22, 0x4c, 0x0a, 0x10, 0x42, 0x69, 0x72, 0x74, 0x68, 0x44, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, - 0x74, 0x65, 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, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x22, - 0x23, 0x0a, 0x11, 0x42, 0x69, 0x72, 0x74, 0x68, 0x44, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x39, 0x0a, 0x0f, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, - 0x22, 0x0a, 0x10, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x51, 0x0a, 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x22, 0x55, 0x0a, 0x14, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x70, 0x6c, 0x61, 0x74, 0x66, + 0x6f, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x22, 0x2f, 0x0a, 0x15, 0x46, 0x69, 0x72, + 0x65, 0x62, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x4a, 0x0a, 0x10, 0x41, 0x75, + 0x74, 0x68, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x29, 0x0a, 0x11, 0x41, 0x75, 0x74, 0x68, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x13, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x66, + 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, + 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, + 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x2c, 0x0a, 0x14, 0x41, 0x75, + 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x50, 0x0a, 0x14, 0x46, 0x6f, 0x72, 0x67, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x54, 0x0a, 0x15, 0x46, 0x6f, + 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1f, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x64, 0x65, + 0x22, 0x49, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, + 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, + 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x34, 0x0a, 0x16, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x3a, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x28, 0x0a, + 0x16, 0x53, 0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x22, 0x6a, 0x0a, 0x18, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x68, 0x6f, 0x6e, 0x65, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x64, 0x65, 0x22, 0x2b, 0x0a, 0x19, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x68, 0x6f, + 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, + 0x22, 0x4c, 0x0a, 0x10, 0x42, 0x69, 0x72, 0x74, 0x68, 0x44, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, + 0x65, 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, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x22, 0x23, + 0x0a, 0x11, 0x42, 0x69, 0x72, 0x74, 0x68, 0x44, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x02, 0x6f, 0x6b, 0x22, 0x1e, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x22, 0x25, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x5c, 0x0a, 0x12, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x62, - 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, - 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xac, 0x01, - 0x0a, 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x1f, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x48, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x22, 0x28, 0x0a, - 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, - 0x50, 0x41, 0x53, 0x53, 0x45, 0x4e, 0x47, 0x45, 0x52, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, - 0x52, 0x49, 0x56, 0x45, 0x52, 0x10, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x93, 0x01, 0x0a, - 0x13, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x02, 0x6f, 0x6b, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x22, - 0x28, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, - 0x0a, 0x09, 0x50, 0x41, 0x53, 0x53, 0x45, 0x4e, 0x47, 0x45, 0x52, 0x10, 0x00, 0x12, 0x0a, 0x0a, - 0x06, 0x44, 0x52, 0x49, 0x56, 0x45, 0x52, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x32, 0xf6, 0x05, 0x0a, 0x0e, 0x53, 0x69, 0x6c, 0x76, 0x65, 0x72, 0x6d, 0x6f, 0x62, - 0x69, 0x47, 0x52, 0x50, 0x43, 0x12, 0x34, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x4c, 0x6f, 0x67, - 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0c, 0x41, - 0x75, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x41, 0x75, - 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x15, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x46, 0x6f, - 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x15, 0x2e, 0x46, 0x6f, - 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, - 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x53, 0x65, - 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x56, 0x65, + 0x02, 0x6f, 0x6b, 0x22, 0x39, 0x0a, 0x0f, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x22, + 0x0a, 0x10, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, + 0x6f, 0x6b, 0x22, 0x1e, 0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x22, 0x25, 0x0a, 0x0d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x13, 0x0a, 0x11, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5c, + 0x0a, 0x12, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, + 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x62, + 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xac, 0x01, 0x0a, + 0x12, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x38, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1f, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x48, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x22, 0x28, 0x0a, 0x0b, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x50, + 0x41, 0x53, 0x53, 0x45, 0x4e, 0x47, 0x45, 0x52, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x52, + 0x49, 0x56, 0x45, 0x52, 0x10, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x13, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x02, 0x6f, 0x6b, 0x12, 0x39, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x20, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x22, 0x28, + 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, + 0x09, 0x50, 0x41, 0x53, 0x53, 0x45, 0x4e, 0x47, 0x45, 0x52, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, + 0x44, 0x52, 0x49, 0x56, 0x45, 0x52, 0x10, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x22, 0x50, 0x0a, 0x16, 0x47, 0x65, 0x6f, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, + 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x65, 0x78, 0x74, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x6c, 0x61, 0x74, 0x18, 0x3d, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x61, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x6e, 0x18, 0x3e, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, + 0x6c, 0x6f, 0x6e, 0x22, 0xb5, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x6f, 0x41, 0x75, 0x74, 0x6f, 0x63, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x36, 0x0a, 0x16, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x14, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x77, 0x12, 0x4c, 0x0a, 0x17, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6d, + 0x70, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x15, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x6d, 0x70, 0x6c, 0x42, 0x14, 0x0a, 0x12, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x0f, + 0x47, 0x65, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x25, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x61, 0x77, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x61, 0x77, 0x12, 0x3b, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x5f, 0x69, 0x6d, 0x70, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, + 0x6d, 0x70, 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x2e, 0x0a, 0x10, 0x47, 0x65, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, + 0x22, 0x8c, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, 0x74, + 0x68, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, + 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x61, 0x77, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x61, 0x77, 0x12, 0x3b, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x5f, 0x69, 0x6d, 0x70, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x49, 0x6d, + 0x70, 0x6c, 0x42, 0x0b, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, + 0x61, 0x0a, 0x1a, 0x47, 0x65, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x52, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x70, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x70, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x79, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x50, 0x6f, 0x6c, 0x79, 0x6c, 0x69, + 0x6e, 0x65, 0x22, 0x62, 0x0a, 0x11, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6c, + 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, + 0x62, 0x6f, 0x78, 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x52, 0x04, 0x62, 0x62, 0x6f, 0x78, 0x12, + 0x25, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x09, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x52, 0x08, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa2, 0x01, 0x0a, 0x08, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x5f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x62, 0x6f, 0x78, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x01, 0x52, 0x04, 0x62, 0x62, 0x6f, 0x78, 0x12, 0x25, 0x0a, 0x08, 0x67, + 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x47, 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x52, 0x08, 0x67, 0x65, 0x6f, 0x6d, 0x65, 0x74, + 0x72, 0x79, 0x12, 0x37, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x22, 0x0a, 0x0a, 0x08, 0x47, + 0x65, 0x6f, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x32, 0xc6, 0x08, 0x0a, 0x0e, 0x53, 0x69, 0x6c, 0x76, + 0x65, 0x72, 0x6d, 0x6f, 0x62, 0x69, 0x47, 0x52, 0x50, 0x43, 0x12, 0x34, 0x0a, 0x09, 0x41, 0x75, + 0x74, 0x68, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x11, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4c, 0x6f, + 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x41, 0x75, 0x74, + 0x68, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x3d, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x12, 0x14, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x40, 0x0a, 0x0d, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x15, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x12, 0x16, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x50, 0x68, 0x6f, + 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x68, + 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x11, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x12, 0x19, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x50, - 0x68, 0x6f, 0x6e, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x42, 0x69, 0x72, 0x74, 0x68, - 0x44, 0x61, 0x74, 0x65, 0x12, 0x11, 0x2e, 0x42, 0x69, 0x72, 0x74, 0x68, 0x44, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x42, 0x69, 0x72, 0x74, 0x68, 0x44, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, - 0x0e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x13, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, - 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x0b, 0x53, - 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x2e, 0x4b, 0x65, 0x79, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x4b, - 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x2c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x0b, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x3a, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x12, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x34, 0x5a, 0x32, 0x67, - 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, - 0x70, 0x67, 0x6f, 0x2d, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x73, 0x69, 0x6c, 0x76, 0x65, 0x72, 0x6d, - 0x6f, 0x62, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0c, 0x53, 0x65, 0x74, + 0x42, 0x69, 0x72, 0x74, 0x68, 0x44, 0x61, 0x74, 0x65, 0x12, 0x11, 0x2e, 0x42, 0x69, 0x72, 0x74, + 0x68, 0x44, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x42, + 0x69, 0x72, 0x74, 0x68, 0x44, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x3d, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x13, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x34, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x10, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x11, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2c, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0b, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x46, 0x0a, 0x0f, 0x47, 0x65, 0x6f, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x47, 0x65, 0x6f, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x47, + 0x65, 0x6f, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x08, 0x47, 0x65, 0x6f, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x12, 0x10, 0x2e, 0x47, 0x65, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x47, 0x65, 0x6f, 0x52, 0x6f, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x12, 0x47, + 0x65, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x74, 0x75, 0x72, + 0x6e, 0x12, 0x1a, 0x2e, 0x47, 0x65, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x47, 0x65, 0x6f, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x52, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x10, + 0x50, 0x75, 0x74, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x15, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x46, 0x69, 0x72, 0x65, 0x62, 0x61, + 0x73, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x3d, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x13, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, + 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x73, 0x69, + 0x6c, 0x76, 0x65, 0x72, 0x6d, 0x6f, 0x62, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x61, 0x70, 0x69, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1424,67 +2306,97 @@ func file_silvermobi_service_proto_rawDescGZIP() []byte { } var file_silvermobi_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_silvermobi_service_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_silvermobi_service_proto_msgTypes = make([]protoimpl.MessageInfo, 35) var file_silvermobi_service_proto_goTypes = []interface{}{ (AccountTypeRequest_AccountType)(0), // 0: AccountTypeRequest.AccountType (AccountTypeResponse_AccountType)(0), // 1: AccountTypeResponse.AccountType - (*AuthLoginRequest)(nil), // 2: AuthLoginRequest - (*AuthLoginResponse)(nil), // 3: AuthLoginResponse - (*AuthRegisterRequest)(nil), // 4: AuthRegisterRequest - (*AuthRegisterResponse)(nil), // 5: AuthRegisterResponse - (*ForgetAccountRequest)(nil), // 6: ForgetAccountRequest - (*ForgetAccountResponse)(nil), // 7: ForgetAccountResponse - (*UpdatePasswordRequest)(nil), // 8: UpdatePasswordRequest - (*UpdatePasswordResponse)(nil), // 9: UpdatePasswordResponse - (*SetPhoneNumberRequest)(nil), // 10: SetPhoneNumberRequest - (*SetPhoneNumberResponse)(nil), // 11: SetPhoneNumberResponse - (*VerifyPhoneNumberRequest)(nil), // 12: VerifyPhoneNumberRequest - (*VerifyPhoneNumberResponse)(nil), // 13: VerifyPhoneNumberResponse - (*BirthDateRequest)(nil), // 14: BirthDateRequest - (*BirthDateResponse)(nil), // 15: BirthDateResponse - (*KeyValueRequest)(nil), // 16: KeyValueRequest - (*KeyValueResponse)(nil), // 17: KeyValueResponse - (*KeyRequest)(nil), // 18: KeyRequest - (*ValueResponse)(nil), // 19: ValueResponse - (*ValidationRequest)(nil), // 20: ValidationRequest - (*ValidationResponse)(nil), // 21: ValidationResponse - (*AccountTypeRequest)(nil), // 22: AccountTypeRequest - (*AccountTypeResponse)(nil), // 23: AccountTypeResponse - (*timestamp.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*AccountInfoRequest)(nil), // 2: AccountInfoRequest + (*AccountInfoResponse)(nil), // 3: AccountInfoResponse + (*FirebaseTokenRequest)(nil), // 4: FirebaseTokenRequest + (*FirebaseTokenResponse)(nil), // 5: FirebaseTokenResponse + (*AuthLoginRequest)(nil), // 6: AuthLoginRequest + (*AuthLoginResponse)(nil), // 7: AuthLoginResponse + (*AuthRegisterRequest)(nil), // 8: AuthRegisterRequest + (*AuthRegisterResponse)(nil), // 9: AuthRegisterResponse + (*ForgetAccountRequest)(nil), // 10: ForgetAccountRequest + (*ForgetAccountResponse)(nil), // 11: ForgetAccountResponse + (*UpdatePasswordRequest)(nil), // 12: UpdatePasswordRequest + (*UpdatePasswordResponse)(nil), // 13: UpdatePasswordResponse + (*SetPhoneNumberRequest)(nil), // 14: SetPhoneNumberRequest + (*SetPhoneNumberResponse)(nil), // 15: SetPhoneNumberResponse + (*VerifyPhoneNumberRequest)(nil), // 16: VerifyPhoneNumberRequest + (*VerifyPhoneNumberResponse)(nil), // 17: VerifyPhoneNumberResponse + (*BirthDateRequest)(nil), // 18: BirthDateRequest + (*BirthDateResponse)(nil), // 19: BirthDateResponse + (*KeyValueRequest)(nil), // 20: KeyValueRequest + (*KeyValueResponse)(nil), // 21: KeyValueResponse + (*KeyRequest)(nil), // 22: KeyRequest + (*ValueResponse)(nil), // 23: ValueResponse + (*ValidationRequest)(nil), // 24: ValidationRequest + (*ValidationResponse)(nil), // 25: ValidationResponse + (*AccountTypeRequest)(nil), // 26: AccountTypeRequest + (*AccountTypeResponse)(nil), // 27: AccountTypeResponse + (*GeoAutocompleteRequest)(nil), // 28: GeoAutocompleteRequest + (*GeoAutocompleteResponse)(nil), // 29: GeoAutocompleteResponse + (*GeoRouteRequest)(nil), // 30: GeoRouteRequest + (*GeoRouteResponse)(nil), // 31: GeoRouteResponse + (*GeoRouteWithReturnRequest)(nil), // 32: GeoRouteWithReturnRequest + (*GeoRouteWithReturnResponse)(nil), // 33: GeoRouteWithReturnResponse + (*FeatureCollection)(nil), // 34: FeatureCollection + (*Feature_)(nil), // 35: Feature_ + (*Geometry)(nil), // 36: Geometry + (*timestamp.Timestamp)(nil), // 37: google.protobuf.Timestamp + (*_struct.Struct)(nil), // 38: google.protobuf.Struct } var file_silvermobi_service_proto_depIdxs = []int32{ - 24, // 0: BirthDateRequest.birthdate:type_name -> google.protobuf.Timestamp + 37, // 0: BirthDateRequest.birthdate:type_name -> google.protobuf.Timestamp 0, // 1: AccountTypeRequest.type:type_name -> AccountTypeRequest.AccountType 1, // 2: AccountTypeResponse.type:type_name -> AccountTypeResponse.AccountType - 2, // 3: SilvermobiGRPC.AuthLogin:input_type -> AuthLoginRequest - 4, // 4: SilvermobiGRPC.AuthRegister:input_type -> AuthRegisterRequest - 6, // 5: SilvermobiGRPC.ForgetAccount:input_type -> ForgetAccountRequest - 8, // 6: SilvermobiGRPC.UpdatePassword:input_type -> UpdatePasswordRequest - 10, // 7: SilvermobiGRPC.SetPhoneNumber:input_type -> SetPhoneNumberRequest - 12, // 8: SilvermobiGRPC.VerifyPhoneNumber:input_type -> VerifyPhoneNumberRequest - 14, // 9: SilvermobiGRPC.SetBirthDate:input_type -> BirthDateRequest - 22, // 10: SilvermobiGRPC.SetAccountType:input_type -> AccountTypeRequest - 22, // 11: SilvermobiGRPC.GetAccountType:input_type -> AccountTypeRequest - 16, // 12: SilvermobiGRPC.SetKeyValue:input_type -> KeyValueRequest - 18, // 13: SilvermobiGRPC.GetKeyValue:input_type -> KeyRequest - 20, // 14: SilvermobiGRPC.GetValidation:input_type -> ValidationRequest - 3, // 15: SilvermobiGRPC.AuthLogin:output_type -> AuthLoginResponse - 5, // 16: SilvermobiGRPC.AuthRegister:output_type -> AuthRegisterResponse - 7, // 17: SilvermobiGRPC.ForgetAccount:output_type -> ForgetAccountResponse - 9, // 18: SilvermobiGRPC.UpdatePassword:output_type -> UpdatePasswordResponse - 11, // 19: SilvermobiGRPC.SetPhoneNumber:output_type -> SetPhoneNumberResponse - 13, // 20: SilvermobiGRPC.VerifyPhoneNumber:output_type -> VerifyPhoneNumberResponse - 15, // 21: SilvermobiGRPC.SetBirthDate:output_type -> BirthDateResponse - 23, // 22: SilvermobiGRPC.SetAccountType:output_type -> AccountTypeResponse - 23, // 23: SilvermobiGRPC.GetAccountType:output_type -> AccountTypeResponse - 17, // 24: SilvermobiGRPC.SetKeyValue:output_type -> KeyValueResponse - 19, // 25: SilvermobiGRPC.GetKeyValue:output_type -> ValueResponse - 21, // 26: SilvermobiGRPC.GetValidation:output_type -> ValidationResponse - 15, // [15:27] is the sub-list for method output_type - 3, // [3:15] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 34, // 3: GeoAutocompleteResponse.feature_collection_impl:type_name -> FeatureCollection + 34, // 4: GeoRouteRequest.locations_impl:type_name -> FeatureCollection + 34, // 5: GeoRouteWithReturnRequest.locations_impl:type_name -> FeatureCollection + 35, // 6: FeatureCollection.features:type_name -> Feature_ + 36, // 7: Feature_.geometry:type_name -> Geometry + 38, // 8: Feature_.properties:type_name -> google.protobuf.Struct + 6, // 9: SilvermobiGRPC.AuthLogin:input_type -> AuthLoginRequest + 8, // 10: SilvermobiGRPC.AuthRegister:input_type -> AuthRegisterRequest + 10, // 11: SilvermobiGRPC.ForgetAccount:input_type -> ForgetAccountRequest + 12, // 12: SilvermobiGRPC.UpdatePassword:input_type -> UpdatePasswordRequest + 14, // 13: SilvermobiGRPC.SetPhoneNumber:input_type -> SetPhoneNumberRequest + 16, // 14: SilvermobiGRPC.VerifyPhoneNumber:input_type -> VerifyPhoneNumberRequest + 18, // 15: SilvermobiGRPC.SetBirthDate:input_type -> BirthDateRequest + 26, // 16: SilvermobiGRPC.SetAccountType:input_type -> AccountTypeRequest + 26, // 17: SilvermobiGRPC.GetAccountType:input_type -> AccountTypeRequest + 20, // 18: SilvermobiGRPC.SetKeyValue:input_type -> KeyValueRequest + 22, // 19: SilvermobiGRPC.GetKeyValue:input_type -> KeyRequest + 24, // 20: SilvermobiGRPC.GetValidation:input_type -> ValidationRequest + 28, // 21: SilvermobiGRPC.GeoAutocomplete:input_type -> GeoAutocompleteRequest + 30, // 22: SilvermobiGRPC.GeoRoute:input_type -> GeoRouteRequest + 32, // 23: SilvermobiGRPC.GeoRouteWithReturn:input_type -> GeoRouteWithReturnRequest + 4, // 24: SilvermobiGRPC.PutFirebaseToken:input_type -> FirebaseTokenRequest + 2, // 25: SilvermobiGRPC.GetAccountInfo:input_type -> AccountInfoRequest + 7, // 26: SilvermobiGRPC.AuthLogin:output_type -> AuthLoginResponse + 9, // 27: SilvermobiGRPC.AuthRegister:output_type -> AuthRegisterResponse + 11, // 28: SilvermobiGRPC.ForgetAccount:output_type -> ForgetAccountResponse + 13, // 29: SilvermobiGRPC.UpdatePassword:output_type -> UpdatePasswordResponse + 15, // 30: SilvermobiGRPC.SetPhoneNumber:output_type -> SetPhoneNumberResponse + 17, // 31: SilvermobiGRPC.VerifyPhoneNumber:output_type -> VerifyPhoneNumberResponse + 19, // 32: SilvermobiGRPC.SetBirthDate:output_type -> BirthDateResponse + 27, // 33: SilvermobiGRPC.SetAccountType:output_type -> AccountTypeResponse + 27, // 34: SilvermobiGRPC.GetAccountType:output_type -> AccountTypeResponse + 21, // 35: SilvermobiGRPC.SetKeyValue:output_type -> KeyValueResponse + 23, // 36: SilvermobiGRPC.GetKeyValue:output_type -> ValueResponse + 25, // 37: SilvermobiGRPC.GetValidation:output_type -> ValidationResponse + 29, // 38: SilvermobiGRPC.GeoAutocomplete:output_type -> GeoAutocompleteResponse + 31, // 39: SilvermobiGRPC.GeoRoute:output_type -> GeoRouteResponse + 33, // 40: SilvermobiGRPC.GeoRouteWithReturn:output_type -> GeoRouteWithReturnResponse + 5, // 41: SilvermobiGRPC.PutFirebaseToken:output_type -> FirebaseTokenResponse + 3, // 42: SilvermobiGRPC.GetAccountInfo:output_type -> AccountInfoResponse + 26, // [26:43] is the sub-list for method output_type + 9, // [9:26] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_silvermobi_service_proto_init() } @@ -1494,7 +2406,7 @@ func file_silvermobi_service_proto_init() { } if !protoimpl.UnsafeEnabled { file_silvermobi_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthLoginRequest); i { + switch v := v.(*AccountInfoRequest); i { case 0: return &v.state case 1: @@ -1506,7 +2418,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthLoginResponse); i { + switch v := v.(*AccountInfoResponse); i { case 0: return &v.state case 1: @@ -1518,7 +2430,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthRegisterRequest); i { + switch v := v.(*FirebaseTokenRequest); i { case 0: return &v.state case 1: @@ -1530,7 +2442,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthRegisterResponse); i { + switch v := v.(*FirebaseTokenResponse); i { case 0: return &v.state case 1: @@ -1542,7 +2454,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ForgetAccountRequest); i { + switch v := v.(*AuthLoginRequest); i { case 0: return &v.state case 1: @@ -1554,7 +2466,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ForgetAccountResponse); i { + switch v := v.(*AuthLoginResponse); i { case 0: return &v.state case 1: @@ -1566,7 +2478,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePasswordRequest); i { + switch v := v.(*AuthRegisterRequest); i { case 0: return &v.state case 1: @@ -1578,7 +2490,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdatePasswordResponse); i { + switch v := v.(*AuthRegisterResponse); i { case 0: return &v.state case 1: @@ -1590,7 +2502,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetPhoneNumberRequest); i { + switch v := v.(*ForgetAccountRequest); i { case 0: return &v.state case 1: @@ -1602,7 +2514,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetPhoneNumberResponse); i { + switch v := v.(*ForgetAccountResponse); i { case 0: return &v.state case 1: @@ -1614,7 +2526,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyPhoneNumberRequest); i { + switch v := v.(*UpdatePasswordRequest); i { case 0: return &v.state case 1: @@ -1626,7 +2538,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyPhoneNumberResponse); i { + switch v := v.(*UpdatePasswordResponse); i { case 0: return &v.state case 1: @@ -1638,7 +2550,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BirthDateRequest); i { + switch v := v.(*SetPhoneNumberRequest); i { case 0: return &v.state case 1: @@ -1650,7 +2562,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BirthDateResponse); i { + switch v := v.(*SetPhoneNumberResponse); i { case 0: return &v.state case 1: @@ -1662,7 +2574,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyValueRequest); i { + switch v := v.(*VerifyPhoneNumberRequest); i { case 0: return &v.state case 1: @@ -1674,7 +2586,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyValueResponse); i { + switch v := v.(*VerifyPhoneNumberResponse); i { case 0: return &v.state case 1: @@ -1686,7 +2598,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyRequest); i { + switch v := v.(*BirthDateRequest); i { case 0: return &v.state case 1: @@ -1698,7 +2610,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValueResponse); i { + switch v := v.(*BirthDateResponse); i { case 0: return &v.state case 1: @@ -1710,7 +2622,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidationRequest); i { + switch v := v.(*KeyValueRequest); i { case 0: return &v.state case 1: @@ -1722,7 +2634,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ValidationResponse); i { + switch v := v.(*KeyValueResponse); i { case 0: return &v.state case 1: @@ -1734,7 +2646,7 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AccountTypeRequest); i { + switch v := v.(*KeyRequest); i { case 0: return &v.state case 1: @@ -1746,6 +2658,54 @@ func file_silvermobi_service_proto_init() { } } file_silvermobi_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountTypeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AccountTypeResponse); i { case 0: return &v.state @@ -1757,16 +2717,136 @@ func file_silvermobi_service_proto_init() { return nil } } + file_silvermobi_service_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeoAutocompleteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeoAutocompleteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeoRouteRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeoRouteResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeoRouteWithReturnRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeoRouteWithReturnResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FeatureCollection); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Feature_); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_silvermobi_service_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Geometry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_silvermobi_service_proto_msgTypes[24].OneofWrappers = []interface{}{} + file_silvermobi_service_proto_msgTypes[25].OneofWrappers = []interface{}{} + file_silvermobi_service_proto_msgTypes[27].OneofWrappers = []interface{}{ + (*GeoAutocompleteResponse_FeatureCollectionRaw)(nil), + (*GeoAutocompleteResponse_FeatureCollectionImpl)(nil), + } + file_silvermobi_service_proto_msgTypes[28].OneofWrappers = []interface{}{ + (*GeoRouteRequest_LocationsRaw)(nil), + (*GeoRouteRequest_LocationsImpl)(nil), + } + file_silvermobi_service_proto_msgTypes[30].OneofWrappers = []interface{}{ + (*GeoRouteWithReturnRequest_LocationsRaw)(nil), + (*GeoRouteWithReturnRequest_LocationsImpl)(nil), } - file_silvermobi_service_proto_msgTypes[20].OneofWrappers = []interface{}{} - file_silvermobi_service_proto_msgTypes[21].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_silvermobi_service_proto_rawDesc, NumEnums: 2, - NumMessages: 22, + NumMessages: 35, NumExtensions: 0, NumServices: 1, }, diff --git a/servers/grpcapi/proto/silvermobi-service.proto b/servers/grpcapi/proto/silvermobi-service.proto index dc325e4..0fd037b 100644 --- a/servers/grpcapi/proto/silvermobi-service.proto +++ b/servers/grpcapi/proto/silvermobi-service.proto @@ -1,5 +1,6 @@ syntax = "proto3"; import "google/protobuf/timestamp.proto"; +import "google/protobuf/struct.proto"; option go_package = "git.coopgo.io/coopgo-apps/silvermobi/grpcapi/proto"; service SilvermobiGRPC { @@ -16,10 +17,28 @@ service SilvermobiGRPC { rpc SetKeyValue(KeyValueRequest) returns (KeyValueResponse) {} rpc GetKeyValue(KeyRequest) returns (ValueResponse) {} rpc GetValidation(ValidationRequest) returns (ValidationResponse) {} - - + rpc GeoAutocomplete( GeoAutocompleteRequest) returns (GeoAutocompleteResponse) {} + rpc GeoRoute(GeoRouteRequest) returns (GeoRouteResponse) {} + rpc GeoRouteWithReturn(GeoRouteWithReturnRequest) returns (GeoRouteWithReturnResponse) {} + rpc PutFirebaseToken(FirebaseTokenRequest) returns (FirebaseTokenResponse) {} + rpc GetAccountInfo(AccountInfoRequest) returns (AccountInfoResponse) {} } +message AccountInfoRequest { + +} +message AccountInfoResponse{ +string first_name = 1; +string last_name = 2; +} + +message FirebaseTokenRequest { + string token = 1; + string device_platform = 2; +} +message FirebaseTokenResponse { + bool result = 1; +} message AuthLoginRequest { string username = 1; string password = 2; @@ -61,20 +80,20 @@ message UpdatePasswordResponse{ } message SetPhoneNumberRequest { - string phone_number = 1; + string phone_number = 1; } message SetPhoneNumberResponse { - bool ok = 1; + bool ok = 1; } message VerifyPhoneNumberRequest { - string phone_number = 1; - string verification_code = 2; + string phone_number = 1; + string verification_code = 2; } message VerifyPhoneNumberResponse { - bool ok = 1; + bool ok = 1; } message BirthDateRequest { @@ -126,4 +145,56 @@ message AccountTypeResponse { DRIVER = 1; } optional AccountType type = 2; -} \ No newline at end of file +} + +message GeoAutocompleteRequest { + string text = 60; + double lat = 61; + double lon = 62; +} + +message GeoAutocompleteResponse { + oneof feature_collection { + string feature_collection_raw = 1; + FeatureCollection feature_collection_impl = 2; + } +} + +message GeoRouteRequest { + oneof locations { + string locations_raw = 1; + FeatureCollection locations_impl = 2; + } +} + +message GeoRouteResponse { + string polyline = 1; +} + +message GeoRouteWithReturnRequest { + oneof locations { + string locations_raw = 1; + FeatureCollection locations_impl = 2; + } +} + +message GeoRouteWithReturnResponse { + string polyline = 1; + string return_polyline = 2; +} + +message FeatureCollection { + string type = 1; + repeated double bbox = 2; + repeated Feature_ features = 3; +} + +message Feature_ { + string id = 1; + string type = 2; + repeated double bbox = 3; + Geometry geometry = 4; + google.protobuf.Struct properties = 5; +} + +message Geometry {} \ No newline at end of file diff --git a/servers/grpcapi/proto/silvermobi-service_grpc.pb.go b/servers/grpcapi/proto/silvermobi-service_grpc.pb.go index 7fdfbee..6b68c4d 100644 --- a/servers/grpcapi/proto/silvermobi-service_grpc.pb.go +++ b/servers/grpcapi/proto/silvermobi-service_grpc.pb.go @@ -19,18 +19,23 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - SilvermobiGRPC_AuthLogin_FullMethodName = "/SilvermobiGRPC/AuthLogin" - SilvermobiGRPC_AuthRegister_FullMethodName = "/SilvermobiGRPC/AuthRegister" - SilvermobiGRPC_ForgetAccount_FullMethodName = "/SilvermobiGRPC/ForgetAccount" - SilvermobiGRPC_UpdatePassword_FullMethodName = "/SilvermobiGRPC/UpdatePassword" - SilvermobiGRPC_SetPhoneNumber_FullMethodName = "/SilvermobiGRPC/SetPhoneNumber" - SilvermobiGRPC_VerifyPhoneNumber_FullMethodName = "/SilvermobiGRPC/VerifyPhoneNumber" - SilvermobiGRPC_SetBirthDate_FullMethodName = "/SilvermobiGRPC/SetBirthDate" - SilvermobiGRPC_SetAccountType_FullMethodName = "/SilvermobiGRPC/SetAccountType" - SilvermobiGRPC_GetAccountType_FullMethodName = "/SilvermobiGRPC/GetAccountType" - SilvermobiGRPC_SetKeyValue_FullMethodName = "/SilvermobiGRPC/SetKeyValue" - SilvermobiGRPC_GetKeyValue_FullMethodName = "/SilvermobiGRPC/GetKeyValue" - SilvermobiGRPC_GetValidation_FullMethodName = "/SilvermobiGRPC/GetValidation" + SilvermobiGRPC_AuthLogin_FullMethodName = "/SilvermobiGRPC/AuthLogin" + SilvermobiGRPC_AuthRegister_FullMethodName = "/SilvermobiGRPC/AuthRegister" + SilvermobiGRPC_ForgetAccount_FullMethodName = "/SilvermobiGRPC/ForgetAccount" + SilvermobiGRPC_UpdatePassword_FullMethodName = "/SilvermobiGRPC/UpdatePassword" + SilvermobiGRPC_SetPhoneNumber_FullMethodName = "/SilvermobiGRPC/SetPhoneNumber" + SilvermobiGRPC_VerifyPhoneNumber_FullMethodName = "/SilvermobiGRPC/VerifyPhoneNumber" + SilvermobiGRPC_SetBirthDate_FullMethodName = "/SilvermobiGRPC/SetBirthDate" + SilvermobiGRPC_SetAccountType_FullMethodName = "/SilvermobiGRPC/SetAccountType" + SilvermobiGRPC_GetAccountType_FullMethodName = "/SilvermobiGRPC/GetAccountType" + SilvermobiGRPC_SetKeyValue_FullMethodName = "/SilvermobiGRPC/SetKeyValue" + SilvermobiGRPC_GetKeyValue_FullMethodName = "/SilvermobiGRPC/GetKeyValue" + SilvermobiGRPC_GetValidation_FullMethodName = "/SilvermobiGRPC/GetValidation" + SilvermobiGRPC_GeoAutocomplete_FullMethodName = "/SilvermobiGRPC/GeoAutocomplete" + SilvermobiGRPC_GeoRoute_FullMethodName = "/SilvermobiGRPC/GeoRoute" + SilvermobiGRPC_GeoRouteWithReturn_FullMethodName = "/SilvermobiGRPC/GeoRouteWithReturn" + SilvermobiGRPC_PutFirebaseToken_FullMethodName = "/SilvermobiGRPC/PutFirebaseToken" + SilvermobiGRPC_GetAccountInfo_FullMethodName = "/SilvermobiGRPC/GetAccountInfo" ) // SilvermobiGRPCClient is the client API for SilvermobiGRPC service. @@ -49,6 +54,11 @@ type SilvermobiGRPCClient interface { SetKeyValue(ctx context.Context, in *KeyValueRequest, opts ...grpc.CallOption) (*KeyValueResponse, error) GetKeyValue(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (*ValueResponse, error) GetValidation(ctx context.Context, in *ValidationRequest, opts ...grpc.CallOption) (*ValidationResponse, error) + GeoAutocomplete(ctx context.Context, in *GeoAutocompleteRequest, opts ...grpc.CallOption) (*GeoAutocompleteResponse, error) + GeoRoute(ctx context.Context, in *GeoRouteRequest, opts ...grpc.CallOption) (*GeoRouteResponse, error) + GeoRouteWithReturn(ctx context.Context, in *GeoRouteWithReturnRequest, opts ...grpc.CallOption) (*GeoRouteWithReturnResponse, error) + PutFirebaseToken(ctx context.Context, in *FirebaseTokenRequest, opts ...grpc.CallOption) (*FirebaseTokenResponse, error) + GetAccountInfo(ctx context.Context, in *AccountInfoRequest, opts ...grpc.CallOption) (*AccountInfoResponse, error) } type silvermobiGRPCClient struct { @@ -167,6 +177,51 @@ func (c *silvermobiGRPCClient) GetValidation(ctx context.Context, in *Validation return out, nil } +func (c *silvermobiGRPCClient) GeoAutocomplete(ctx context.Context, in *GeoAutocompleteRequest, opts ...grpc.CallOption) (*GeoAutocompleteResponse, error) { + out := new(GeoAutocompleteResponse) + err := c.cc.Invoke(ctx, SilvermobiGRPC_GeoAutocomplete_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *silvermobiGRPCClient) GeoRoute(ctx context.Context, in *GeoRouteRequest, opts ...grpc.CallOption) (*GeoRouteResponse, error) { + out := new(GeoRouteResponse) + err := c.cc.Invoke(ctx, SilvermobiGRPC_GeoRoute_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *silvermobiGRPCClient) GeoRouteWithReturn(ctx context.Context, in *GeoRouteWithReturnRequest, opts ...grpc.CallOption) (*GeoRouteWithReturnResponse, error) { + out := new(GeoRouteWithReturnResponse) + err := c.cc.Invoke(ctx, SilvermobiGRPC_GeoRouteWithReturn_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *silvermobiGRPCClient) PutFirebaseToken(ctx context.Context, in *FirebaseTokenRequest, opts ...grpc.CallOption) (*FirebaseTokenResponse, error) { + out := new(FirebaseTokenResponse) + err := c.cc.Invoke(ctx, SilvermobiGRPC_PutFirebaseToken_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *silvermobiGRPCClient) GetAccountInfo(ctx context.Context, in *AccountInfoRequest, opts ...grpc.CallOption) (*AccountInfoResponse, error) { + out := new(AccountInfoResponse) + err := c.cc.Invoke(ctx, SilvermobiGRPC_GetAccountInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SilvermobiGRPCServer is the server API for SilvermobiGRPC service. // All implementations must embed UnimplementedSilvermobiGRPCServer // for forward compatibility @@ -183,6 +238,11 @@ type SilvermobiGRPCServer interface { SetKeyValue(context.Context, *KeyValueRequest) (*KeyValueResponse, error) GetKeyValue(context.Context, *KeyRequest) (*ValueResponse, error) GetValidation(context.Context, *ValidationRequest) (*ValidationResponse, error) + GeoAutocomplete(context.Context, *GeoAutocompleteRequest) (*GeoAutocompleteResponse, error) + GeoRoute(context.Context, *GeoRouteRequest) (*GeoRouteResponse, error) + GeoRouteWithReturn(context.Context, *GeoRouteWithReturnRequest) (*GeoRouteWithReturnResponse, error) + PutFirebaseToken(context.Context, *FirebaseTokenRequest) (*FirebaseTokenResponse, error) + GetAccountInfo(context.Context, *AccountInfoRequest) (*AccountInfoResponse, error) mustEmbedUnimplementedSilvermobiGRPCServer() } @@ -226,6 +286,21 @@ func (UnimplementedSilvermobiGRPCServer) GetKeyValue(context.Context, *KeyReques func (UnimplementedSilvermobiGRPCServer) GetValidation(context.Context, *ValidationRequest) (*ValidationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetValidation not implemented") } +func (UnimplementedSilvermobiGRPCServer) GeoAutocomplete(context.Context, *GeoAutocompleteRequest) (*GeoAutocompleteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GeoAutocomplete not implemented") +} +func (UnimplementedSilvermobiGRPCServer) GeoRoute(context.Context, *GeoRouteRequest) (*GeoRouteResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GeoRoute not implemented") +} +func (UnimplementedSilvermobiGRPCServer) GeoRouteWithReturn(context.Context, *GeoRouteWithReturnRequest) (*GeoRouteWithReturnResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GeoRouteWithReturn not implemented") +} +func (UnimplementedSilvermobiGRPCServer) PutFirebaseToken(context.Context, *FirebaseTokenRequest) (*FirebaseTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PutFirebaseToken not implemented") +} +func (UnimplementedSilvermobiGRPCServer) GetAccountInfo(context.Context, *AccountInfoRequest) (*AccountInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccountInfo not implemented") +} func (UnimplementedSilvermobiGRPCServer) mustEmbedUnimplementedSilvermobiGRPCServer() {} // UnsafeSilvermobiGRPCServer may be embedded to opt out of forward compatibility for this service. @@ -455,6 +530,96 @@ func _SilvermobiGRPC_GetValidation_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _SilvermobiGRPC_GeoAutocomplete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GeoAutocompleteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SilvermobiGRPCServer).GeoAutocomplete(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SilvermobiGRPC_GeoAutocomplete_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SilvermobiGRPCServer).GeoAutocomplete(ctx, req.(*GeoAutocompleteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SilvermobiGRPC_GeoRoute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GeoRouteRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SilvermobiGRPCServer).GeoRoute(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SilvermobiGRPC_GeoRoute_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SilvermobiGRPCServer).GeoRoute(ctx, req.(*GeoRouteRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SilvermobiGRPC_GeoRouteWithReturn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GeoRouteWithReturnRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SilvermobiGRPCServer).GeoRouteWithReturn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SilvermobiGRPC_GeoRouteWithReturn_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SilvermobiGRPCServer).GeoRouteWithReturn(ctx, req.(*GeoRouteWithReturnRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SilvermobiGRPC_PutFirebaseToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FirebaseTokenRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SilvermobiGRPCServer).PutFirebaseToken(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SilvermobiGRPC_PutFirebaseToken_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SilvermobiGRPCServer).PutFirebaseToken(ctx, req.(*FirebaseTokenRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SilvermobiGRPC_GetAccountInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AccountInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SilvermobiGRPCServer).GetAccountInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SilvermobiGRPC_GetAccountInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SilvermobiGRPCServer).GetAccountInfo(ctx, req.(*AccountInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SilvermobiGRPC_ServiceDesc is the grpc.ServiceDesc for SilvermobiGRPC service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -510,6 +675,26 @@ var SilvermobiGRPC_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetValidation", Handler: _SilvermobiGRPC_GetValidation_Handler, }, + { + MethodName: "GeoAutocomplete", + Handler: _SilvermobiGRPC_GeoAutocomplete_Handler, + }, + { + MethodName: "GeoRoute", + Handler: _SilvermobiGRPC_GeoRoute_Handler, + }, + { + MethodName: "GeoRouteWithReturn", + Handler: _SilvermobiGRPC_GeoRouteWithReturn_Handler, + }, + { + MethodName: "PutFirebaseToken", + Handler: _SilvermobiGRPC_PutFirebaseToken_Handler, + }, + { + MethodName: "GetAccountInfo", + Handler: _SilvermobiGRPC_GetAccountInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "silvermobi-service.proto", diff --git a/servers/grpcapi/proto/solidarity-api-types.pb.go b/servers/grpcapi/proto/solidarity-api-types.pb.go new file mode 100644 index 0000000..cd4f725 --- /dev/null +++ b/servers/grpcapi/proto/solidarity-api-types.pb.go @@ -0,0 +1,1740 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.12.4 +// source: solidarity-api-types.proto + +package proto + +import ( + timestamp "github.com/golang/protobuf/ptypes/timestamp" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type DayOfWeek int32 + +const ( + DayOfWeek_MON DayOfWeek = 0 + DayOfWeek_TUE DayOfWeek = 1 + DayOfWeek_WED DayOfWeek = 3 + DayOfWeek_THU DayOfWeek = 4 + DayOfWeek_FRI DayOfWeek = 5 + DayOfWeek_SAT DayOfWeek = 6 + DayOfWeek_SUN DayOfWeek = 7 +) + +// Enum value maps for DayOfWeek. +var ( + DayOfWeek_name = map[int32]string{ + 0: "MON", + 1: "TUE", + 3: "WED", + 4: "THU", + 5: "FRI", + 6: "SAT", + 7: "SUN", + } + DayOfWeek_value = map[string]int32{ + "MON": 0, + "TUE": 1, + "WED": 3, + "THU": 4, + "FRI": 5, + "SAT": 6, + "SUN": 7, + } +) + +func (x DayOfWeek) Enum() *DayOfWeek { + p := new(DayOfWeek) + *p = x + return p +} + +func (x DayOfWeek) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DayOfWeek) Descriptor() protoreflect.EnumDescriptor { + return file_solidarity_api_types_proto_enumTypes[0].Descriptor() +} + +func (DayOfWeek) Type() protoreflect.EnumType { + return &file_solidarity_api_types_proto_enumTypes[0] +} + +func (x DayOfWeek) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DayOfWeek.Descriptor instead. +func (DayOfWeek) EnumDescriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{0} +} + +type PriceType int32 + +const ( + PriceType_FREE PriceType = 0 + PriceType_PAYING PriceType = 1 + PriceType_UNKNOWN PriceType = 2 +) + +// Enum value maps for PriceType. +var ( + PriceType_name = map[int32]string{ + 0: "FREE", + 1: "PAYING", + 2: "UNKNOWN", + } + PriceType_value = map[string]int32{ + "FREE": 0, + "PAYING": 1, + "UNKNOWN": 2, + } +) + +func (x PriceType) Enum() *PriceType { + p := new(PriceType) + *p = x + return p +} + +func (x PriceType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PriceType) Descriptor() protoreflect.EnumDescriptor { + return file_solidarity_api_types_proto_enumTypes[1].Descriptor() +} + +func (PriceType) Type() protoreflect.EnumType { + return &file_solidarity_api_types_proto_enumTypes[1] +} + +func (x PriceType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PriceType.Descriptor instead. +func (PriceType) EnumDescriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{1} +} + +type BookingStatus int32 + +const ( + BookingStatus_INITIATED BookingStatus = 0 + BookingStatus_WAITING_DRIVER_CONFIRMATION BookingStatus = 1 + BookingStatus_WAITING_PASSENGER_CONFIRMATION BookingStatus = 2 + BookingStatus_CONFIRMED BookingStatus = 3 + BookingStatus_CANCELLED BookingStatus = 4 + BookingStatus_COMPLETED_PENDING_VALIDATION BookingStatus = 5 + BookingStatus_VALIDATED BookingStatus = 6 +) + +// Enum value maps for BookingStatus. +var ( + BookingStatus_name = map[int32]string{ + 0: "INITIATED", + 1: "WAITING_DRIVER_CONFIRMATION", + 2: "WAITING_PASSENGER_CONFIRMATION", + 3: "CONFIRMED", + 4: "CANCELLED", + 5: "COMPLETED_PENDING_VALIDATION", + 6: "VALIDATED", + } + BookingStatus_value = map[string]int32{ + "INITIATED": 0, + "WAITING_DRIVER_CONFIRMATION": 1, + "WAITING_PASSENGER_CONFIRMATION": 2, + "CONFIRMED": 3, + "CANCELLED": 4, + "COMPLETED_PENDING_VALIDATION": 5, + "VALIDATED": 6, + } +) + +func (x BookingStatus) Enum() *BookingStatus { + p := new(BookingStatus) + *p = x + return p +} + +func (x BookingStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (BookingStatus) Descriptor() protoreflect.EnumDescriptor { + return file_solidarity_api_types_proto_enumTypes[2].Descriptor() +} + +func (BookingStatus) Type() protoreflect.EnumType { + return &file_solidarity_api_types_proto_enumTypes[2] +} + +func (x BookingStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use BookingStatus.Descriptor instead. +func (BookingStatus) EnumDescriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{2} +} + +type UserType int32 + +const ( + UserType_driver UserType = 0 + UserType_passenger UserType = 1 +) + +// Enum value maps for UserType. +var ( + UserType_name = map[int32]string{ + 0: "driver", + 1: "passenger", + } + UserType_value = map[string]int32{ + "driver": 0, + "passenger": 1, + } +) + +func (x UserType) Enum() *UserType { + p := new(UserType) + *p = x + return p +} + +func (x UserType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UserType) Descriptor() protoreflect.EnumDescriptor { + return file_solidarity_api_types_proto_enumTypes[3].Descriptor() +} + +func (UserType) Type() protoreflect.EnumType { + return &file_solidarity_api_types_proto_enumTypes[3] +} + +func (x UserType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UserType.Descriptor instead. +func (UserType) EnumDescriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{3} +} + +type Feature struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Lat float64 `protobuf:"fixed64,1,opt,name=lat,proto3" json:"lat,omitempty"` + Long float64 `protobuf:"fixed64,2,opt,name=long,proto3" json:"long,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *Feature) Reset() { + *x = Feature{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Feature) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Feature) ProtoMessage() {} + +func (x *Feature) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[0] + 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 Feature.ProtoReflect.Descriptor instead. +func (*Feature) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{0} +} + +func (x *Feature) GetLat() float64 { + if x != nil { + return x.Lat + } + return 0 +} + +func (x *Feature) GetLong() float64 { + if x != nil { + return x.Long + } + return 0 +} + +func (x *Feature) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +type DriverJourney struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` + Car *Car `protobuf:"bytes,2,opt,name=car,proto3,oneof" json:"car,omitempty"` + DriverDeparture_Date *timestamp.Timestamp `protobuf:"bytes,3,opt,name=driver_departure_Date,json=driverDepartureDate,proto3" json:"driver_departure_Date,omitempty"` + Price *Price `protobuf:"bytes,4,opt,name=price,proto3,oneof" json:"price,omitempty"` + DriverDeparture_Address string `protobuf:"bytes,5,opt,name=driver_departure_Address,json=driverDepartureAddress,proto3" json:"driver_departure_Address,omitempty"` + // Types that are assignable to Availabilities: + // + // *DriverJourney_RepeatedPunctualAvailabilities + // *DriverJourney_RepeatedRegularAvailabilities + Availabilities isDriverJourney_Availabilities `protobuf_oneof:"availabilities"` +} + +func (x *DriverJourney) Reset() { + *x = DriverJourney{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DriverJourney) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DriverJourney) ProtoMessage() {} + +func (x *DriverJourney) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[1] + 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 DriverJourney.ProtoReflect.Descriptor instead. +func (*DriverJourney) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{1} +} + +func (x *DriverJourney) GetUser() *User { + if x != nil { + return x.User + } + return nil +} + +func (x *DriverJourney) GetCar() *Car { + if x != nil { + return x.Car + } + return nil +} + +func (x *DriverJourney) GetDriverDeparture_Date() *timestamp.Timestamp { + if x != nil { + return x.DriverDeparture_Date + } + return nil +} + +func (x *DriverJourney) GetPrice() *Price { + if x != nil { + return x.Price + } + return nil +} + +func (x *DriverJourney) GetDriverDeparture_Address() string { + if x != nil { + return x.DriverDeparture_Address + } + return "" +} + +func (m *DriverJourney) GetAvailabilities() isDriverJourney_Availabilities { + if m != nil { + return m.Availabilities + } + return nil +} + +func (x *DriverJourney) GetRepeatedPunctualAvailabilities() *RepeatedPunctualAvailabilitySlot { + if x, ok := x.GetAvailabilities().(*DriverJourney_RepeatedPunctualAvailabilities); ok { + return x.RepeatedPunctualAvailabilities + } + return nil +} + +func (x *DriverJourney) GetRepeatedRegularAvailabilities() *RepeatedRegularAvailabilitySlot { + if x, ok := x.GetAvailabilities().(*DriverJourney_RepeatedRegularAvailabilities); ok { + return x.RepeatedRegularAvailabilities + } + return nil +} + +type isDriverJourney_Availabilities interface { + isDriverJourney_Availabilities() +} + +type DriverJourney_RepeatedPunctualAvailabilities struct { + RepeatedPunctualAvailabilities *RepeatedPunctualAvailabilitySlot `protobuf:"bytes,6,opt,name=repeated_punctual_availabilities,json=repeatedPunctualAvailabilities,proto3,oneof"` +} + +type DriverJourney_RepeatedRegularAvailabilities struct { + RepeatedRegularAvailabilities *RepeatedRegularAvailabilitySlot `protobuf:"bytes,7,opt,name=repeated_regular_availabilities,json=repeatedRegularAvailabilities,proto3,oneof"` +} + +func (*DriverJourney_RepeatedPunctualAvailabilities) isDriverJourney_Availabilities() {} + +func (*DriverJourney_RepeatedRegularAvailabilities) isDriverJourney_Availabilities() {} + +type RepeatedPunctualAvailabilitySlot struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PunctualAvailabilities []*PunctualAvailabilitySlot `protobuf:"bytes,1,rep,name=punctual_availabilities,json=punctualAvailabilities,proto3" json:"punctual_availabilities,omitempty"` +} + +func (x *RepeatedPunctualAvailabilitySlot) Reset() { + *x = RepeatedPunctualAvailabilitySlot{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepeatedPunctualAvailabilitySlot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedPunctualAvailabilitySlot) ProtoMessage() {} + +func (x *RepeatedPunctualAvailabilitySlot) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[2] + 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 RepeatedPunctualAvailabilitySlot.ProtoReflect.Descriptor instead. +func (*RepeatedPunctualAvailabilitySlot) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{2} +} + +func (x *RepeatedPunctualAvailabilitySlot) GetPunctualAvailabilities() []*PunctualAvailabilitySlot { + if x != nil { + return x.PunctualAvailabilities + } + return nil +} + +type RepeatedRegularAvailabilitySlot struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RegularAvailabilities []*RegularAvailabilitySlot `protobuf:"bytes,1,rep,name=regular_availabilities,json=regularAvailabilities,proto3" json:"regular_availabilities,omitempty"` +} + +func (x *RepeatedRegularAvailabilitySlot) Reset() { + *x = RepeatedRegularAvailabilitySlot{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RepeatedRegularAvailabilitySlot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedRegularAvailabilitySlot) ProtoMessage() {} + +func (x *RepeatedRegularAvailabilitySlot) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[3] + 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 RepeatedRegularAvailabilitySlot.ProtoReflect.Descriptor instead. +func (*RepeatedRegularAvailabilitySlot) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{3} +} + +func (x *RepeatedRegularAvailabilitySlot) GetRegularAvailabilities() []*RegularAvailabilitySlot { + if x != nil { + return x.RegularAvailabilities + } + return nil +} + +type DriverRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DriverAddress *Feature `protobuf:"bytes,1,opt,name=driver_address,json=driverAddress,proto3" json:"driver_address,omitempty"` + DriverRadius int32 `protobuf:"varint,2,opt,name=driver_radius,json=driverRadius,proto3" json:"driver_radius,omitempty"` + Driver *User `protobuf:"bytes,3,opt,name=driver,proto3" json:"driver,omitempty"` + Preferences *Preferences `protobuf:"bytes,4,opt,name=preferences,proto3,oneof" json:"preferences,omitempty"` + Car *Car `protobuf:"bytes,5,opt,name=car,proto3,oneof" json:"car,omitempty"` +} + +func (x *DriverRequest) Reset() { + *x = DriverRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DriverRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DriverRequest) ProtoMessage() {} + +func (x *DriverRequest) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[4] + 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 DriverRequest.ProtoReflect.Descriptor instead. +func (*DriverRequest) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{4} +} + +func (x *DriverRequest) GetDriverAddress() *Feature { + if x != nil { + return x.DriverAddress + } + return nil +} + +func (x *DriverRequest) GetDriverRadius() int32 { + if x != nil { + return x.DriverRadius + } + return 0 +} + +func (x *DriverRequest) GetDriver() *User { + if x != nil { + return x.Driver + } + return nil +} + +func (x *DriverRequest) GetPreferences() *Preferences { + if x != nil { + return x.Preferences + } + return nil +} + +func (x *DriverRequest) GetCar() *Car { + if x != nil { + return x.Car + } + return nil +} + +type PunctualAvailabilitySlot struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Date *timestamp.Timestamp `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"` + StartTime string `protobuf:"bytes,2,opt,name=startTime,proto3" json:"startTime,omitempty"` + EndTime string `protobuf:"bytes,3,opt,name=endTime,proto3" json:"endTime,omitempty"` +} + +func (x *PunctualAvailabilitySlot) Reset() { + *x = PunctualAvailabilitySlot{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PunctualAvailabilitySlot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PunctualAvailabilitySlot) ProtoMessage() {} + +func (x *PunctualAvailabilitySlot) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[5] + 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 PunctualAvailabilitySlot.ProtoReflect.Descriptor instead. +func (*PunctualAvailabilitySlot) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{5} +} + +func (x *PunctualAvailabilitySlot) GetDate() *timestamp.Timestamp { + if x != nil { + return x.Date + } + return nil +} + +func (x *PunctualAvailabilitySlot) GetStartTime() string { + if x != nil { + return x.StartTime + } + return "" +} + +func (x *PunctualAvailabilitySlot) GetEndTime() string { + if x != nil { + return x.EndTime + } + return "" +} + +type RegularAvailabilitySlot struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DayOfWeek DayOfWeek `protobuf:"varint,1,opt,name=dayOfWeek,proto3,enum=DayOfWeek" json:"dayOfWeek,omitempty"` + StartTime string `protobuf:"bytes,2,opt,name=startTime,proto3" json:"startTime,omitempty"` + EndTime string `protobuf:"bytes,3,opt,name=endTime,proto3" json:"endTime,omitempty"` +} + +func (x *RegularAvailabilitySlot) Reset() { + *x = RegularAvailabilitySlot{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegularAvailabilitySlot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegularAvailabilitySlot) ProtoMessage() {} + +func (x *RegularAvailabilitySlot) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[6] + 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 RegularAvailabilitySlot.ProtoReflect.Descriptor instead. +func (*RegularAvailabilitySlot) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{6} +} + +func (x *RegularAvailabilitySlot) GetDayOfWeek() DayOfWeek { + if x != nil { + return x.DayOfWeek + } + return DayOfWeek_MON +} + +func (x *RegularAvailabilitySlot) GetStartTime() string { + if x != nil { + return x.StartTime + } + return "" +} + +func (x *RegularAvailabilitySlot) GetEndTime() string { + if x != nil { + return x.EndTime + } + return "" +} + +type BookingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + PassengerId string `protobuf:"bytes,2,opt,name=passengerId,proto3" json:"passengerId,omitempty"` + DriverId string `protobuf:"bytes,3,opt,name=driverId,proto3" json:"driverId,omitempty"` + Status BookingStatus `protobuf:"varint,4,opt,name=status,proto3,enum=BookingStatus" json:"status,omitempty"` + DepartureAddress *Feature `protobuf:"bytes,5,opt,name=departure_address,json=departureAddress,proto3" json:"departure_address,omitempty"` + DestinationAddress *Feature `protobuf:"bytes,6,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"` + PickupDate *timestamp.Timestamp `protobuf:"bytes,7,opt,name=pickup_date,json=pickupDate,proto3" json:"pickup_date,omitempty"` +} + +func (x *BookingRequest) Reset() { + *x = BookingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BookingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BookingRequest) ProtoMessage() {} + +func (x *BookingRequest) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[7] + 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 BookingRequest.ProtoReflect.Descriptor instead. +func (*BookingRequest) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{7} +} + +func (x *BookingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *BookingRequest) GetPassengerId() string { + if x != nil { + return x.PassengerId + } + return "" +} + +func (x *BookingRequest) GetDriverId() string { + if x != nil { + return x.DriverId + } + return "" +} + +func (x *BookingRequest) GetStatus() BookingStatus { + if x != nil { + return x.Status + } + return BookingStatus_INITIATED +} + +func (x *BookingRequest) GetDepartureAddress() *Feature { + if x != nil { + return x.DepartureAddress + } + return nil +} + +func (x *BookingRequest) GetDestinationAddress() *Feature { + if x != nil { + return x.DestinationAddress + } + return nil +} + +func (x *BookingRequest) GetPickupDate() *timestamp.Timestamp { + if x != nil { + return x.PickupDate + } + return nil +} + +type Booking struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Driver *User `protobuf:"bytes,2,opt,name=driver,proto3" json:"driver,omitempty"` + Passenger *User `protobuf:"bytes,3,opt,name=passenger,proto3" json:"passenger,omitempty"` + PassengerPickupDate *timestamp.Timestamp `protobuf:"bytes,4,opt,name=passengerPickupDate,proto3" json:"passengerPickupDate,omitempty"` + PassengerDepartureRoute *Feature `protobuf:"bytes,5,opt,name=passenger_departure_route,json=passengerDepartureRoute,proto3" json:"passenger_departure_route,omitempty"` + PassengerDestinationRoute *Feature `protobuf:"bytes,6,opt,name=passenger_destination_route,json=passengerDestinationRoute,proto3" json:"passenger_destination_route,omitempty"` + Status BookingStatus `protobuf:"varint,7,opt,name=status,proto3,enum=BookingStatus" json:"status,omitempty"` + Duration *int64 `protobuf:"varint,8,opt,name=duration,proto3,oneof" json:"duration,omitempty"` + Distance *int64 `protobuf:"varint,9,opt,name=distance,proto3,oneof" json:"distance,omitempty"` + Price *Price `protobuf:"bytes,10,opt,name=price,proto3" json:"price,omitempty"` + Car *Car `protobuf:"bytes,11,opt,name=car,proto3,oneof" json:"car,omitempty"` + PickupDate *timestamp.Timestamp `protobuf:"bytes,12,opt,name=pickup_date,json=pickupDate,proto3" json:"pickup_date,omitempty"` +} + +func (x *Booking) Reset() { + *x = Booking{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Booking) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Booking) ProtoMessage() {} + +func (x *Booking) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[8] + 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 Booking.ProtoReflect.Descriptor instead. +func (*Booking) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{8} +} + +func (x *Booking) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Booking) GetDriver() *User { + if x != nil { + return x.Driver + } + return nil +} + +func (x *Booking) GetPassenger() *User { + if x != nil { + return x.Passenger + } + return nil +} + +func (x *Booking) GetPassengerPickupDate() *timestamp.Timestamp { + if x != nil { + return x.PassengerPickupDate + } + return nil +} + +func (x *Booking) GetPassengerDepartureRoute() *Feature { + if x != nil { + return x.PassengerDepartureRoute + } + return nil +} + +func (x *Booking) GetPassengerDestinationRoute() *Feature { + if x != nil { + return x.PassengerDestinationRoute + } + return nil +} + +func (x *Booking) GetStatus() BookingStatus { + if x != nil { + return x.Status + } + return BookingStatus_INITIATED +} + +func (x *Booking) GetDuration() int64 { + if x != nil && x.Duration != nil { + return *x.Duration + } + return 0 +} + +func (x *Booking) GetDistance() int64 { + if x != nil && x.Distance != nil { + return *x.Distance + } + return 0 +} + +func (x *Booking) GetPrice() *Price { + if x != nil { + return x.Price + } + return nil +} + +func (x *Booking) GetCar() *Car { + if x != nil { + return x.Car + } + return nil +} + +func (x *Booking) GetPickupDate() *timestamp.Timestamp { + if x != nil { + return x.PickupDate + } + return nil +} + +type Car struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Model *string `protobuf:"bytes,1,opt,name=model,proto3,oneof" json:"model,omitempty"` + Brand *string `protobuf:"bytes,2,opt,name=brand,proto3,oneof" json:"brand,omitempty"` +} + +func (x *Car) Reset() { + *x = Car{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Car) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Car) ProtoMessage() {} + +func (x *Car) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[9] + 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 Car.ProtoReflect.Descriptor instead. +func (*Car) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{9} +} + +func (x *Car) GetModel() string { + if x != nil && x.Model != nil { + return *x.Model + } + return "" +} + +func (x *Car) GetBrand() string { + if x != nil && x.Brand != nil { + return *x.Brand + } + return "" +} + +type Preferences struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Smoking *bool `protobuf:"varint,1,opt,name=smoking,proto3,oneof" json:"smoking,omitempty"` + Animals *bool `protobuf:"varint,2,opt,name=animals,proto3,oneof" json:"animals,omitempty"` + Music *bool `protobuf:"varint,3,opt,name=music,proto3,oneof" json:"music,omitempty"` + IsTalker *bool `protobuf:"varint,4,opt,name=is_talker,json=isTalker,proto3,oneof" json:"is_talker,omitempty"` + LuggageSize *int64 `protobuf:"varint,5,opt,name=luggage_size,json=luggageSize,proto3,oneof" json:"luggage_size,omitempty"` +} + +func (x *Preferences) Reset() { + *x = Preferences{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Preferences) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Preferences) ProtoMessage() {} + +func (x *Preferences) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[10] + 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 Preferences.ProtoReflect.Descriptor instead. +func (*Preferences) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{10} +} + +func (x *Preferences) GetSmoking() bool { + if x != nil && x.Smoking != nil { + return *x.Smoking + } + return false +} + +func (x *Preferences) GetAnimals() bool { + if x != nil && x.Animals != nil { + return *x.Animals + } + return false +} + +func (x *Preferences) GetMusic() bool { + if x != nil && x.Music != nil { + return *x.Music + } + return false +} + +func (x *Preferences) GetIsTalker() bool { + if x != nil && x.IsTalker != nil { + return *x.IsTalker + } + return false +} + +func (x *Preferences) GetLuggageSize() int64 { + if x != nil && x.LuggageSize != nil { + return *x.LuggageSize + } + return 0 +} + +type Price struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type *PriceType `protobuf:"varint,1,opt,name=type,proto3,enum=PriceType,oneof" json:"type,omitempty"` + Amount *float64 `protobuf:"fixed64,2,opt,name=amount,proto3,oneof" json:"amount,omitempty"` + Currency *string `protobuf:"bytes,3,opt,name=currency,proto3,oneof" json:"currency,omitempty"` +} + +func (x *Price) Reset() { + *x = Price{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Price) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Price) ProtoMessage() {} + +func (x *Price) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[11] + 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 Price.ProtoReflect.Descriptor instead. +func (*Price) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{11} +} + +func (x *Price) GetType() PriceType { + if x != nil && x.Type != nil { + return *x.Type + } + return PriceType_FREE +} + +func (x *Price) GetAmount() float64 { + if x != nil && x.Amount != nil { + return *x.Amount + } + return 0 +} + +func (x *Price) GetCurrency() string { + if x != nil && x.Currency != nil { + return *x.Currency + } + return "" +} + +type User struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` + FirstName *string `protobuf:"bytes,3,opt,name=first_name,json=firstName,proto3,oneof" json:"first_name,omitempty"` + LastName *string `protobuf:"bytes,4,opt,name=last_name,json=lastName,proto3,oneof" json:"last_name,omitempty"` + Grade *int64 `protobuf:"varint,5,opt,name=grade,proto3,oneof" json:"grade,omitempty"` + Picture *string `protobuf:"bytes,6,opt,name=picture,proto3,oneof" json:"picture,omitempty"` + Gender *string `protobuf:"bytes,7,opt,name=gender,proto3,oneof" json:"gender,omitempty"` + VerifiedIdentity *bool `protobuf:"varint,8,opt,name=verified_identity,json=verifiedIdentity,proto3,oneof" json:"verified_identity,omitempty"` +} + +func (x *User) Reset() { + *x = User{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_types_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *User) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*User) ProtoMessage() {} + +func (x *User) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_types_proto_msgTypes[12] + 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 User.ProtoReflect.Descriptor instead. +func (*User) Descriptor() ([]byte, []int) { + return file_solidarity_api_types_proto_rawDescGZIP(), []int{12} +} + +func (x *User) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *User) GetAlias() string { + if x != nil { + return x.Alias + } + return "" +} + +func (x *User) GetFirstName() string { + if x != nil && x.FirstName != nil { + return *x.FirstName + } + return "" +} + +func (x *User) GetLastName() string { + if x != nil && x.LastName != nil { + return *x.LastName + } + return "" +} + +func (x *User) GetGrade() int64 { + if x != nil && x.Grade != nil { + return *x.Grade + } + return 0 +} + +func (x *User) GetPicture() string { + if x != nil && x.Picture != nil { + return *x.Picture + } + return "" +} + +func (x *User) GetGender() string { + if x != nil && x.Gender != nil { + return *x.Gender + } + return "" +} + +func (x *User) GetVerifiedIdentity() bool { + if x != nil && x.VerifiedIdentity != nil { + return *x.VerifiedIdentity + } + return false +} + +var File_solidarity_api_types_proto protoreflect.FileDescriptor + +var file_solidarity_api_types_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x2d, 0x61, 0x70, 0x69, + 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 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, 0x49, 0x0a, + 0x07, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x61, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, + 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x6c, 0x6f, 0x6e, 0x67, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf3, 0x03, 0x0a, 0x0d, 0x44, 0x72, 0x69, + 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x12, 0x19, 0x0a, 0x04, 0x75, 0x73, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x03, 0x63, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x43, 0x61, 0x72, 0x48, 0x01, 0x52, 0x03, 0x63, 0x61, 0x72, 0x88, + 0x01, 0x01, 0x12, 0x4e, 0x0a, 0x15, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x70, + 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x44, 0x61, 0x74, 0x65, 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, 0x13, 0x64, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, + 0x74, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x06, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x48, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, + 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, + 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x44, + 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x6d, 0x0a, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x75, 0x6e, 0x63, + 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x52, 0x65, 0x70, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x1e, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, + 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x6a, + 0x0a, 0x1f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x67, 0x75, 0x6c, + 0x61, 0x72, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x48, 0x00, 0x52, 0x1d, 0x72, 0x65, 0x70, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x10, 0x0a, 0x0e, 0x61, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, + 0x5f, 0x63, 0x61, 0x72, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x22, 0x76, + 0x0a, 0x20, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, + 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, + 0x6f, 0x74, 0x12, 0x52, 0x0a, 0x17, 0x70, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x61, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x16, + 0x70, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0x72, 0x0a, 0x1f, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x4f, 0x0a, 0x16, 0x72, 0x65, 0x67, + 0x75, 0x6c, 0x61, 0x72, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, 0x65, 0x67, 0x75, + 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, + 0x6c, 0x6f, 0x74, 0x52, 0x15, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xee, 0x01, 0x0a, 0x0d, 0x44, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0e, + 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0d, + 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, + 0x0d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x72, 0x61, 0x64, 0x69, 0x75, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x61, 0x64, 0x69, + 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, + 0x72, 0x12, 0x33, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x03, 0x63, 0x61, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x43, 0x61, 0x72, 0x48, 0x01, 0x52, 0x03, 0x63, 0x61, 0x72, + 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x63, 0x61, 0x72, 0x22, 0x82, 0x01, 0x0a, 0x18, + 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, + 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, 0x04, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, + 0x22, 0x7b, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x28, 0x0a, 0x09, 0x64, + 0x61, 0x79, 0x4f, 0x66, 0x57, 0x65, 0x65, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, + 0x2e, 0x44, 0x61, 0x79, 0x4f, 0x66, 0x57, 0x65, 0x65, 0x6b, 0x52, 0x09, 0x64, 0x61, 0x79, 0x4f, + 0x66, 0x57, 0x65, 0x65, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xb5, 0x02, + 0x0a, 0x0e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, + 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x26, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, + 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x35, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x75, 0x72, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x10, 0x64, 0x65, 0x70, + 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x39, 0x0a, + 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x70, 0x69, 0x63, 0x6b, + 0x75, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x65, 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, 0x0a, 0x70, 0x69, 0x63, 0x6b, 0x75, + 0x70, 0x44, 0x61, 0x74, 0x65, 0x22, 0xbf, 0x04, 0x0a, 0x07, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, + 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x1d, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x05, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, + 0x12, 0x23, 0x0a, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x70, 0x61, 0x73, 0x73, + 0x65, 0x6e, 0x67, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x13, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, + 0x65, 0x72, 0x50, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x44, 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, 0x13, + 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x50, 0x69, 0x63, 0x6b, 0x75, 0x70, 0x44, + 0x61, 0x74, 0x65, 0x12, 0x44, 0x0a, 0x19, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, + 0x5f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x52, 0x17, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x44, 0x65, 0x70, 0x61, 0x72, + 0x74, 0x75, 0x72, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x48, 0x0a, 0x1b, 0x70, 0x61, 0x73, + 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x19, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, + 0x67, 0x65, 0x72, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, + 0x75, 0x74, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x08, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, + 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, + 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x48, 0x01, + 0x52, 0x08, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, + 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x63, + 0x61, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x04, 0x2e, 0x43, 0x61, 0x72, 0x48, 0x02, + 0x52, 0x03, 0x63, 0x61, 0x72, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, 0x0b, 0x70, 0x69, 0x63, 0x6b, + 0x75, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0c, 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, 0x0a, 0x70, 0x69, 0x63, 0x6b, 0x75, + 0x70, 0x44, 0x61, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, + 0x06, 0x0a, 0x04, 0x5f, 0x63, 0x61, 0x72, 0x22, 0x4f, 0x0a, 0x03, 0x43, 0x61, 0x72, 0x12, 0x19, + 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x62, 0x72, 0x61, + 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x05, 0x62, 0x72, 0x61, 0x6e, + 0x64, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x08, + 0x0a, 0x06, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x22, 0xf1, 0x01, 0x0a, 0x0b, 0x50, 0x72, 0x65, + 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x73, 0x6d, 0x6f, 0x6b, + 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x73, 0x6d, 0x6f, + 0x6b, 0x69, 0x6e, 0x67, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x61, 0x6e, 0x69, 0x6d, 0x61, + 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x07, 0x61, 0x6e, 0x69, 0x6d, + 0x61, 0x6c, 0x73, 0x88, 0x01, 0x01, 0x12, 0x19, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x02, 0x52, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x88, 0x01, + 0x01, 0x12, 0x20, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x74, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, 0x52, 0x08, 0x69, 0x73, 0x54, 0x61, 0x6c, 0x6b, 0x65, 0x72, + 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x0c, 0x6c, 0x75, 0x67, 0x67, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x04, 0x52, 0x0b, 0x6c, 0x75, 0x67, + 0x67, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x73, 0x6d, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x61, 0x6e, 0x69, 0x6d, + 0x61, 0x6c, 0x73, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x42, 0x0c, 0x0a, + 0x0a, 0x5f, 0x69, 0x73, 0x5f, 0x74, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x42, 0x0f, 0x0a, 0x0d, 0x5f, + 0x6c, 0x75, 0x67, 0x67, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x8b, 0x01, 0x0a, + 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x48, 0x00, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x01, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0b, 0x0a, + 0x09, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x22, 0xcf, 0x02, 0x0a, 0x04, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x22, 0x0a, 0x0a, 0x66, 0x69, 0x72, + 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, + 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x01, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, + 0x19, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x48, 0x02, + 0x52, 0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x69, + 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x07, 0x70, + 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x67, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x06, 0x67, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x65, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x05, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x5f, 0x66, 0x69, 0x72, + 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x67, 0x72, 0x61, 0x64, 0x65, 0x42, + 0x0a, 0x0a, 0x08, 0x5f, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, + 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2a, 0x4a, 0x0a, 0x09, + 0x44, 0x61, 0x79, 0x4f, 0x66, 0x57, 0x65, 0x65, 0x6b, 0x12, 0x07, 0x0a, 0x03, 0x4d, 0x4f, 0x4e, + 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x55, 0x45, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x57, + 0x45, 0x44, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x48, 0x55, 0x10, 0x04, 0x12, 0x07, 0x0a, + 0x03, 0x46, 0x52, 0x49, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x41, 0x54, 0x10, 0x06, 0x12, + 0x07, 0x0a, 0x03, 0x53, 0x55, 0x4e, 0x10, 0x07, 0x2a, 0x2e, 0x0a, 0x09, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x52, 0x45, 0x45, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x59, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x02, 0x2a, 0xb2, 0x01, 0x0a, 0x0d, 0x42, 0x6f, 0x6f, + 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, + 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x57, 0x41, 0x49, + 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x44, 0x52, 0x49, 0x56, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x46, + 0x49, 0x52, 0x4d, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x57, 0x41, + 0x49, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x4e, 0x47, 0x45, 0x52, 0x5f, + 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0d, + 0x0a, 0x09, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x20, 0x0a, 0x1c, + 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x12, 0x0d, + 0x0a, 0x09, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x06, 0x2a, 0x25, 0x0a, + 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x64, 0x72, 0x69, + 0x76, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, + 0x65, 0x72, 0x10, 0x01, 0x42, 0x45, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, + 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, + 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, + 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_solidarity_api_types_proto_rawDescOnce sync.Once + file_solidarity_api_types_proto_rawDescData = file_solidarity_api_types_proto_rawDesc +) + +func file_solidarity_api_types_proto_rawDescGZIP() []byte { + file_solidarity_api_types_proto_rawDescOnce.Do(func() { + file_solidarity_api_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_solidarity_api_types_proto_rawDescData) + }) + return file_solidarity_api_types_proto_rawDescData +} + +var file_solidarity_api_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_solidarity_api_types_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_solidarity_api_types_proto_goTypes = []interface{}{ + (DayOfWeek)(0), // 0: DayOfWeek + (PriceType)(0), // 1: PriceType + (BookingStatus)(0), // 2: BookingStatus + (UserType)(0), // 3: UserType + (*Feature)(nil), // 4: Feature + (*DriverJourney)(nil), // 5: DriverJourney + (*RepeatedPunctualAvailabilitySlot)(nil), // 6: RepeatedPunctualAvailabilitySlot + (*RepeatedRegularAvailabilitySlot)(nil), // 7: RepeatedRegularAvailabilitySlot + (*DriverRequest)(nil), // 8: DriverRequest + (*PunctualAvailabilitySlot)(nil), // 9: PunctualAvailabilitySlot + (*RegularAvailabilitySlot)(nil), // 10: RegularAvailabilitySlot + (*BookingRequest)(nil), // 11: BookingRequest + (*Booking)(nil), // 12: Booking + (*Car)(nil), // 13: Car + (*Preferences)(nil), // 14: Preferences + (*Price)(nil), // 15: Price + (*User)(nil), // 16: User + (*timestamp.Timestamp)(nil), // 17: google.protobuf.Timestamp +} +var file_solidarity_api_types_proto_depIdxs = []int32{ + 16, // 0: DriverJourney.user:type_name -> User + 13, // 1: DriverJourney.car:type_name -> Car + 17, // 2: DriverJourney.driver_departure_Date:type_name -> google.protobuf.Timestamp + 15, // 3: DriverJourney.price:type_name -> Price + 6, // 4: DriverJourney.repeated_punctual_availabilities:type_name -> RepeatedPunctualAvailabilitySlot + 7, // 5: DriverJourney.repeated_regular_availabilities:type_name -> RepeatedRegularAvailabilitySlot + 9, // 6: RepeatedPunctualAvailabilitySlot.punctual_availabilities:type_name -> PunctualAvailabilitySlot + 10, // 7: RepeatedRegularAvailabilitySlot.regular_availabilities:type_name -> RegularAvailabilitySlot + 4, // 8: DriverRequest.driver_address:type_name -> Feature + 16, // 9: DriverRequest.driver:type_name -> User + 14, // 10: DriverRequest.preferences:type_name -> Preferences + 13, // 11: DriverRequest.car:type_name -> Car + 17, // 12: PunctualAvailabilitySlot.date:type_name -> google.protobuf.Timestamp + 0, // 13: RegularAvailabilitySlot.dayOfWeek:type_name -> DayOfWeek + 2, // 14: BookingRequest.status:type_name -> BookingStatus + 4, // 15: BookingRequest.departure_address:type_name -> Feature + 4, // 16: BookingRequest.destination_address:type_name -> Feature + 17, // 17: BookingRequest.pickup_date:type_name -> google.protobuf.Timestamp + 16, // 18: Booking.driver:type_name -> User + 16, // 19: Booking.passenger:type_name -> User + 17, // 20: Booking.passengerPickupDate:type_name -> google.protobuf.Timestamp + 4, // 21: Booking.passenger_departure_route:type_name -> Feature + 4, // 22: Booking.passenger_destination_route:type_name -> Feature + 2, // 23: Booking.status:type_name -> BookingStatus + 15, // 24: Booking.price:type_name -> Price + 13, // 25: Booking.car:type_name -> Car + 17, // 26: Booking.pickup_date:type_name -> google.protobuf.Timestamp + 1, // 27: Price.type:type_name -> PriceType + 28, // [28:28] is the sub-list for method output_type + 28, // [28:28] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name +} + +func init() { file_solidarity_api_types_proto_init() } +func file_solidarity_api_types_proto_init() { + if File_solidarity_api_types_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_solidarity_api_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Feature); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DriverJourney); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepeatedPunctualAvailabilitySlot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepeatedRegularAvailabilitySlot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DriverRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PunctualAvailabilitySlot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegularAvailabilitySlot); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BookingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Booking); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Car); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Preferences); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Price); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_types_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*User); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_solidarity_api_types_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*DriverJourney_RepeatedPunctualAvailabilities)(nil), + (*DriverJourney_RepeatedRegularAvailabilities)(nil), + } + file_solidarity_api_types_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_solidarity_api_types_proto_msgTypes[8].OneofWrappers = []interface{}{} + file_solidarity_api_types_proto_msgTypes[9].OneofWrappers = []interface{}{} + file_solidarity_api_types_proto_msgTypes[10].OneofWrappers = []interface{}{} + file_solidarity_api_types_proto_msgTypes[11].OneofWrappers = []interface{}{} + file_solidarity_api_types_proto_msgTypes[12].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_solidarity_api_types_proto_rawDesc, + NumEnums: 4, + NumMessages: 13, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_solidarity_api_types_proto_goTypes, + DependencyIndexes: file_solidarity_api_types_proto_depIdxs, + EnumInfos: file_solidarity_api_types_proto_enumTypes, + MessageInfos: file_solidarity_api_types_proto_msgTypes, + }.Build() + File_solidarity_api_types_proto = out.File + file_solidarity_api_types_proto_rawDesc = nil + file_solidarity_api_types_proto_goTypes = nil + file_solidarity_api_types_proto_depIdxs = nil +} diff --git a/servers/grpcapi/proto/solidarity-api-types.proto b/servers/grpcapi/proto/solidarity-api-types.proto new file mode 100644 index 0000000..799d7c6 --- /dev/null +++ b/servers/grpcapi/proto/solidarity-api-types.proto @@ -0,0 +1,137 @@ +syntax = "proto3"; +option go_package = "git.coopgo.io/coopgo-platform/solidarity-service/servers/grpc/proto"; +import "google/protobuf/timestamp.proto"; + + + +message Feature { + double lat = 1; + double long = 2; + string address = 3; +} + +message DriverJourney { + User user = 1; + optional Car car = 2; + google.protobuf.Timestamp driver_departure_Date = 3; + optional Price price = 4; + string driver_departure_Address = 5; + oneof availabilities { + RepeatedPunctualAvailabilitySlot repeated_punctual_availabilities = 6; + RepeatedRegularAvailabilitySlot repeated_regular_availabilities = 7; + } +} +message RepeatedPunctualAvailabilitySlot { + repeated PunctualAvailabilitySlot punctual_availabilities = 1; +} + +message RepeatedRegularAvailabilitySlot { + repeated RegularAvailabilitySlot regular_availabilities = 1; +} + +message DriverRequest{ + Feature driver_address = 1; + int32 driver_radius = 2; + User driver = 3; + optional Preferences preferences = 4; + optional Car car = 5; +} + +message PunctualAvailabilitySlot { + google.protobuf.Timestamp date = 1; + string startTime = 2; + string endTime = 3; +} +message RegularAvailabilitySlot { + DayOfWeek dayOfWeek = 1; + string startTime = 2; + string endTime = 3; +} + +enum DayOfWeek { + MON = 0; + TUE = 1; + WED = 3; + THU = 4; + FRI = 5; + SAT = 6; + SUN = 7; +} + +message BookingRequest { + string id = 1; + string passengerId = 2; + string driverId = 3; + BookingStatus status = 4; + Feature departure_address =5; + Feature destination_address = 6; + google.protobuf.Timestamp pickup_date = 7; +} + +message Booking { + string id = 1; + User driver = 2; + User passenger = 3; + google.protobuf.Timestamp passengerPickupDate =4; + Feature passenger_departure_route = 5; + Feature passenger_destination_route = 6; + BookingStatus status = 7; + optional int64 duration = 8; + optional int64 distance = 9; + Price price = 10; + optional Car car = 11; + google.protobuf.Timestamp pickup_date = 12; +} + + +message Car { + optional string model = 1; + optional string brand = 2; +} + +message Preferences { + optional bool smoking = 1; + optional bool animals = 2; + optional bool music = 3; + optional bool is_talker = 4; + optional int64 luggage_size = 5; +} + + +enum PriceType { + FREE = 0; + PAYING = 1; + UNKNOWN = 2; +} + +message Price { + optional PriceType type = 1; + optional double amount = 2; + optional string currency = 3; +} + +message User { + string id = 1; + string alias = 2; + optional string first_name = 3; + optional string last_name = 4; + optional int64 grade = 5; + optional string picture = 6; + optional string gender = 7; + optional bool verified_identity = 8; +} + +enum BookingStatus { + INITIATED = 0; + WAITING_DRIVER_CONFIRMATION = 1; + WAITING_PASSENGER_CONFIRMATION = 2; + CONFIRMED = 3; + CANCELLED = 4; + COMPLETED_PENDING_VALIDATION = 5; + VALIDATED = 6; +} + +enum UserType{ + driver = 0; + passenger = 1; +} \ No newline at end of file diff --git a/servers/grpcapi/proto/solidarity-api.pb.go b/servers/grpcapi/proto/solidarity-api.pb.go new file mode 100644 index 0000000..c5ee840 --- /dev/null +++ b/servers/grpcapi/proto/solidarity-api.pb.go @@ -0,0 +1,1261 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.12.4 +// source: solidarity-api.proto + +package proto + +import ( + timestamp "github.com/golang/protobuf/ptypes/timestamp" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PassengerTripRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Passenger *User `protobuf:"bytes,1,opt,name=passenger,proto3" json:"passenger,omitempty"` + Preferences *Preferences `protobuf:"bytes,2,opt,name=preferences,proto3,oneof" json:"preferences,omitempty"` +} + +func (x *PassengerTripRequest) Reset() { + *x = PassengerTripRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PassengerTripRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PassengerTripRequest) ProtoMessage() {} + +func (x *PassengerTripRequest) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[0] + 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 PassengerTripRequest.ProtoReflect.Descriptor instead. +func (*PassengerTripRequest) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{0} +} + +func (x *PassengerTripRequest) GetPassenger() *User { + if x != nil { + return x.Passenger + } + return nil +} + +func (x *PassengerTripRequest) GetPreferences() *Preferences { + if x != nil { + return x.Preferences + } + return nil +} + +type DriverRegularAvailabilities struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DriverRequest *DriverRequest `protobuf:"bytes,1,opt,name=driver_request,json=driverRequest,proto3" json:"driver_request,omitempty"` + DriverAvailabilities []*RegularAvailabilitySlot `protobuf:"bytes,2,rep,name=driver_availabilities,json=driverAvailabilities,proto3" json:"driver_availabilities,omitempty"` +} + +func (x *DriverRegularAvailabilities) Reset() { + *x = DriverRegularAvailabilities{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DriverRegularAvailabilities) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DriverRegularAvailabilities) ProtoMessage() {} + +func (x *DriverRegularAvailabilities) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[1] + 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 DriverRegularAvailabilities.ProtoReflect.Descriptor instead. +func (*DriverRegularAvailabilities) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{1} +} + +func (x *DriverRegularAvailabilities) GetDriverRequest() *DriverRequest { + if x != nil { + return x.DriverRequest + } + return nil +} + +func (x *DriverRegularAvailabilities) GetDriverAvailabilities() []*RegularAvailabilitySlot { + if x != nil { + return x.DriverAvailabilities + } + return nil +} + +type DriverPunctualAvailabilities struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DriverRequest *DriverRequest `protobuf:"bytes,1,opt,name=driver_request,json=driverRequest,proto3" json:"driver_request,omitempty"` + DriverAvailabilities []*PunctualAvailabilitySlot `protobuf:"bytes,2,rep,name=driver_availabilities,json=driverAvailabilities,proto3" json:"driver_availabilities,omitempty"` +} + +func (x *DriverPunctualAvailabilities) Reset() { + *x = DriverPunctualAvailabilities{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DriverPunctualAvailabilities) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DriverPunctualAvailabilities) ProtoMessage() {} + +func (x *DriverPunctualAvailabilities) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[2] + 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 DriverPunctualAvailabilities.ProtoReflect.Descriptor instead. +func (*DriverPunctualAvailabilities) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{2} +} + +func (x *DriverPunctualAvailabilities) GetDriverRequest() *DriverRequest { + if x != nil { + return x.DriverRequest + } + return nil +} + +func (x *DriverPunctualAvailabilities) GetDriverAvailabilities() []*PunctualAvailabilitySlot { + if x != nil { + return x.DriverAvailabilities + } + return nil +} + +type PassengerTripResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Message *string `protobuf:"bytes,2,opt,name=message,proto3,oneof" json:"message,omitempty"` +} + +func (x *PassengerTripResponse) Reset() { + *x = PassengerTripResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PassengerTripResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PassengerTripResponse) ProtoMessage() {} + +func (x *PassengerTripResponse) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[3] + 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 PassengerTripResponse.ProtoReflect.Descriptor instead. +func (*PassengerTripResponse) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{3} +} + +func (x *PassengerTripResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *PassengerTripResponse) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +type DriverAvailabilitiesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Message *string `protobuf:"bytes,2,opt,name=message,proto3,oneof" json:"message,omitempty"` +} + +func (x *DriverAvailabilitiesResponse) Reset() { + *x = DriverAvailabilitiesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DriverAvailabilitiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DriverAvailabilitiesResponse) ProtoMessage() {} + +func (x *DriverAvailabilitiesResponse) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[4] + 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 DriverAvailabilitiesResponse.ProtoReflect.Descriptor instead. +func (*DriverAvailabilitiesResponse) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{4} +} + +func (x *DriverAvailabilitiesResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *DriverAvailabilitiesResponse) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +type CreateBookingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Booking *BookingRequest `protobuf:"bytes,1,opt,name=booking,proto3" json:"booking,omitempty"` +} + +func (x *CreateBookingRequest) Reset() { + *x = CreateBookingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateBookingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBookingRequest) ProtoMessage() {} + +func (x *CreateBookingRequest) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[5] + 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 CreateBookingRequest.ProtoReflect.Descriptor instead. +func (*CreateBookingRequest) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateBookingRequest) GetBooking() *BookingRequest { + if x != nil { + return x.Booking + } + return nil +} + +type CreateBookingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Booking *Booking `protobuf:"bytes,1,opt,name=booking,proto3" json:"booking,omitempty"` +} + +func (x *CreateBookingResponse) Reset() { + *x = CreateBookingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateBookingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateBookingResponse) ProtoMessage() {} + +func (x *CreateBookingResponse) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[6] + 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 CreateBookingResponse.ProtoReflect.Descriptor instead. +func (*CreateBookingResponse) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateBookingResponse) GetBooking() *Booking { + if x != nil { + return x.Booking + } + return nil +} + +type UpdateBookingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BookingId string `protobuf:"bytes,1,opt,name=booking_id,json=bookingId,proto3" json:"booking_id,omitempty"` + Status BookingStatus `protobuf:"varint,2,opt,name=status,proto3,enum=BookingStatus" json:"status,omitempty"` + Message *string `protobuf:"bytes,3,opt,name=message,proto3,oneof" json:"message,omitempty"` +} + +func (x *UpdateBookingRequest) Reset() { + *x = UpdateBookingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateBookingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBookingRequest) ProtoMessage() {} + +func (x *UpdateBookingRequest) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[7] + 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 UpdateBookingRequest.ProtoReflect.Descriptor instead. +func (*UpdateBookingRequest) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateBookingRequest) GetBookingId() string { + if x != nil { + return x.BookingId + } + return "" +} + +func (x *UpdateBookingRequest) GetStatus() BookingStatus { + if x != nil { + return x.Status + } + return BookingStatus_INITIATED +} + +func (x *UpdateBookingRequest) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +type UpdateBookingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Message *string `protobuf:"bytes,2,opt,name=message,proto3,oneof" json:"message,omitempty"` +} + +func (x *UpdateBookingResponse) Reset() { + *x = UpdateBookingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateBookingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateBookingResponse) ProtoMessage() {} + +func (x *UpdateBookingResponse) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[8] + 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 UpdateBookingResponse.ProtoReflect.Descriptor instead. +func (*UpdateBookingResponse) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateBookingResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *UpdateBookingResponse) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +type GetBookingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BookingId string `protobuf:"bytes,1,opt,name=booking_id,json=bookingId,proto3" json:"booking_id,omitempty"` +} + +func (x *GetBookingRequest) Reset() { + *x = GetBookingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBookingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBookingRequest) ProtoMessage() {} + +func (x *GetBookingRequest) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[9] + 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 GetBookingRequest.ProtoReflect.Descriptor instead. +func (*GetBookingRequest) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{9} +} + +func (x *GetBookingRequest) GetBookingId() string { + if x != nil { + return x.BookingId + } + return "" +} + +type GetBookingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Booking *Booking `protobuf:"bytes,1,opt,name=booking,proto3" json:"booking,omitempty"` +} + +func (x *GetBookingResponse) Reset() { + *x = GetBookingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBookingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBookingResponse) ProtoMessage() {} + +func (x *GetBookingResponse) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[10] + 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 GetBookingResponse.ProtoReflect.Descriptor instead. +func (*GetBookingResponse) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{10} +} + +func (x *GetBookingResponse) GetBooking() *Booking { + if x != nil { + return x.Booking + } + return nil +} + +type GetBookingsByStatusRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Status BookingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=BookingStatus" json:"status,omitempty"` + Type UserType `protobuf:"varint,2,opt,name=type,proto3,enum=UserType" json:"type,omitempty"` + UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` +} + +func (x *GetBookingsByStatusRequest) Reset() { + *x = GetBookingsByStatusRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBookingsByStatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBookingsByStatusRequest) ProtoMessage() {} + +func (x *GetBookingsByStatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[11] + 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 GetBookingsByStatusRequest.ProtoReflect.Descriptor instead. +func (*GetBookingsByStatusRequest) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{11} +} + +func (x *GetBookingsByStatusRequest) GetStatus() BookingStatus { + if x != nil { + return x.Status + } + return BookingStatus_INITIATED +} + +func (x *GetBookingsByStatusRequest) GetType() UserType { + if x != nil { + return x.Type + } + return UserType_driver +} + +func (x *GetBookingsByStatusRequest) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +type DriverJourneysRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Departure *Feature `protobuf:"bytes,1,opt,name=departure,proto3" json:"departure,omitempty"` + DepartureDate *timestamp.Timestamp `protobuf:"bytes,2,opt,name=departure_date,json=departureDate,proto3" json:"departure_date,omitempty"` +} + +func (x *DriverJourneysRequest) Reset() { + *x = DriverJourneysRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DriverJourneysRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DriverJourneysRequest) ProtoMessage() {} + +func (x *DriverJourneysRequest) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[12] + 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 DriverJourneysRequest.ProtoReflect.Descriptor instead. +func (*DriverJourneysRequest) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{12} +} + +func (x *DriverJourneysRequest) GetDeparture() *Feature { + if x != nil { + return x.Departure + } + return nil +} + +func (x *DriverJourneysRequest) GetDepartureDate() *timestamp.Timestamp { + if x != nil { + return x.DepartureDate + } + return nil +} + +type DriverJourneysResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DriverJourneys []*DriverJourney `protobuf:"bytes,1,rep,name=driver_journeys,json=driverJourneys,proto3" json:"driver_journeys,omitempty"` +} + +func (x *DriverJourneysResponse) Reset() { + *x = DriverJourneysResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DriverJourneysResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DriverJourneysResponse) ProtoMessage() {} + +func (x *DriverJourneysResponse) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[13] + 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 DriverJourneysResponse.ProtoReflect.Descriptor instead. +func (*DriverJourneysResponse) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{13} +} + +func (x *DriverJourneysResponse) GetDriverJourneys() []*DriverJourney { + if x != nil { + return x.DriverJourneys + } + return nil +} + +type GetBookingsByStatusResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Booking []*Booking `protobuf:"bytes,1,rep,name=booking,proto3" json:"booking,omitempty"` +} + +func (x *GetBookingsByStatusResponse) Reset() { + *x = GetBookingsByStatusResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_solidarity_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetBookingsByStatusResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBookingsByStatusResponse) ProtoMessage() {} + +func (x *GetBookingsByStatusResponse) ProtoReflect() protoreflect.Message { + mi := &file_solidarity_api_proto_msgTypes[14] + 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 GetBookingsByStatusResponse.ProtoReflect.Descriptor instead. +func (*GetBookingsByStatusResponse) Descriptor() ([]byte, []int) { + return file_solidarity_api_proto_rawDescGZIP(), []int{14} +} + +func (x *GetBookingsByStatusResponse) GetBooking() []*Booking { + if x != nil { + return x.Booking + } + return nil +} + +var File_solidarity_api_proto protoreflect.FileDescriptor + +var file_solidarity_api_proto_rawDesc = []byte{ + 0x0a, 0x14, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x2d, 0x61, 0x70, 0x69, + 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, 0x1a, 0x1a, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x61, 0x72, + 0x69, 0x74, 0x79, 0x2d, 0x61, 0x70, 0x69, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x01, 0x0a, 0x14, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, + 0x72, 0x54, 0x72, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x09, + 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x05, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x09, 0x70, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, + 0x72, 0x12, 0x33, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x1b, 0x44, 0x72, 0x69, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, + 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, + 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4d, 0x0a, + 0x15, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x52, + 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x14, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xa5, 0x01, 0x0a, + 0x1c, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x35, 0x0a, + 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0d, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x15, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x61, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x14, + 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x22, 0x5c, 0x0a, 0x15, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, + 0x72, 0x54, 0x72, 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0x63, 0x0a, 0x1c, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, + 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x41, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x29, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0x0a, 0x15, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, + 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x88, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x49, 0x64, 0x12, + 0x26, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x0e, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x22, 0x5c, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x22, 0x32, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6b, 0x69, + 0x6e, 0x67, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x62, 0x6f, + 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, + 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x22, 0x7c, + 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x42, + 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x82, 0x01, 0x0a, + 0x15, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x52, 0x09, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x12, 0x41, + 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, + 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, 0x0d, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, + 0x65, 0x22, 0x51, 0x0a, 0x16, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, + 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0f, 0x64, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, 0x6a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, + 0x72, 0x6e, 0x65, 0x79, 0x52, 0x0e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, + 0x6e, 0x65, 0x79, 0x73, 0x22, 0x41, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, + 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x07, + 0x62, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x32, 0xf2, 0x04, 0x0a, 0x11, 0x53, 0x6f, 0x6c, 0x69, + 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, + 0x1e, 0x53, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, + 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, + 0x1c, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x41, + 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x1a, 0x1d, 0x2e, + 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, + 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, + 0x75, 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, + 0x73, 0x12, 0x1d, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x50, 0x75, 0x6e, 0x63, 0x74, 0x75, + 0x61, 0x6c, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x1a, 0x1d, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, + 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, + 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x15, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, + 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, + 0x69, 0x6e, 0x67, 0x12, 0x12, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, + 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, + 0x6e, 0x67, 0x73, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x73, + 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, + 0x6e, 0x65, 0x79, 0x73, 0x12, 0x16, 0x2e, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, + 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x44, + 0x72, 0x69, 0x76, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x50, 0x61, + 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54, 0x72, 0x69, 0x70, 0x12, 0x15, 0x2e, 0x50, 0x61, + 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54, 0x72, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x54, 0x72, + 0x69, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x45, 0x5a, 0x43, + 0x67, 0x69, 0x74, 0x2e, 0x63, 0x6f, 0x6f, 0x70, 0x67, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x63, 0x6f, + 0x6f, 0x70, 0x67, 0x6f, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x73, 0x6f, + 0x6c, 0x69, 0x64, 0x61, 0x72, 0x69, 0x74, 0x79, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_solidarity_api_proto_rawDescOnce sync.Once + file_solidarity_api_proto_rawDescData = file_solidarity_api_proto_rawDesc +) + +func file_solidarity_api_proto_rawDescGZIP() []byte { + file_solidarity_api_proto_rawDescOnce.Do(func() { + file_solidarity_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_solidarity_api_proto_rawDescData) + }) + return file_solidarity_api_proto_rawDescData +} + +var file_solidarity_api_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_solidarity_api_proto_goTypes = []interface{}{ + (*PassengerTripRequest)(nil), // 0: PassengerTripRequest + (*DriverRegularAvailabilities)(nil), // 1: DriverRegularAvailabilities + (*DriverPunctualAvailabilities)(nil), // 2: DriverPunctualAvailabilities + (*PassengerTripResponse)(nil), // 3: PassengerTripResponse + (*DriverAvailabilitiesResponse)(nil), // 4: DriverAvailabilitiesResponse + (*CreateBookingRequest)(nil), // 5: CreateBookingRequest + (*CreateBookingResponse)(nil), // 6: CreateBookingResponse + (*UpdateBookingRequest)(nil), // 7: UpdateBookingRequest + (*UpdateBookingResponse)(nil), // 8: UpdateBookingResponse + (*GetBookingRequest)(nil), // 9: GetBookingRequest + (*GetBookingResponse)(nil), // 10: GetBookingResponse + (*GetBookingsByStatusRequest)(nil), // 11: GetBookingsByStatusRequest + (*DriverJourneysRequest)(nil), // 12: DriverJourneysRequest + (*DriverJourneysResponse)(nil), // 13: DriverJourneysResponse + (*GetBookingsByStatusResponse)(nil), // 14: GetBookingsByStatusResponse + (*User)(nil), // 15: User + (*Preferences)(nil), // 16: Preferences + (*DriverRequest)(nil), // 17: DriverRequest + (*RegularAvailabilitySlot)(nil), // 18: RegularAvailabilitySlot + (*PunctualAvailabilitySlot)(nil), // 19: PunctualAvailabilitySlot + (*BookingRequest)(nil), // 20: BookingRequest + (*Booking)(nil), // 21: Booking + (BookingStatus)(0), // 22: BookingStatus + (UserType)(0), // 23: UserType + (*Feature)(nil), // 24: Feature + (*timestamp.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*DriverJourney)(nil), // 26: DriverJourney +} +var file_solidarity_api_proto_depIdxs = []int32{ + 15, // 0: PassengerTripRequest.passenger:type_name -> User + 16, // 1: PassengerTripRequest.preferences:type_name -> Preferences + 17, // 2: DriverRegularAvailabilities.driver_request:type_name -> DriverRequest + 18, // 3: DriverRegularAvailabilities.driver_availabilities:type_name -> RegularAvailabilitySlot + 17, // 4: DriverPunctualAvailabilities.driver_request:type_name -> DriverRequest + 19, // 5: DriverPunctualAvailabilities.driver_availabilities:type_name -> PunctualAvailabilitySlot + 20, // 6: CreateBookingRequest.booking:type_name -> BookingRequest + 21, // 7: CreateBookingResponse.booking:type_name -> Booking + 22, // 8: UpdateBookingRequest.status:type_name -> BookingStatus + 21, // 9: GetBookingResponse.booking:type_name -> Booking + 22, // 10: GetBookingsByStatusRequest.status:type_name -> BookingStatus + 23, // 11: GetBookingsByStatusRequest.type:type_name -> UserType + 24, // 12: DriverJourneysRequest.departure:type_name -> Feature + 25, // 13: DriverJourneysRequest.departure_date:type_name -> google.protobuf.Timestamp + 26, // 14: DriverJourneysResponse.driver_journeys:type_name -> DriverJourney + 21, // 15: GetBookingsByStatusResponse.booking:type_name -> Booking + 1, // 16: SolidarityService.SetDriverRegularAvailabilities:input_type -> DriverRegularAvailabilities + 2, // 17: SolidarityService.SetDriverPunctualAvailabilities:input_type -> DriverPunctualAvailabilities + 5, // 18: SolidarityService.CreateBooking:input_type -> CreateBookingRequest + 7, // 19: SolidarityService.UpdateBooking:input_type -> UpdateBookingRequest + 9, // 20: SolidarityService.GetBooking:input_type -> GetBookingRequest + 11, // 21: SolidarityService.GetBookingsByStatus:input_type -> GetBookingsByStatusRequest + 12, // 22: SolidarityService.DriverJourneys:input_type -> DriverJourneysRequest + 0, // 23: SolidarityService.SetPassengerTrip:input_type -> PassengerTripRequest + 4, // 24: SolidarityService.SetDriverRegularAvailabilities:output_type -> DriverAvailabilitiesResponse + 4, // 25: SolidarityService.SetDriverPunctualAvailabilities:output_type -> DriverAvailabilitiesResponse + 6, // 26: SolidarityService.CreateBooking:output_type -> CreateBookingResponse + 8, // 27: SolidarityService.UpdateBooking:output_type -> UpdateBookingResponse + 10, // 28: SolidarityService.GetBooking:output_type -> GetBookingResponse + 14, // 29: SolidarityService.GetBookingsByStatus:output_type -> GetBookingsByStatusResponse + 13, // 30: SolidarityService.DriverJourneys:output_type -> DriverJourneysResponse + 3, // 31: SolidarityService.SetPassengerTrip:output_type -> PassengerTripResponse + 24, // [24:32] is the sub-list for method output_type + 16, // [16:24] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_solidarity_api_proto_init() } +func file_solidarity_api_proto_init() { + if File_solidarity_api_proto != nil { + return + } + file_solidarity_api_types_proto_init() + if !protoimpl.UnsafeEnabled { + file_solidarity_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PassengerTripRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DriverRegularAvailabilities); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DriverPunctualAvailabilities); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PassengerTripResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DriverAvailabilitiesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateBookingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateBookingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBookingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBookingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBookingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBookingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBookingsByStatusRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DriverJourneysRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DriverJourneysResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_solidarity_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetBookingsByStatusResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_solidarity_api_proto_msgTypes[0].OneofWrappers = []interface{}{} + file_solidarity_api_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_solidarity_api_proto_msgTypes[4].OneofWrappers = []interface{}{} + file_solidarity_api_proto_msgTypes[7].OneofWrappers = []interface{}{} + file_solidarity_api_proto_msgTypes[8].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_solidarity_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_solidarity_api_proto_goTypes, + DependencyIndexes: file_solidarity_api_proto_depIdxs, + MessageInfos: file_solidarity_api_proto_msgTypes, + }.Build() + File_solidarity_api_proto = out.File + file_solidarity_api_proto_rawDesc = nil + file_solidarity_api_proto_goTypes = nil + file_solidarity_api_proto_depIdxs = nil +} diff --git a/servers/grpcapi/proto/solidarity-api.proto b/servers/grpcapi/proto/solidarity-api.proto new file mode 100644 index 0000000..5aa5ab8 --- /dev/null +++ b/servers/grpcapi/proto/solidarity-api.proto @@ -0,0 +1,88 @@ +syntax = "proto3"; +option go_package = "git.coopgo.io/coopgo-platform/solidarity-service/servers/grpc/proto"; +import "google/protobuf/timestamp.proto"; +import "solidarity-api-types.proto"; + +service SolidarityService { + rpc SetDriverRegularAvailabilities(DriverRegularAvailabilities) returns (DriverAvailabilitiesResponse) {} + rpc SetDriverPunctualAvailabilities(DriverPunctualAvailabilities) returns (DriverAvailabilitiesResponse) {} + rpc CreateBooking(CreateBookingRequest) returns (CreateBookingResponse) {} + rpc UpdateBooking(UpdateBookingRequest) returns (UpdateBookingResponse) {} + rpc GetBooking(GetBookingRequest) returns (GetBookingResponse) {} + rpc GetBookingsByStatus(GetBookingsByStatusRequest) returns (GetBookingsByStatusResponse) {} + rpc DriverJourneys(DriverJourneysRequest) returns (DriverJourneysResponse) {} + rpc SetPassengerTrip(PassengerTripRequest) returns (PassengerTripResponse) {} +} + + +message PassengerTripRequest{ + User passenger = 1; + optional Preferences preferences = 2; +} + +message DriverRegularAvailabilities{ + + DriverRequest driver_request = 1; + repeated RegularAvailabilitySlot driver_availabilities = 2; +} + +message DriverPunctualAvailabilities{ + DriverRequest driver_request = 1; + repeated PunctualAvailabilitySlot driver_availabilities = 2; +} + +message PassengerTripResponse { + bool success = 1; + optional string message = 2; +} + +message DriverAvailabilitiesResponse { + bool success = 1; + optional string message = 2; +} + +message CreateBookingRequest { + BookingRequest booking = 1; +} +message CreateBookingResponse { + Booking booking = 1; +} + +message UpdateBookingRequest { + string booking_id = 1; + BookingStatus status = 2; + optional string message = 3; +} + +message UpdateBookingResponse { + bool success = 1; + optional string message = 2; +} + +message GetBookingRequest { + string booking_id = 1; +} + + +message GetBookingResponse { + Booking booking = 1; +} + +message GetBookingsByStatusRequest{ + BookingStatus status = 1; + UserType type = 2; + string user_id = 3; +} + +message DriverJourneysRequest { + Feature departure = 1; + google.protobuf.Timestamp departure_date = 2; +} + +message DriverJourneysResponse { + repeated DriverJourney driver_journeys = 1; +} + +message GetBookingsByStatusResponse{ + repeated Booking booking = 1; +} \ No newline at end of file diff --git a/servers/grpcapi/proto/solidarity-api_grpc.pb.go b/servers/grpcapi/proto/solidarity-api_grpc.pb.go new file mode 100644 index 0000000..7fcf400 --- /dev/null +++ b/servers/grpcapi/proto/solidarity-api_grpc.pb.go @@ -0,0 +1,368 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.12.4 +// source: solidarity-api.proto + +package proto + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + SolidarityService_SetDriverRegularAvailabilities_FullMethodName = "/SolidarityService/SetDriverRegularAvailabilities" + SolidarityService_SetDriverPunctualAvailabilities_FullMethodName = "/SolidarityService/SetDriverPunctualAvailabilities" + SolidarityService_CreateBooking_FullMethodName = "/SolidarityService/CreateBooking" + SolidarityService_UpdateBooking_FullMethodName = "/SolidarityService/UpdateBooking" + SolidarityService_GetBooking_FullMethodName = "/SolidarityService/GetBooking" + SolidarityService_GetBookingsByStatus_FullMethodName = "/SolidarityService/GetBookingsByStatus" + SolidarityService_DriverJourneys_FullMethodName = "/SolidarityService/DriverJourneys" + SolidarityService_SetPassengerTrip_FullMethodName = "/SolidarityService/SetPassengerTrip" +) + +// SolidarityServiceClient is the client API for SolidarityService 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 SolidarityServiceClient interface { + SetDriverRegularAvailabilities(ctx context.Context, in *DriverRegularAvailabilities, opts ...grpc.CallOption) (*DriverAvailabilitiesResponse, error) + SetDriverPunctualAvailabilities(ctx context.Context, in *DriverPunctualAvailabilities, opts ...grpc.CallOption) (*DriverAvailabilitiesResponse, error) + CreateBooking(ctx context.Context, in *CreateBookingRequest, opts ...grpc.CallOption) (*CreateBookingResponse, error) + UpdateBooking(ctx context.Context, in *UpdateBookingRequest, opts ...grpc.CallOption) (*UpdateBookingResponse, error) + GetBooking(ctx context.Context, in *GetBookingRequest, opts ...grpc.CallOption) (*GetBookingResponse, error) + GetBookingsByStatus(ctx context.Context, in *GetBookingsByStatusRequest, opts ...grpc.CallOption) (*GetBookingsByStatusResponse, error) + DriverJourneys(ctx context.Context, in *DriverJourneysRequest, opts ...grpc.CallOption) (*DriverJourneysResponse, error) + SetPassengerTrip(ctx context.Context, in *PassengerTripRequest, opts ...grpc.CallOption) (*PassengerTripResponse, error) +} + +type solidarityServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSolidarityServiceClient(cc grpc.ClientConnInterface) SolidarityServiceClient { + return &solidarityServiceClient{cc} +} + +func (c *solidarityServiceClient) SetDriverRegularAvailabilities(ctx context.Context, in *DriverRegularAvailabilities, opts ...grpc.CallOption) (*DriverAvailabilitiesResponse, error) { + out := new(DriverAvailabilitiesResponse) + err := c.cc.Invoke(ctx, SolidarityService_SetDriverRegularAvailabilities_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solidarityServiceClient) SetDriverPunctualAvailabilities(ctx context.Context, in *DriverPunctualAvailabilities, opts ...grpc.CallOption) (*DriverAvailabilitiesResponse, error) { + out := new(DriverAvailabilitiesResponse) + err := c.cc.Invoke(ctx, SolidarityService_SetDriverPunctualAvailabilities_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solidarityServiceClient) CreateBooking(ctx context.Context, in *CreateBookingRequest, opts ...grpc.CallOption) (*CreateBookingResponse, error) { + out := new(CreateBookingResponse) + err := c.cc.Invoke(ctx, SolidarityService_CreateBooking_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solidarityServiceClient) UpdateBooking(ctx context.Context, in *UpdateBookingRequest, opts ...grpc.CallOption) (*UpdateBookingResponse, error) { + out := new(UpdateBookingResponse) + err := c.cc.Invoke(ctx, SolidarityService_UpdateBooking_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solidarityServiceClient) GetBooking(ctx context.Context, in *GetBookingRequest, opts ...grpc.CallOption) (*GetBookingResponse, error) { + out := new(GetBookingResponse) + err := c.cc.Invoke(ctx, SolidarityService_GetBooking_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solidarityServiceClient) GetBookingsByStatus(ctx context.Context, in *GetBookingsByStatusRequest, opts ...grpc.CallOption) (*GetBookingsByStatusResponse, error) { + out := new(GetBookingsByStatusResponse) + err := c.cc.Invoke(ctx, SolidarityService_GetBookingsByStatus_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solidarityServiceClient) DriverJourneys(ctx context.Context, in *DriverJourneysRequest, opts ...grpc.CallOption) (*DriverJourneysResponse, error) { + out := new(DriverJourneysResponse) + err := c.cc.Invoke(ctx, SolidarityService_DriverJourneys_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *solidarityServiceClient) SetPassengerTrip(ctx context.Context, in *PassengerTripRequest, opts ...grpc.CallOption) (*PassengerTripResponse, error) { + out := new(PassengerTripResponse) + err := c.cc.Invoke(ctx, SolidarityService_SetPassengerTrip_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SolidarityServiceServer is the server API for SolidarityService service. +// All implementations must embed UnimplementedSolidarityServiceServer +// for forward compatibility +type SolidarityServiceServer interface { + SetDriverRegularAvailabilities(context.Context, *DriverRegularAvailabilities) (*DriverAvailabilitiesResponse, error) + SetDriverPunctualAvailabilities(context.Context, *DriverPunctualAvailabilities) (*DriverAvailabilitiesResponse, error) + CreateBooking(context.Context, *CreateBookingRequest) (*CreateBookingResponse, error) + UpdateBooking(context.Context, *UpdateBookingRequest) (*UpdateBookingResponse, error) + GetBooking(context.Context, *GetBookingRequest) (*GetBookingResponse, error) + GetBookingsByStatus(context.Context, *GetBookingsByStatusRequest) (*GetBookingsByStatusResponse, error) + DriverJourneys(context.Context, *DriverJourneysRequest) (*DriverJourneysResponse, error) + SetPassengerTrip(context.Context, *PassengerTripRequest) (*PassengerTripResponse, error) + mustEmbedUnimplementedSolidarityServiceServer() +} + +// UnimplementedSolidarityServiceServer must be embedded to have forward compatible implementations. +type UnimplementedSolidarityServiceServer struct { +} + +func (UnimplementedSolidarityServiceServer) SetDriverRegularAvailabilities(context.Context, *DriverRegularAvailabilities) (*DriverAvailabilitiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetDriverRegularAvailabilities not implemented") +} +func (UnimplementedSolidarityServiceServer) SetDriverPunctualAvailabilities(context.Context, *DriverPunctualAvailabilities) (*DriverAvailabilitiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetDriverPunctualAvailabilities not implemented") +} +func (UnimplementedSolidarityServiceServer) CreateBooking(context.Context, *CreateBookingRequest) (*CreateBookingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateBooking not implemented") +} +func (UnimplementedSolidarityServiceServer) UpdateBooking(context.Context, *UpdateBookingRequest) (*UpdateBookingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateBooking not implemented") +} +func (UnimplementedSolidarityServiceServer) GetBooking(context.Context, *GetBookingRequest) (*GetBookingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBooking not implemented") +} +func (UnimplementedSolidarityServiceServer) GetBookingsByStatus(context.Context, *GetBookingsByStatusRequest) (*GetBookingsByStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBookingsByStatus not implemented") +} +func (UnimplementedSolidarityServiceServer) DriverJourneys(context.Context, *DriverJourneysRequest) (*DriverJourneysResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DriverJourneys not implemented") +} +func (UnimplementedSolidarityServiceServer) SetPassengerTrip(context.Context, *PassengerTripRequest) (*PassengerTripResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetPassengerTrip not implemented") +} +func (UnimplementedSolidarityServiceServer) mustEmbedUnimplementedSolidarityServiceServer() {} + +// UnsafeSolidarityServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SolidarityServiceServer will +// result in compilation errors. +type UnsafeSolidarityServiceServer interface { + mustEmbedUnimplementedSolidarityServiceServer() +} + +func RegisterSolidarityServiceServer(s grpc.ServiceRegistrar, srv SolidarityServiceServer) { + s.RegisterService(&SolidarityService_ServiceDesc, srv) +} + +func _SolidarityService_SetDriverRegularAvailabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DriverRegularAvailabilities) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolidarityServiceServer).SetDriverRegularAvailabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolidarityService_SetDriverRegularAvailabilities_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolidarityServiceServer).SetDriverRegularAvailabilities(ctx, req.(*DriverRegularAvailabilities)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolidarityService_SetDriverPunctualAvailabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DriverPunctualAvailabilities) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolidarityServiceServer).SetDriverPunctualAvailabilities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolidarityService_SetDriverPunctualAvailabilities_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolidarityServiceServer).SetDriverPunctualAvailabilities(ctx, req.(*DriverPunctualAvailabilities)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolidarityService_CreateBooking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateBookingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolidarityServiceServer).CreateBooking(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolidarityService_CreateBooking_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolidarityServiceServer).CreateBooking(ctx, req.(*CreateBookingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolidarityService_UpdateBooking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateBookingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolidarityServiceServer).UpdateBooking(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolidarityService_UpdateBooking_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolidarityServiceServer).UpdateBooking(ctx, req.(*UpdateBookingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolidarityService_GetBooking_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBookingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolidarityServiceServer).GetBooking(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolidarityService_GetBooking_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolidarityServiceServer).GetBooking(ctx, req.(*GetBookingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolidarityService_GetBookingsByStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetBookingsByStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolidarityServiceServer).GetBookingsByStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolidarityService_GetBookingsByStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolidarityServiceServer).GetBookingsByStatus(ctx, req.(*GetBookingsByStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolidarityService_DriverJourneys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DriverJourneysRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolidarityServiceServer).DriverJourneys(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolidarityService_DriverJourneys_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolidarityServiceServer).DriverJourneys(ctx, req.(*DriverJourneysRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SolidarityService_SetPassengerTrip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PassengerTripRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SolidarityServiceServer).SetPassengerTrip(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SolidarityService_SetPassengerTrip_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SolidarityServiceServer).SetPassengerTrip(ctx, req.(*PassengerTripRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SolidarityService_ServiceDesc is the grpc.ServiceDesc for SolidarityService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SolidarityService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "SolidarityService", + HandlerType: (*SolidarityServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SetDriverRegularAvailabilities", + Handler: _SolidarityService_SetDriverRegularAvailabilities_Handler, + }, + { + MethodName: "SetDriverPunctualAvailabilities", + Handler: _SolidarityService_SetDriverPunctualAvailabilities_Handler, + }, + { + MethodName: "CreateBooking", + Handler: _SolidarityService_CreateBooking_Handler, + }, + { + MethodName: "UpdateBooking", + Handler: _SolidarityService_UpdateBooking_Handler, + }, + { + MethodName: "GetBooking", + Handler: _SolidarityService_GetBooking_Handler, + }, + { + MethodName: "GetBookingsByStatus", + Handler: _SolidarityService_GetBookingsByStatus_Handler, + }, + { + MethodName: "DriverJourneys", + Handler: _SolidarityService_DriverJourneys_Handler, + }, + { + MethodName: "SetPassengerTrip", + Handler: _SolidarityService_SetPassengerTrip_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "solidarity-api.proto", +} diff --git a/servers/grpcapi/server/account.go b/servers/grpcapi/server/account.go new file mode 100644 index 0000000..6b5da8b --- /dev/null +++ b/servers/grpcapi/server/account.go @@ -0,0 +1,35 @@ +package grpcserver + +import ( + "context" + grpcproto "git.coopgo.io/coopgo-apps/silvermobi/servers/grpcapi/proto" + "github.com/rs/zerolog/log" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "strings" +) + +func (s SilvermobiGRPCService) GetAccountInfo(ctx context.Context, req *grpcproto.AccountInfoRequest) (res *grpcproto.AccountInfoResponse, err error) { + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return nil, status.Errorf(codes.Unauthenticated, "Missing metadata") + } + authHeader, ok := md["authorization"] + if !ok || len(authHeader) == 0 { + return nil, status.Errorf(codes.Unauthenticated, "Missing authorization header") + } + tokenString := strings.TrimPrefix(authHeader[0], "Bearer ") + id := ExtractIdFromToken(tokenString) + account, err := s.Handler.GetAccountInfos(context.Background(), id) + log.Info(). + Str("ID", account.ID). + Msg("GetAccountInfo") + if err != nil { + return nil, err + } + return &grpcproto.AccountInfoResponse{ + FirstName: account.FirstName, + LastName: account.LastName, + }, nil +} diff --git a/servers/grpcapi/server/firebase.go b/servers/grpcapi/server/firebase.go new file mode 100644 index 0000000..feff3c3 --- /dev/null +++ b/servers/grpcapi/server/firebase.go @@ -0,0 +1,46 @@ +package grpcserver + +import ( + "context" + grpcproto "git.coopgo.io/coopgo-apps/silvermobi/servers/grpcapi/proto" + "github.com/rs/zerolog/log" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "strings" +) + +func (s SilvermobiGRPCService) PutFirebaseToken(ctx context.Context, req *grpcproto.FirebaseTokenRequest) (resp *grpcproto.FirebaseTokenResponse, err error) { + + if req.Token == "" || req.DevicePlatform == "" { + return &grpcproto.FirebaseTokenResponse{ + Result: false, + }, nil + } + md, ok := metadata.FromIncomingContext(ctx) + if !ok { + return &grpcproto.FirebaseTokenResponse{ + Result: false, + }, status.Errorf(codes.Unauthenticated, "Missing metadata") + } + authHeader, ok := md["authorization"] + if !ok || len(authHeader) == 0 { + return &grpcproto.FirebaseTokenResponse{ + Result: false, + }, status.Errorf(codes.Unauthenticated, "Missing authorization header") + } + tokenString := strings.TrimPrefix(authHeader[0], "Bearer ") + id := ExtractIdFromToken(tokenString) + log.Info(). + Str("User ID", id). + Msg("PutFirebaseToken") + err = s.Handler.PutFirebase(context.Background(), id, req.Token, req.DevicePlatform) + if err != nil { + return &grpcproto.FirebaseTokenResponse{ + Result: false, + }, status.Errorf(codes.Unknown, "Database error") + } + return &grpcproto.FirebaseTokenResponse{ + Result: true, + }, nil +} diff --git a/servers/grpcapi/server/geo.go b/servers/grpcapi/server/geo.go new file mode 100644 index 0000000..c56d198 --- /dev/null +++ b/servers/grpcapi/server/geo.go @@ -0,0 +1,99 @@ +package grpcserver + +import ( + "context" + grpcproto "git.coopgo.io/coopgo-apps/silvermobi/servers/grpcapi/proto" + "github.com/google/uuid" + "github.com/paulmach/orb/geojson" + "github.com/rs/zerolog/log" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "io" +) + +func (s SilvermobiGRPCService) GeoAutocomplete(ctx context.Context, in *grpcproto.GeoAutocompleteRequest) (resp *grpcproto.GeoAutocompleteResponse, err error) { + log.Info(). + Str("text", in.Text). + Msg("GeoAutocompleteRequest") + requestid := uuid.NewString() + log.Debug().Str("requestid", requestid).Msg("GRPC GeoAutocomplete start") + + if err == io.EOF { + log.Debug().Str("requestid", requestid).Msg("GRPC GeoAutocomplete EOF") + return nil, err + } + + if err != nil { + log.Error().Str("requestid", requestid).Err(err).Msg("GRPC GeoAutocomplete other error") + return nil, err + } + + results, err := s.Handler.GeoAutocomplete(in.Text, in.Lat, in.Lon) + if err != nil { + log.Error().Str("requestid", requestid).Err(err).Msg("GRPC GeoAutocomplete geocoding error") + return nil, err + } + + rawfc, err := results.MarshalJSON() + if err != nil { + log.Error().Str("requestid", requestid).Err(err).Msg("GRPC GeoAutocomplete protocol buffer conversion error") + return nil, err + } + + resp = &grpcproto.GeoAutocompleteResponse{ + FeatureCollection: &grpcproto.GeoAutocompleteResponse_FeatureCollectionRaw{ + FeatureCollectionRaw: string(rawfc), + }, + } + + return resp, nil + +} + +func (s SilvermobiGRPCService) GeoRoute(ctx context.Context, req *grpcproto.GeoRouteRequest) (*grpcproto.GeoRouteResponse, error) { + locations_raw, ok := req.Locations.(*grpcproto.GeoRouteRequest_LocationsRaw) + if !ok { + return nil, status.Errorf(codes.InvalidArgument, "could not read departure") + } + + locations, err := geojson.UnmarshalFeatureCollection([]byte(locations_raw.LocationsRaw)) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + route, err := s.Handler.GeoRoute(*locations) + if err != nil { + return nil, err + } + + return &grpcproto.GeoRouteResponse{ + Polyline: route.Polyline.String(), + }, nil +} + +func (s SilvermobiGRPCService) GeoRouteWithReturn(ctx context.Context, req *grpcproto.GeoRouteWithReturnRequest) (*grpcproto.GeoRouteWithReturnResponse, error) { + locations_raw, ok := req.Locations.(*grpcproto.GeoRouteWithReturnRequest_LocationsRaw) + if !ok { + return nil, status.Errorf(codes.InvalidArgument, "could not read departure") + } + + locations, err := geojson.UnmarshalFeatureCollection([]byte(locations_raw.LocationsRaw)) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + route, err := s.Handler.GeoRoute(*locations) + if err != nil { + return nil, err + } + + return_route, err := s.Handler.GeoReturnRoute(*locations) + if err != nil { + return nil, err + } + + return &grpcproto.GeoRouteWithReturnResponse{ + Polyline: route.Polyline.String(), + ReturnPolyline: return_route.Polyline.String(), + }, nil +} diff --git a/servers/grpcapi/server/onboarding_validation.go b/servers/grpcapi/server/onboarding_validation.go index a714b25..a234897 100644 --- a/servers/grpcapi/server/onboarding_validation.go +++ b/servers/grpcapi/server/onboarding_validation.go @@ -4,7 +4,9 @@ import ( "context" "encoding/base64" "encoding/json" + "fmt" grpcproto "git.coopgo.io/coopgo-apps/silvermobi/servers/grpcapi/proto" + "github.com/rs/zerolog/log" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" @@ -24,6 +26,9 @@ func (s SilvermobiGRPCService) SetPhoneNumber(ctx context.Context, req *grpcprot } tokenString := strings.TrimPrefix(authHeader[0], "Bearer ") id := ExtractIdFromToken(tokenString) + log.Info(). + Str("User ID", id). + Msg("SetPhoneNumber") if err = s.Handler.UpdatePhoneNumber( context.Background(), id, @@ -40,13 +45,15 @@ func (s SilvermobiGRPCService) VerifyPhoneNumber(ctx context.Context, req *grpcp if !ok { return nil, status.Errorf(codes.Unauthenticated, "Missing metadata") } - authHeader, ok := md["authorization"] if !ok || len(authHeader) == 0 { return nil, status.Errorf(codes.Unauthenticated, "Missing authorization header") } tokenString := strings.TrimPrefix(authHeader[0], "Bearer ") id := ExtractIdFromToken(tokenString) + log.Info(). + Str("User ID", id). + Msg("VerifyPhoneNumber") if err = s.Handler.VerifyPhoneNumber( context.Background(), id, @@ -71,6 +78,9 @@ func (s SilvermobiGRPCService) SetBirthDate(ctx context.Context, req *grpcproto. } tokenString := strings.TrimPrefix(authHeader[0], "Bearer ") id := ExtractIdFromToken(tokenString) + log.Info(). + Str("User ID", id). + Msg("SetBirthDate") birthdate := time.Unix(req.Birthdate.Seconds, int64(req.Birthdate.Nanos)).UTC() birthdateString := birthdate.Format("2006-01-02T15:04:05Z") if err = s.Handler.UpdateBirthDate(ctx, id, birthdateString); err != nil { @@ -93,6 +103,9 @@ func (s SilvermobiGRPCService) SetAccountType(ctx context.Context, req *grpcprot } tokenString := strings.TrimPrefix(authHeader[0], "Bearer ") id := ExtractIdFromToken(tokenString) + log.Info(). + Str("User ID", id). + Msg("SetAccountType") if req.GetType() != grpcproto.AccountTypeRequest_PASSENGER && req.GetType() != grpcproto.AccountTypeRequest_DRIVER { return nil, status.Errorf(codes.InvalidArgument, "Type should be PASSENGER or DRIVER") } @@ -116,6 +129,9 @@ func (s SilvermobiGRPCService) GetAccountType(ctx context.Context, req *grpcprot } tokenString := strings.TrimPrefix(authHeader[0], "Bearer ") id := ExtractIdFromToken(tokenString) + log.Info(). + Str("User ID", id). + Msg("GetAccountType") if req.Request == nil || !*req.Request { return nil, status.Errorf(codes.InvalidArgument, "request arg should be true") } @@ -146,13 +162,13 @@ func (s SilvermobiGRPCService) GetValidation(ctx context.Context, req *grpcproto if !ok { return nil, status.Errorf(codes.Unauthenticated, "Missing metadata") } - authHeader, ok := md["authorization"] if !ok || len(authHeader) == 0 { return nil, status.Errorf(codes.Unauthenticated, "Missing authorization header") } tokenString := strings.TrimPrefix(authHeader[0], "Bearer ") id := ExtractIdFromToken(tokenString) + fmt.Println(id) phone_validation, birth_validation, type_validation, err := s.Handler.CheckValidation(ctx, id) if err != nil { return nil, err diff --git a/servers/grpcapi/server/silvermobi-grpc-server.go b/servers/grpcapi/server/silvermobi-grpc-server.go index 0f446d9..2a27b59 100644 --- a/servers/grpcapi/server/silvermobi-grpc-server.go +++ b/servers/grpcapi/server/silvermobi-grpc-server.go @@ -2,6 +2,7 @@ package grpcserver import ( "context" + "fmt" "git.coopgo.io/coopgo-apps/silvermobi/handler" grpcproto "git.coopgo.io/coopgo-apps/silvermobi/servers/grpcapi/proto" "github.com/golang-jwt/jwt/v4" @@ -28,6 +29,9 @@ func NoAuth(method string) bool { "/SilvermobiGRPC/UpdatePassword", "/SilvermobiGRPC/AuthRegister", "/SilvermobiGRPC/AuthLogin", + "/SilvermobiGRPC/GeoAutocomplete", + "/SilvermobiGRPC/GeoRouteWithReturn", + "/SilvermobiGRPC/GeoRoute", } for _, m := range noAuthMethods { @@ -53,6 +57,7 @@ func UnaryAuthServerInterceptor(authFunc grpc_auth.AuthFunc) grpc.UnaryServerInt return handler(newCtx, req) } } + func StreamAuthServerInterceptor(authFunc grpc_auth.AuthFunc) grpc.StreamServerInterceptor { return func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error { if NoAuth(info.FullMethod) { @@ -78,6 +83,28 @@ type SilvermobiGRPCService struct { grpcproto.UnimplementedSilvermobiGRPCServer } +type SolidarityService struct { + Config *viper.Viper + Handler *handler.SilvermobiHandler + SolidarityClient grpcproto.SolidarityServiceClient + grpcproto.UnimplementedSolidarityServiceServer // Add this client +} + +func NewSolidarityService(cfg *viper.Viper, handler *handler.SilvermobiHandler) SolidarityService { + solidarityServiceAddress := cfg.GetString("solidarity_service.address") + conn, err := grpc.Dial(solidarityServiceAddress, grpc.WithInsecure()) + if err != nil { + log.Fatal().Err(err) + } + + solidarityClient := grpcproto.NewSolidarityServiceClient(conn) + return SolidarityService{ + Config: cfg, + Handler: handler, + SolidarityClient: solidarityClient, + } +} + func NewSilvermobiGRPCService(cfg *viper.Viper, handler *handler.SilvermobiHandler) SilvermobiGRPCService { return SilvermobiGRPCService{ Config: cfg, @@ -87,7 +114,7 @@ func NewSilvermobiGRPCService(cfg *viper.Viper, handler *handler.SilvermobiHandl func Run(done chan error, cfg *viper.Viper, handler *handler.SilvermobiHandler) { var ( - address = "0.0.0.0:" + cfg.GetString("services.external.grpc.port") + address = cfg.GetString("services.external.grpc.ip") + ":" + cfg.GetString("services.external.grpc.port") jwt_secret = cfg.GetString("identification.local.jwt_secret") ) @@ -104,8 +131,11 @@ func Run(done chan error, cfg *viper.Viper, handler *handler.SilvermobiHandler) )), ) - service := NewSilvermobiGRPCService(cfg, handler) - grpcproto.RegisterSilvermobiGRPCServer(server, service) + solidarity_service := NewSolidarityService(cfg, handler) + + silvermobi_service := NewSilvermobiGRPCService(cfg, handler) + grpcproto.RegisterSilvermobiGRPCServer(server, silvermobi_service) + grpcproto.RegisterSolidarityServiceServer(server, &solidarity_service) l, err := net.Listen("tcp", address) if err != nil { log.Fatal().Err(err) @@ -128,6 +158,7 @@ func GRPCAuthFunc(jwtKey string) grpc_auth.AuthFunc { return []byte(jwtKey), nil }) if err != nil || !token.Valid { + fmt.Println(err) return nil, status.Errorf(codes.Unauthenticated, "Invalid or expired token") } ctx = context.WithValue(ctx, contextKeyUser, claims["sub"].(string)) diff --git a/servers/grpcapi/server/solidarity-service.go b/servers/grpcapi/server/solidarity-service.go new file mode 100644 index 0000000..a7ee833 --- /dev/null +++ b/servers/grpcapi/server/solidarity-service.go @@ -0,0 +1,77 @@ +package grpcserver + +import ( + "context" + "fmt" + "git.coopgo.io/coopgo-apps/silvermobi/servers/grpcapi/proto" + "github.com/rs/zerolog/log" +) + +func (s *SolidarityService) SetDriverRegularAvailabilities(ctx context.Context, req *proto.DriverRegularAvailabilities) (resp *proto.DriverAvailabilitiesResponse, err error) { + log.Info(). + Str("Driver ID", req.DriverRequest.Driver.Id). + Msg("SetDriverRegularAvailabilities") + resp, err = s.SolidarityClient.SetDriverRegularAvailabilities(ctx, req) + return resp, err +} + +func (s *SolidarityService) SetDriverPunctualAvailabilities(ctx context.Context, req *proto.DriverPunctualAvailabilities) (resp *proto.DriverAvailabilitiesResponse, err error) { + log.Info(). + Str("Driver ID", req.DriverRequest.Driver.Id). + Msg("SetDriverRegularAvailabilities") + resp, err = s.SolidarityClient.SetDriverPunctualAvailabilities(ctx, req) + return resp, err +} + +func (s *SolidarityService) CreateBooking(ctx context.Context, req *proto.CreateBookingRequest) (resp *proto.CreateBookingResponse, err error) { + log.Info(). + Str("Booking ID", req.Booking.Id). + Msg("CreateBooking") + resp, err = s.SolidarityClient.CreateBooking(ctx, req) + if err == nil { + _ = s.Handler.SendNotification(req.Booking.DriverId, "Silvermobi", "Vous avez reçu une demande de trajet. \n Pour plus de détails, veuillez consulter l'interface \"Mes Trajets\" dans l'application SilverMobi.") + err = s.Handler.SendEmail(req.Booking.DriverId, "Silvermobi", "Vous avez reçu une demande de trajet. \n Pour plus de détails, veuillez consulter l'interface \"Mes Trajets\" dans l'application SilverMobi.") + fmt.Println(err) + } + return resp, err +} + +func (s *SolidarityService) UpdateBooking(ctx context.Context, req *proto.UpdateBookingRequest) (resp *proto.UpdateBookingResponse, err error) { + log.Info(). + Str("Booking ID", req.BookingId). + Msg("UpdateBooking") + resp, err = s.SolidarityClient.UpdateBooking(ctx, req) + return resp, err +} + +func (s *SolidarityService) GetBooking(ctx context.Context, req *proto.GetBookingRequest) (resp *proto.GetBookingResponse, err error) { + log.Info(). + Str("Booking ID", req.BookingId). + Msg("GetBooking") + resp, err = s.SolidarityClient.GetBooking(ctx, req) + return resp, err +} + +func (s *SolidarityService) GetBookingsByStatus(ctx context.Context, req *proto.GetBookingsByStatusRequest) (resp *proto.GetBookingsByStatusResponse, err error) { + log.Info(). + Str("User ID", req.UserId). + Msg("GetBookingByStatus") + resp, err = s.SolidarityClient.GetBookingsByStatus(ctx, req) + return resp, err +} + +func (s *SolidarityService) DriverJourneys(ctx context.Context, req *proto.DriverJourneysRequest) (resp *proto.DriverJourneysResponse, err error) { + log.Info(). + Str("Address", req.Departure.Address). + Msg("DriverJourneys") + resp, err = s.SolidarityClient.DriverJourneys(ctx, req) + return resp, err +} + +func (s *SolidarityService) SetPassengerTrip(ctx context.Context, req *proto.PassengerTripRequest) (resp *proto.PassengerTripResponse, err error) { + log.Info(). + Str("Passenger ID", req.Passenger.Id). + Msg("SetPassengerTrip") + resp, err = s.SolidarityClient.SetPassengerTrip(ctx, req) + return resp, err +} diff --git a/services/mobility-accounts.go b/services/mobility-accounts.go index 7e3e7f8..ff567f6 100644 --- a/services/mobility-accounts.go +++ b/services/mobility-accounts.go @@ -208,17 +208,26 @@ func (s MobilityAccountService) ToAccountModel(account ma.Account) *models.Accou if !ok { accountType = "" } + phone_number, ok := account.Data["phone_number"].(string) + if !ok { + phone_number = "" + } + email, ok := account.Data["email"].(string) + if !ok { + email = "" + } return &models.Account{ ID: account.ID, FirstName: first_name, LastName: last_name, + Email: email, BirthDate: birth_date, Type: accountType, LocalCredentials: models.LocalCredentials{ Email: account.Authentication.Local.Email, EmailVerified: account.Authentication.Local.EmailValidation.Validated, EmailValidationCode: account.Authentication.Local.EmailValidation.ValidationCode, - PhoneNumber: account.Authentication.Local.PhoneNumber, + PhoneNumber: phone_number, PhoneNumberVerified: account.Authentication.Local.PhoneNumberValidation.Validated, }, } diff --git a/services/push.go b/services/push.go index 313879d..1dbc869 100644 --- a/services/push.go +++ b/services/push.go @@ -2,6 +2,7 @@ package services import ( "context" + "google.golang.org/protobuf/types/known/structpb" "github.com/appleboy/gorush/rpc/proto" "github.com/rs/zerolog/log" @@ -26,6 +27,8 @@ type Notification struct { Recipients []string Message string Title string + Data *structpb.Struct + ID string } type PushService struct { @@ -53,6 +56,8 @@ func (s *PushService) Send(notification Notification) error { Msg("Send notification") resp, err := s.Client.Send(context.Background(), &proto.NotificationRequest{ + Data: notification.Data, + ID: notification.ID, Platform: notification.Platform, Tokens: notification.Recipients, Message: notification.Message, diff --git a/services/services.go b/services/services.go index da62b12..4fdc9b6 100644 --- a/services/services.go +++ b/services/services.go @@ -1,6 +1,8 @@ package services import ( + "git.coopgo.io/coopgo-platform/geocode" + routing "git.coopgo.io/coopgo-platform/routing-service" "github.com/rs/zerolog/log" "github.com/spf13/viper" ) @@ -8,12 +10,18 @@ import ( type ServicesHandler struct { MobilityAccounts MobilityAccountService Push *PushService + Geocoder geocode.Geocoder + Routing routing.RoutingService } func NewServicesHandler(cfg *viper.Viper) (*ServicesHandler, error) { var ( mobilityAccountsDial = cfg.GetString("services.internal.mobility_accounts.dial") pushDial = cfg.GetString("services.internal.push.dial") + geocoder_type = cfg.GetString("geocoder.type") + pelias_base_url = cfg.GetString("geocoder.pelias.base_url") + routing_service_type = cfg.GetString("routing.type") + valhalla_base_url = cfg.GetString("routing.valhalla.base_url") ) mobilityAccounts, err := NewMobilityAccountService(mobilityAccountsDial) if err != nil { @@ -25,9 +33,22 @@ func NewServicesHandler(cfg *viper.Viper) (*ServicesHandler, error) { log.Fatal().Err(err).Msg("Could not connect to Push Notifications Service") return nil, err } + geocoder, err := geocode.NewGeocoder(geocoder_type, pelias_base_url) + if err != nil { + log.Fatal().Err(err).Msg("Could not initiate the Geocoder service") + return nil, err + } + + routing, err := routing.NewRoutingService(routing_service_type, valhalla_base_url) + if err != nil { + log.Fatal().Err(err).Msg("Could not initiate the routing service") + return nil, err + } return &ServicesHandler{ MobilityAccounts: mobilityAccounts, Push: push, + Geocoder: geocoder, + Routing: routing, }, nil } diff --git a/storage/kvhandler.go b/storage/kvhandler.go deleted file mode 100644 index cecc924..0000000 --- a/storage/kvhandler.go +++ /dev/null @@ -1,15 +0,0 @@ -package storage - -import ( - "github.com/spf13/viper" -) - -type KVHandler interface { - Put(k string, v any) error - Get(k string) (any, error) - Delete(k string) error -} - -func NewKVHandler(cfg *viper.Viper) (KVHandler, error) { - return NewRedisHandler(cfg) -} diff --git a/storage/postgresql.go b/storage/postgresql.go new file mode 100644 index 0000000..626b60d --- /dev/null +++ b/storage/postgresql.go @@ -0,0 +1,88 @@ +package storage + +import ( + "database/sql" + "fmt" + "github.com/google/uuid" + _ "github.com/lib/pq" + "github.com/rs/zerolog/log" + "github.com/spf13/viper" + "strconv" + "strings" +) + +type PostgresqlStorage struct { + DbConnection *sql.DB + Schema string + Tables map[string]string +} + +func NewPostgresqlStorage(cfg *viper.Viper) (PostgresqlStorage, error) { + var ( + host = cfg.GetString("storage.db.psql.host") + port = cfg.GetString("storage.db.psql.port") + user = cfg.GetString("storage.db.psql.user") + password = cfg.GetString("storage.db.psql.password") + dbname = cfg.GetString("storage.db.psql.dbname") + sslmode = cfg.GetString("storage.db.psql.sslmode") + pg_schema = cfg.GetString("storage.db.psql.schema") + pgtables_users_firebase = cfg.GetString("storage.db.psql.tables.users_firebase") + ) + portInt, _ := strconv.Atoi(port) + psqlconn := fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=%s", host, portInt, user, password, dbname, sslmode) + db, err := sql.Open("postgres", psqlconn) + if err != nil { + log.Error().Err(err).Msg("opening connection to postgresql failed") + return PostgresqlStorage{}, fmt.Errorf("connection to postgresql failed") + } + err = db.Ping() + if err != nil { + log.Error().Err(err).Msg("ping to postgresql failed") + return PostgresqlStorage{}, fmt.Errorf("connection to postgresql database failed") + } + return PostgresqlStorage{ + DbConnection: db, + Schema: pg_schema, + Tables: map[string]string{ + "users_firebase": fmt.Sprintf("%s.%s", pg_schema, pgtables_users_firebase), + }, + }, nil +} + +func (s PostgresqlStorage) CreateFirebaseToken(user_id string, fcm_token string, device_platform string) (err error) { + _, err = uuid.Parse(user_id) + if err != nil { + log.Error().Err(err).Msg("Postgresql Storage CreateFirebaseToken invalid User ID") + return err + } + _, err = s.DbConnection.Exec(fmt.Sprintf("INSERT INTO %s (user_id , fcm_token , device_platform) VALUES($1,$2,$3)", s.Tables["users_firebase"]), + user_id, + fcm_token, + device_platform) + if err != nil { + if strings.Contains(err.Error(), "duplicate key") { + _ = s.UpdateFirebaseToken(user_id, device_platform, fcm_token) + } + } + + return nil +} +func (s PostgresqlStorage) GetFirebaseToken(user_id string) (fcm string, device_platform string, err error) { + err = s.DbConnection.QueryRow(fmt.Sprintf("SELECT fcm_token , device_platform FROM %s WHERE user_id = $1", s.Tables["users_firebase"]), user_id). + Scan( + &fcm, + &device_platform, + ) + if err != nil { + return "", "", err + } + return fcm, device_platform, nil +} +func (s PostgresqlStorage) UpdateFirebaseToken(user_id string, fcm_token string, device_platform string) error { + query := fmt.Sprintf("UPDATE %s SET fcm_token = $1 device_platform = $2 WHERE user_id = $3", s.Tables["users_firebase"]) + _, err := s.DbConnection.Exec(query, fcm_token, device_platform, user_id) + if err != nil { + return err + } + return nil +} diff --git a/storage/postgresql/schema.hcl b/storage/postgresql/schema.hcl new file mode 100644 index 0000000..9a1d64c --- /dev/null +++ b/storage/postgresql/schema.hcl @@ -0,0 +1,21 @@ +schema "silvermobi_backend" {} + +table "users_firebase" { + schema = schema.silvermobi_backend + column "user_id" { + null = false + type = uuid + } + column "fcm_token" { + null = false + type = varchar(300) + } + columns "device_platform" { + null = false + type = text + } + primary_key { + columns = [column.user_id] + } + +} diff --git a/storage/redis.go b/storage/redis.go deleted file mode 100644 index f791fc1..0000000 --- a/storage/redis.go +++ /dev/null @@ -1,43 +0,0 @@ -package storage - -import ( - "context" - "github.com/go-redis/redis/v9" - "github.com/spf13/viper" -) - -type RedisHandler struct { - client *redis.Client -} - -func NewRedisHandler(cfg *viper.Viper) (*RedisHandler, error) { - redisClient := redis.NewClient(&redis.Options{ - Addr: cfg.GetString("storage.kv.redis.addr"), - DB: cfg.GetInt("storage.kv.redis.db"), - }) - - _, err := redisClient.Ping(context.Background()).Result() - if err != nil { - return nil, err - } - - return &RedisHandler{ - client: redisClient, - }, nil -} - -func (rh *RedisHandler) Put(k string, v any) error { - return rh.client.Set(context.Background(), k, v, 0).Err() -} - -func (rh *RedisHandler) Get(k string) (any, error) { - value, err := rh.client.Get(context.Background(), k).Result() - if err != nil { - return nil, err - } - return value, nil -} - -func (rh *RedisHandler) Delete(k string) error { - return rh.client.Del(context.Background(), k).Err() -} diff --git a/storage/storage.go b/storage/storage.go new file mode 100644 index 0000000..7b2f83e --- /dev/null +++ b/storage/storage.go @@ -0,0 +1,25 @@ +package storage + +import ( + "fmt" + "github.com/spf13/viper" +) + +type Storage interface { + CreateFirebaseToken(user_id string, fcm_token string, device_platform string) (err error) + UpdateFirebaseToken(user_id string, fcm_token string, device_platform string) error + GetFirebaseToken(user_id string) (fcm string, device_platform string, err error) +} + +func NewStorage(cfg *viper.Viper) (Storage, error) { + var ( + storage_type = cfg.GetString("storage.db.type") + ) + switch storage_type { + case "psql": + s, err := NewPostgresqlStorage(cfg) + return s, err + default: + return nil, fmt.Errorf("storage type %v is not supported", storage_type) + } +}