Compare commits
2 Commits
main
...
silvermobi
Author | SHA1 | Date |
---|---|---|
Maxime | 4c3aa9c3d3 | |
Maxime | 88739650bc |
|
@ -1,30 +0,0 @@
|
|||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
*.cover*
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
vendor/
|
||||
vendor*/
|
||||
*.lock
|
||||
go.sum
|
||||
|
||||
# Jetbrain IDE files
|
||||
.idea/
|
||||
.idea/*
|
||||
.idea/**/*
|
||||
|
||||
config.yaml
|
||||
|
||||
# other
|
||||
/scripts
|
||||
/test-*
|
660
LICENSE.md
660
LICENSE.md
|
@ -1,660 +0,0 @@
|
|||
# GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
<https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
## Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains
|
||||
free software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing
|
||||
under this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
## TERMS AND CONDITIONS
|
||||
|
||||
### 0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public
|
||||
License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds
|
||||
of works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of
|
||||
an exact copy. The resulting work is called a "modified version" of
|
||||
the earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user
|
||||
through a computer network, with no transfer of a copy, is not
|
||||
conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices" to
|
||||
the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
### 1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work for
|
||||
making modifications to it. "Object code" means any non-source form of
|
||||
a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users can
|
||||
regenerate automatically from other parts of the Corresponding Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that same
|
||||
work.
|
||||
|
||||
### 2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not convey,
|
||||
without conditions so long as your license otherwise remains in force.
|
||||
You may convey covered works to others for the sole purpose of having
|
||||
them make modifications exclusively for you, or provide you with
|
||||
facilities for running those works, provided that you comply with the
|
||||
terms of this License in conveying all material for which you do not
|
||||
control copyright. Those thus making or running the covered works for
|
||||
you must do so exclusively on your behalf, under your direction and
|
||||
control, on terms that prohibit them from making any copies of your
|
||||
copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under the
|
||||
conditions stated below. Sublicensing is not allowed; section 10 makes
|
||||
it unnecessary.
|
||||
|
||||
### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such
|
||||
circumvention is effected by exercising rights under this License with
|
||||
respect to the covered work, and you disclaim any intention to limit
|
||||
operation or modification of the work as a means of enforcing, against
|
||||
the work's users, your or third parties' legal rights to forbid
|
||||
circumvention of technological measures.
|
||||
|
||||
### 4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
### 5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these
|
||||
conditions:
|
||||
|
||||
- a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
- b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under
|
||||
section 7. This requirement modifies the requirement in section 4
|
||||
to "keep intact all notices".
|
||||
- c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
- d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
### 6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms of
|
||||
sections 4 and 5, provided that you also convey the machine-readable
|
||||
Corresponding Source under the terms of this License, in one of these
|
||||
ways:
|
||||
|
||||
- a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
- b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the Corresponding
|
||||
Source from a network server at no charge.
|
||||
- c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
- d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
- e) Convey the object code using peer-to-peer transmission,
|
||||
provided you inform other peers where the object code and
|
||||
Corresponding Source of the work are being offered to the general
|
||||
public at no charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal,
|
||||
family, or household purposes, or (2) anything designed or sold for
|
||||
incorporation into a dwelling. In determining whether a product is a
|
||||
consumer product, doubtful cases shall be resolved in favor of
|
||||
coverage. For a particular product received by a particular user,
|
||||
"normally used" refers to a typical or common use of that class of
|
||||
product, regardless of the status of the particular user or of the way
|
||||
in which the particular user actually uses, or expects or is expected
|
||||
to use, the product. A product is a consumer product regardless of
|
||||
whether the product has substantial commercial, industrial or
|
||||
non-consumer uses, unless such uses represent the only significant
|
||||
mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to
|
||||
install and execute modified versions of a covered work in that User
|
||||
Product from a modified version of its Corresponding Source. The
|
||||
information must suffice to ensure that the continued functioning of
|
||||
the modified object code is in no case prevented or interfered with
|
||||
solely because modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or
|
||||
updates for a work that has been modified or installed by the
|
||||
recipient, or for the User Product in which it has been modified or
|
||||
installed. Access to a network may be denied when the modification
|
||||
itself materially and adversely affects the operation of the network
|
||||
or violates the rules and protocols for communication across the
|
||||
network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
### 7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders
|
||||
of that material) supplement the terms of this License with terms:
|
||||
|
||||
- a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
- b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
- c) Prohibiting misrepresentation of the origin of that material,
|
||||
or requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
- d) Limiting the use for publicity purposes of names of licensors
|
||||
or authors of the material; or
|
||||
- e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
- f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions
|
||||
of it) with contractual assumptions of liability to the recipient,
|
||||
for any liability that these contractual assumptions directly
|
||||
impose on those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions; the
|
||||
above requirements apply either way.
|
||||
|
||||
### 8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
### 9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or run
|
||||
a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
### 10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
### 11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims owned
|
||||
or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within the
|
||||
scope of its coverage, prohibits the exercise of, or is conditioned on
|
||||
the non-exercise of one or more of the rights that are specifically
|
||||
granted under this License. You may not convey a covered work if you
|
||||
are a party to an arrangement with a third party that is in the
|
||||
business of distributing software, under which you make payment to the
|
||||
third party based on the extent of your activity of conveying the
|
||||
work, and under which the third party grants, to any of the parties
|
||||
who would receive the covered work from you, a discriminatory patent
|
||||
license (a) in connection with copies of the covered work conveyed by
|
||||
you (or copies made from those copies), or (b) primarily for and in
|
||||
connection with specific products or compilations that contain the
|
||||
covered work, unless you entered into that arrangement, or that patent
|
||||
license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
### 12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under
|
||||
this License and any other pertinent obligations, then as a
|
||||
consequence you may not convey it at all. For example, if you agree to
|
||||
terms that obligate you to collect a royalty for further conveying
|
||||
from those to whom you convey the Program, the only way you could
|
||||
satisfy both those terms and this License would be to refrain entirely
|
||||
from conveying the Program.
|
||||
|
||||
### 13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your
|
||||
version supports such interaction) an opportunity to receive the
|
||||
Corresponding Source of your version by providing access to the
|
||||
Corresponding Source from a network server at no charge, through some
|
||||
standard or customary means of facilitating copying of software. This
|
||||
Corresponding Source shall include the Corresponding Source for any
|
||||
work covered by version 3 of the GNU General Public License that is
|
||||
incorporated pursuant to the following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
### 14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Affero General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever
|
||||
published by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future versions
|
||||
of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
### 15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
|
||||
WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
|
||||
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
|
||||
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
|
||||
CORRECTION.
|
||||
|
||||
### 16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
|
||||
CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
|
||||
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
|
||||
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
|
||||
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
|
||||
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
|
||||
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
### 17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
## How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these
|
||||
terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to
|
||||
attach them to the start of each source file to most effectively state
|
||||
the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper
|
||||
mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for
|
||||
the specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. For more information on this, and how to apply and follow
|
||||
the GNU AGPL, see <https://www.gnu.org/licenses/>.
|
|
@ -0,0 +1,79 @@
|
|||
service_name: SILVERMOBI
|
||||
|
||||
storage:
|
||||
db:
|
||||
type: psql
|
||||
psql:
|
||||
host: localhost
|
||||
dbname: coopgo_platform
|
||||
user: maxime
|
||||
password: posgres
|
||||
sslmode: disable
|
||||
port: 5432
|
||||
schema: silvermobi_backend
|
||||
tables:
|
||||
users_firebase: users_firebase
|
||||
services:
|
||||
internal:
|
||||
mobility_accounts:
|
||||
type: grpc
|
||||
dial: localhost:8090
|
||||
push:
|
||||
type: gorush-grpc
|
||||
dial: localhost:8095
|
||||
external:
|
||||
grpc:
|
||||
enable: true
|
||||
ip: localhost
|
||||
port: 8099
|
||||
web:
|
||||
enable: true
|
||||
port: 8098
|
||||
moncomptemobilite:
|
||||
enable: true
|
||||
port: 8097
|
||||
oidc:
|
||||
provider: https://idp-fabmob.stg.hub.flowbird.io/auth/realms/mcm
|
||||
client_id: ridygo-pub
|
||||
# redirect_url: "http://192.168.1.27:8097/callbacks/oidc/cee"
|
||||
redirect_url: "http://192.168.1.27:8097/callbacks/oidc/cee"
|
||||
# redirect_url: "http://localhost:8097/callbacks/oidc/cee"
|
||||
certinergy:
|
||||
enable: true
|
||||
port: 8100
|
||||
jwt_key: 6mt29Z4rkCPmib9ckigPWFbaDTQFUPyK
|
||||
# jwt_key : UjXnZr4u7x!A%D*G-KaPdSgVkYp3s5v8 # PROD
|
||||
clients:
|
||||
- name: certinergy
|
||||
id: cd11c681-4168-4bdf-8f2d-9e3ade5fac8d
|
||||
bearer: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjZDExYzY4MS00MTY4LTRiZGYtOGYyZC05ZTNhZGU1ZmFjOGQiLCJuYW1lIjoiY2VydGluZXJneSIsImlhdCI6MTUxNjIzOTAyMn0.tPwn3uD_6T4FjOTehYDRNg39x2A4E9FFv6qTgduODaA
|
||||
# bearer: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjZDExYzY4MS00MTY4LTRiZGYtOGYyZC05ZTNhZGU1ZmFjOGQiLCJuYW1lIjoiY2VydGluZXJneSIsImlhdCI6MTUxNjIzOTAyMn0.LAr2l5X9XFRbPRPQvZLt8AWyfzbFGS5BO9MlB4U5HJo # PROD
|
||||
solidarity_service:
|
||||
address: 10.73.190.200:8089
|
||||
identification:
|
||||
local:
|
||||
jwt_secret: JWT_KEY
|
||||
ttl: 20000s
|
||||
|
||||
carpooling_proofs:
|
||||
rpc_registry:
|
||||
base_url: https://api.demo.covoiturage.beta.gouv.fr
|
||||
token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhIjoiN2Y4MTQwNzYtOTJmOS00NjExLTlhMmItZjA0MzU4MmMwOWI3IiwibyI6OSwicyI6Im9wZXJhdG9yIiwicCI6WyJjb21tb24uY2VydGlmaWNhdGUuZmluZCIsImNvbW1vbi5jb21wYW55LmZldGNoIiwiY29tbW9uLmNvbXBhbnkuZmluZCIsImNvbW1vbi5ob25vci5zYXZlIiwiY29tbW9uLmhvbm9yLnN0YXRzIiwiY29tbW9uLm9wZXJhdG9yLmxpc3QiLCJjb21tb24ub3BlcmF0b3IuZmluZCIsImNvbW1vbi5wb2xpY3kubGlzdCIsImNvbW1vbi5wb2xpY3kubGlzdC50ZW1wbGF0ZXMiLCJjb21tb24udGVycml0b3J5LmZpbmQiLCJjb21tb24udGVycml0b3J5Lmxpc3QiLCJjb21tb24udGVycml0b3J5LnJlYWQiLCJjb21tb24udHJpcC5zdGF0cyIsImNvbW1vbi51c2VyLnVwZGF0ZSIsImNvbW1vbi51c2VyLmZpbmQiLCJjb21tb24udXNlci5wb2xpY3lTaW11bGF0ZSIsIm9wZXJhdG9yLmFjcXVpc2l0aW9uLmNyZWF0ZSIsIm9wZXJhdG9yLmFjcXVpc2l0aW9uLmNhbmNlbCIsIm9wZXJhdG9yLmFjcXVpc2l0aW9uLnN0YXR1cyIsIm9wZXJhdG9yLmNlcnRpZmljYXRlLmNyZWF0ZSIsIm9wZXJhdG9yLmNlcnRpZmljYXRlLmRvd25sb2FkIiwib3BlcmF0b3IucG9saWN5LnNpbXVsYXRlLmZ1dHVyZSJdLCJ2IjoyLCJpYXQiOjE2NzgwOTg0NTR9.b4ezR41U4kGwa6FVF0-JyvqEE1kKtxGEa5gzqh4ctTU
|
||||
|
||||
|
||||
geocoder:
|
||||
type: pelias
|
||||
pelias:
|
||||
base_url: https://geocode.ridygo.fr
|
||||
|
||||
routing:
|
||||
type: valhalla
|
||||
valhalla:
|
||||
base_url: https://valhalla.coopgo.io/
|
||||
|
||||
emailing:
|
||||
smtp:
|
||||
host: mail.gandi.net
|
||||
port: 587
|
||||
username: support@parcoursmob.fr
|
||||
password: Sc1tYc00p
|
22
go.mod
22
go.mod
|
@ -1,8 +1,6 @@
|
|||
module git.coopgo.io/coopgo-apps/silvermobi
|
||||
|
||||
go 1.21
|
||||
|
||||
toolchain go1.23.2
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
git.coopgo.io/coopgo-platform/geocode v0.0.0-20230329105149-1f31b361814e
|
||||
|
@ -10,8 +8,8 @@ require (
|
|||
git.coopgo.io/coopgo-platform/routing-service v0.0.0-20230403183358-4d30329f06be
|
||||
github.com/appleboy/gorush v1.16.3
|
||||
github.com/golang-jwt/jwt/v4 v4.5.0
|
||||
github.com/golang/protobuf v1.5.4
|
||||
github.com/google/uuid v1.6.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
|
||||
|
@ -19,8 +17,8 @@ require (
|
|||
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.65.0
|
||||
google.golang.org/protobuf v1.34.1
|
||||
google.golang.org/grpc v1.56.0
|
||||
google.golang.org/protobuf v1.31.0
|
||||
gopkg.in/mail.v2 v2.3.1
|
||||
)
|
||||
|
||||
|
@ -58,11 +56,11 @@ require (
|
|||
go.uber.org/atomic v1.10.0 // indirect
|
||||
go.uber.org/multierr v1.8.0 // indirect
|
||||
go.uber.org/zap v1.21.0 // indirect
|
||||
golang.org/x/crypto v0.23.0 // indirect
|
||||
golang.org/x/net v0.25.0 // indirect
|
||||
golang.org/x/sync v0.7.0 // indirect
|
||||
golang.org/x/sys v0.20.0 // indirect
|
||||
golang.org/x/text v0.15.0 // indirect
|
||||
golang.org/x/crypto v0.9.0 // indirect
|
||||
golang.org/x/net v0.10.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.8.0 // indirect
|
||||
golang.org/x/text v0.9.0 // 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
|
||||
|
|
46
go.sum
46
go.sum
|
@ -24,8 +24,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf
|
|||
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
|
||||
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
|
||||
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
|
||||
cloud.google.com/go/compute v1.19.0 h1:+9zda3WGgW1ZSTlVppLCYFIr48Pa35q1uG2N1itbCEQ=
|
||||
cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc=
|
||||
cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY=
|
||||
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=
|
||||
|
@ -115,8 +115,8 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
|
|||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
|
||||
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
|
@ -132,7 +132,7 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|||
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
|
||||
|
@ -148,8 +148,8 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe
|
|||
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
||||
|
@ -291,8 +291,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
|
|||
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.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
|
||||
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
|
||||
|
@ -360,8 +360,8 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v
|
|||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
|
||||
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
|
||||
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
|
@ -371,7 +371,7 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
|
|||
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo=
|
||||
golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
@ -383,8 +383,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
|
|||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
|
||||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
@ -429,8 +429,8 @@ golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
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-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=
|
||||
|
@ -440,8 +440,8 @@ 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.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.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
|
||||
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
|
||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
|
@ -525,6 +525,7 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
|
|||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
|
||||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
|
@ -581,8 +582,8 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM
|
|||
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
|
||||
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
|
||||
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
|
||||
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
|
||||
google.golang.org/grpc v1.56.0 h1:+y7Bs8rtMd07LeXmL3NxcTLn7mUkbKZqEpPhMNkwJEE=
|
||||
google.golang.org/grpc v1.56.0/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
|
@ -594,9 +595,10 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD
|
|||
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
|
||||
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.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
|
||||
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
|
|
@ -2,19 +2,15 @@ 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) {
|
||||
var resp *grpcapi.GetAccountResponse
|
||||
|
||||
if resp, err = h.Services.MobilityAccounts.Client.GetAccount(ctx, &grpcapi.GetAccountRequest{Id: id}); err != nil {
|
||||
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
|
||||
}
|
||||
|
|
|
@ -3,61 +3,49 @@ package handler
|
|||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"git.coopgo.io/coopgo-apps/silvermobi/models"
|
||||
)
|
||||
|
||||
func (h *SilverMobiHandler) Login(ctx context.Context, username string, password string) (jwt string, err error) {
|
||||
var (
|
||||
account *models.Account
|
||||
pTTL time.Duration
|
||||
)
|
||||
|
||||
if account, err = h.Services.MobilityAccounts.Login(ctx, username, password, "silvermobi"); err != nil {
|
||||
func (h *SilvermobiHandler) Login(ctx context.Context, username string, password string) (jwt string, err error) {
|
||||
account, err := h.Services.MobilityAccounts.Login(ctx, username, password, "silvermobi")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
key := h.Config.GetString("identification.local.jwt_secret")
|
||||
ttl := h.Config.GetString("identification.local.ttl")
|
||||
|
||||
if pTTL, err = time.ParseDuration(ttl); err != nil {
|
||||
parsedttl, err := time.ParseDuration(ttl)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return account.CreateToken(pTTL, key)
|
||||
return account.CreateToken(parsedttl, key)
|
||||
}
|
||||
|
||||
func (h *SilverMobiHandler) Register(ctx context.Context, username string, password string, email string,
|
||||
phoneNumber string, firstName string, lastName string) (jwt string, err error) {
|
||||
|
||||
var (
|
||||
account *models.Account
|
||||
pTTL time.Duration
|
||||
)
|
||||
|
||||
if account, err = h.Services.MobilityAccounts.Register(
|
||||
func (h *SilvermobiHandler) Register(ctx context.Context, username string, password string, email string, phone_number string, first_name string, last_name string) (jwt string, err error) {
|
||||
account, err := h.Services.MobilityAccounts.Register(
|
||||
ctx,
|
||||
username,
|
||||
password,
|
||||
email,
|
||||
phoneNumber,
|
||||
phone_number,
|
||||
map[string]any{
|
||||
"first_name": firstName,
|
||||
"last_name": lastName,
|
||||
"first_name": first_name,
|
||||
"last_name": last_name,
|
||||
"email": email,
|
||||
"phone_number": phoneNumber,
|
||||
"phone_number": phone_number,
|
||||
},
|
||||
"silvermobi",
|
||||
); err != nil {
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
key := h.Config.GetString("identification.local.jwt_secret")
|
||||
ttl := h.Config.GetString("identification.local.ttl")
|
||||
|
||||
if pTTL, err = time.ParseDuration(ttl); err != nil {
|
||||
parsedttl, err := time.ParseDuration(ttl)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return account.CreateToken(pTTL, key)
|
||||
return account.CreateToken(parsedttl, key)
|
||||
}
|
||||
|
|
|
@ -3,9 +3,8 @@ package handler
|
|||
import (
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"crypto/tls"
|
||||
"encoding/base64"
|
||||
|
||||
"git.coopgo.io/coopgo-apps/silvermobi/models"
|
||||
gomail "gopkg.in/mail.v2"
|
||||
)
|
||||
|
||||
|
@ -19,50 +18,29 @@ func generateRandomPassword(length int) (string, error) {
|
|||
return password, nil
|
||||
}
|
||||
|
||||
func (h *SilverMobiHandler) ForgetAccount(ctx context.Context, username string, namespace string) (response bool,
|
||||
accessCode string) {
|
||||
|
||||
var (
|
||||
err error
|
||||
account *models.Account
|
||||
)
|
||||
|
||||
account, err = h.Services.MobilityAccounts.GetAccountUsername(ctx, username, namespace)
|
||||
|
||||
if err != nil {
|
||||
func (h *SilvermobiHandler) ForgetAccount(ctx context.Context, username string, namespace string) (response bool, access_Code string) {
|
||||
account, err := h.Services.MobilityAccounts.GetAccountUsername(ctx, username, namespace)
|
||||
if err == nil {
|
||||
message := []byte("Hello dear,\nYour new Silvermobi password is: ")
|
||||
password, _ := generateRandomPassword(10)
|
||||
update := h.Services.MobilityAccounts.UpdatePassword(ctx, account.ID, password)
|
||||
if update == false {
|
||||
return false, ""
|
||||
}
|
||||
m := gomail.NewMessage()
|
||||
m.SetHeader("From", h.Config.GetString("emailing.smtp.username"))
|
||||
m.SetHeader("To", username)
|
||||
m.SetHeader("Subject", "Silvermobi Password Recovery")
|
||||
message = append(message, []byte(password)...)
|
||||
m.SetBody("text/plain", string(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 false, ""
|
||||
}
|
||||
return true, password
|
||||
} else {
|
||||
return false, ""
|
||||
}
|
||||
|
||||
message := []byte("Hello dear,\nYour new Silvermobi password is: ")
|
||||
|
||||
password, _ := generateRandomPassword(10)
|
||||
|
||||
if update := h.Services.MobilityAccounts.UpdatePassword(ctx, account.ID, password); !update {
|
||||
return false, ""
|
||||
}
|
||||
|
||||
m := gomail.NewMessage()
|
||||
m.SetHeader("From", h.Config.GetString("emailing.smtp.username"))
|
||||
m.SetHeader("To", username)
|
||||
m.SetHeader("Subject", "Silvermobi Password Recovery")
|
||||
|
||||
message = append(message, []byte(password)...)
|
||||
|
||||
m.SetBody("text/plain", string(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.StartTLSPolicy = gomail.MandatoryStartTLS
|
||||
|
||||
if err = d.DialAndSend(m); err != nil {
|
||||
return false, ""
|
||||
}
|
||||
|
||||
return true, password
|
||||
|
||||
}
|
||||
|
|
|
@ -2,13 +2,12 @@ package handler
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.coopgo.io/coopgo-platform/routing-service"
|
||||
"github.com/paulmach/orb"
|
||||
"github.com/paulmach/orb/geojson"
|
||||
"google.golang.org/genproto/googleapis/maps/routing/v2"
|
||||
)
|
||||
|
||||
func (h *SilverMobiHandler) GeoAutocomplete(text string) (*geojson.FeatureCollection, error) {
|
||||
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
|
||||
|
@ -16,45 +15,36 @@ func (h *SilverMobiHandler) GeoAutocomplete(text string) (*geojson.FeatureCollec
|
|||
return result, nil
|
||||
}
|
||||
|
||||
func (h *SilverMobiHandler) GeoRoute(locations geojson.FeatureCollection) (route *routing.Route, err error) {
|
||||
var (
|
||||
routeLocations []orb.Point
|
||||
featuresType string
|
||||
)
|
||||
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 ft != featuresType {
|
||||
return nil, fmt.Errorf("mixing different types of geometries in"+
|
||||
" the feature collection is not allowed : %s and %s found", featuresType, ft)
|
||||
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)
|
||||
}
|
||||
|
||||
featuresType = ft
|
||||
features_type = ft
|
||||
|
||||
if featuresType == "Point" {
|
||||
if features_type == "Point" {
|
||||
if point, ok := f.Geometry.(orb.Point); ok {
|
||||
routeLocations = append(routeLocations, point)
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid geometry type for point")
|
||||
route_locations = append(route_locations, point)
|
||||
}
|
||||
} else {
|
||||
return nil, fmt.Errorf("feature type %s not supported", featuresType)
|
||||
return nil, fmt.Errorf("feature type %s not supported", features_type)
|
||||
}
|
||||
}
|
||||
|
||||
if route, err = h.Services.Routing.Route(routeLocations); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return route, nil
|
||||
}
|
||||
|
||||
func (h *SilverMobiHandler) GeoReturnRoute(locations geojson.FeatureCollection) (route *routing.Route, err error) {
|
||||
|
||||
func (h *SilvermobiHandler) GeoReturnRoute(locations geojson.FeatureCollection) (route *routing.Route, err error) {
|
||||
loc := locations
|
||||
|
||||
route.Polyline.String()
|
||||
reverse(loc.Features)
|
||||
|
||||
return h.GeoRoute(loc)
|
||||
|
|
|
@ -6,15 +6,14 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
type SilverMobiHandler struct {
|
||||
type SilvermobiHandler struct {
|
||||
Config *viper.Viper
|
||||
Services *services.ServiceHandler
|
||||
Services *services.ServicesHandler
|
||||
Storage storage.Storage
|
||||
}
|
||||
|
||||
func NewSilverMobiHandler(cfg *viper.Viper, services *services.ServiceHandler,
|
||||
storage storage.Storage) (*SilverMobiHandler, error) {
|
||||
return &SilverMobiHandler{
|
||||
func NewSilvermobiHandler(cfg *viper.Viper, services *services.ServicesHandler, storage storage.Storage) (*SilvermobiHandler, error) {
|
||||
return &SilvermobiHandler{
|
||||
Config: cfg,
|
||||
Services: services,
|
||||
Storage: storage,
|
||||
|
|
|
@ -2,69 +2,63 @@ 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, devicePlatform string) (err error) {
|
||||
err = h.Storage.CreateFirebaseToken(id, token, devicePlatform)
|
||||
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) error {
|
||||
firebaseToken, platform, err := h.Storage.GetFirebaseToken(id)
|
||||
|
||||
func (h *SilvermobiHandler) SendNotification(id, title, message string) (err error) {
|
||||
firebase_token, platfrom, _ := h.Storage.GetFirebaseToken(id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
notify := services.Notification{
|
||||
Recipients: []string{firebaseToken},
|
||||
Title: title,
|
||||
Message: message,
|
||||
}
|
||||
if platform == "android" {
|
||||
notify.Platform = services.PushToAndroid
|
||||
err = h.Services.Push.Send(notify)
|
||||
if platfrom == "android" {
|
||||
_ = h.Services.Push.Send(
|
||||
services.Notification{
|
||||
Platform: services.PushToAndroid,
|
||||
Recipients: []string{firebase_token},
|
||||
Title: title,
|
||||
Message: message,
|
||||
},
|
||||
)
|
||||
} else {
|
||||
notify.Platform = services.PushToIos
|
||||
err = h.Services.Push.Send(notify)
|
||||
}
|
||||
|
||||
return err
|
||||
|
||||
}
|
||||
func (h *SilverMobiHandler) SendEmail(id, title, message string) (err error) {
|
||||
var resp *grpcapi.GetAccountResponse
|
||||
|
||||
if resp, err = h.Services.MobilityAccounts.Client.GetAccount(context.Background(),
|
||||
&grpcapi.GetAccountRequest{Id: id}); 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.StartTLSPolicy = gomail.MandatoryStartTLS
|
||||
|
||||
if err = d.DialAndSend(m); err != nil {
|
||||
return err
|
||||
_ = 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
|
||||
|
||||
}
|
||||
|
|
|
@ -3,53 +3,48 @@ package handler
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
"git.coopgo.io/coopgo-apps/silvermobi/services"
|
||||
"git.coopgo.io/coopgo-platform/mobility-accounts/grpcapi"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
"math/rand"
|
||||
)
|
||||
|
||||
func (h *SilverMobiHandler) UpdatePhoneNumber(ctx context.Context, id string, phoneNumber string) (err error) {
|
||||
|
||||
func (h *SilvermobiHandler) UpdatePhoneNumber(ctx context.Context, id string, phone_number string) error {
|
||||
code := rand.Intn(9999)
|
||||
|
||||
if err = h.Services.MobilityAccounts.UpdatePhoneNumber(
|
||||
err := h.Services.MobilityAccounts.UpdatePhoneNumber(
|
||||
ctx,
|
||||
id,
|
||||
phoneNumber,
|
||||
phone_number,
|
||||
false,
|
||||
fmt.Sprintf("%04d", code),
|
||||
); err != nil {
|
||||
)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("updating phone number failed")
|
||||
return err
|
||||
}
|
||||
|
||||
if err = h.Services.Push.Send(
|
||||
err = h.Services.Push.Send(
|
||||
services.Notification{
|
||||
Platform: services.PushToSMSFactor,
|
||||
Recipients: []string{phoneNumber[1:]},
|
||||
Recipients: []string{phone_number[1:]},
|
||||
Title: "SILVERMOBI",
|
||||
Message: fmt.Sprintf("SILVERMOBI - Votre code de validation : %04d", code),
|
||||
},
|
||||
); err != nil {
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("issue sending verification code by sms")
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *SilverMobiHandler) VerifyPhoneNumber(ctx context.Context, id string, phoneNumber string,
|
||||
verificationCode string) error {
|
||||
|
||||
func (h *SilvermobiHandler) VerifyPhoneNumber(ctx context.Context, id string, phone_number string, verification_code string) error {
|
||||
request := &grpcapi.GetAccountRequest{
|
||||
Id: id,
|
||||
}
|
||||
|
||||
resp, err := h.Services.MobilityAccounts.Client.GetAccount(ctx, request)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -57,21 +52,20 @@ func (h *SilverMobiHandler) VerifyPhoneNumber(ctx context.Context, id string, ph
|
|||
account_ := resp.Account
|
||||
|
||||
log.Debug().
|
||||
Str("phone_number", phoneNumber).
|
||||
Str("phone_number", phone_number).
|
||||
Str("account.phone_number", account_.Authentication.Local.PhoneNumber).
|
||||
Str("verification_code", verificationCode).
|
||||
Str("verification_code", verification_code).
|
||||
Str("account.verification_code", account_.Authentication.Local.PhoneNumberValidation.ValidationCode).
|
||||
Msg("Verify phone number")
|
||||
|
||||
if account_.Authentication.Local.PhoneNumber != phoneNumber ||
|
||||
account_.Authentication.Local.PhoneNumberValidation.ValidationCode != verificationCode {
|
||||
return errors.New("could not validate phone number : verification code mismatch")
|
||||
if account_.Authentication.Local.PhoneNumber != phone_number || account_.Authentication.Local.PhoneNumberValidation.ValidationCode != verification_code {
|
||||
return errors.New("cound not validate phone number : verification code mismatch")
|
||||
}
|
||||
|
||||
err = h.Services.MobilityAccounts.UpdatePhoneNumber(
|
||||
ctx,
|
||||
id,
|
||||
phoneNumber,
|
||||
phone_number,
|
||||
true,
|
||||
"",
|
||||
)
|
||||
|
@ -82,7 +76,7 @@ func (h *SilverMobiHandler) VerifyPhoneNumber(ctx context.Context, id string, ph
|
|||
return nil
|
||||
}
|
||||
|
||||
func (h *SilverMobiHandler) UpdateBirthDate(ctx context.Context, id string, birthdate string) error {
|
||||
func (h *SilvermobiHandler) UpdateBirthDate(ctx context.Context, id string, birthdate string) error {
|
||||
err := h.Services.MobilityAccounts.UpdateAccountBirthDate(ctx, id, "silvermobi", birthdate)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -90,86 +84,69 @@ func (h *SilverMobiHandler) UpdateBirthDate(ctx context.Context, id string, birt
|
|||
return nil
|
||||
}
|
||||
|
||||
func (h *SilverMobiHandler) SetAccountType(ctx context.Context, id string, accountType string) error {
|
||||
func (h *SilvermobiHandler) SetAccountType(ctx context.Context, id string, accountType string) error {
|
||||
err := h.Services.MobilityAccounts.SetAccountType(ctx, id, accountType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (h *SilverMobiHandler) GetAccountType(ctx context.Context, id string) (accountType string, err error) {
|
||||
var resp *grpcapi.GetAccountResponse
|
||||
|
||||
func (h *SilvermobiHandler) GetAccountType(ctx context.Context, id string) (account_type string, err error) {
|
||||
request := &grpcapi.GetAccountRequest{
|
||||
Id: id,
|
||||
}
|
||||
|
||||
if resp, err = h.Services.MobilityAccounts.Client.GetAccount(ctx, request); err != nil {
|
||||
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.Type != "" {
|
||||
|
||||
return account.Type, nil
|
||||
}
|
||||
|
||||
return "", errors.New("account type not set")
|
||||
}
|
||||
func (h *SilverMobiHandler) GetAccountPhone(ctx context.Context, id string) (phoneNumber string, err error) {
|
||||
var resp *grpcapi.GetAccountResponse
|
||||
|
||||
func (h *SilvermobiHandler) GetAccountPhone(ctx context.Context, id string) (phone_number string, err error) {
|
||||
request := &grpcapi.GetAccountRequest{
|
||||
Id: id,
|
||||
}
|
||||
|
||||
if resp, err = h.Services.MobilityAccounts.Client.GetAccount(ctx, request); err != nil {
|
||||
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) (phoneValidation, birthValidation,
|
||||
typeValidation bool, err error) {
|
||||
|
||||
var resp *grpcapi.GetAccountResponse
|
||||
|
||||
func (h *SilvermobiHandler) CheckValidation(ctx context.Context, id string) (phone_validation, birth_validation, type_validation bool, err error) {
|
||||
request := &grpcapi.GetAccountRequest{
|
||||
Id: id,
|
||||
}
|
||||
|
||||
if resp, err = h.Services.MobilityAccounts.Client.GetAccount(ctx, request); err != nil {
|
||||
resp, err := h.Services.MobilityAccounts.Client.GetAccount(ctx, request)
|
||||
if err != nil {
|
||||
return false, false, false, err
|
||||
|
||||
log.Error().Err(err).Msg("Failed get validation response")
|
||||
}
|
||||
|
||||
account := h.Services.MobilityAccounts.ToAccountModel(resp.Account.ToStorageType())
|
||||
|
||||
phoneValidation = false
|
||||
birthValidation = false
|
||||
typeValidation = false
|
||||
|
||||
phone_validation = false
|
||||
birth_validation = false
|
||||
type_validation = false
|
||||
if account.LocalCredentials.PhoneNumberVerified {
|
||||
phoneValidation = true
|
||||
phone_validation = true
|
||||
}
|
||||
|
||||
if account.BirthDate != "" {
|
||||
birthValidation = true
|
||||
birth_validation = true
|
||||
}
|
||||
|
||||
if account.Type != "" {
|
||||
typeValidation = true
|
||||
type_validation = true
|
||||
}
|
||||
|
||||
log.Info().Msg("Getting phone and birth validation for " + account.Email)
|
||||
return phoneValidation, birthValidation, typeValidation, nil
|
||||
return phone_validation, birth_validation, type_validation, nil
|
||||
}
|
||||
|
|
|
@ -2,17 +2,15 @@ package handler
|
|||
|
||||
import "context"
|
||||
|
||||
func (h *SilverMobiHandler) UpdatePassword(ctx context.Context, username string, password string) (response bool) {
|
||||
func (h *SilvermobiHandler) UpdatePassword(ctx context.Context, username string, password string) (response bool) {
|
||||
account, err := h.Services.MobilityAccounts.GetAccountUsername(ctx, username, "silvermobi")
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
result := h.Services.MobilityAccounts.UpdatePassword(ctx, account.ID, password)
|
||||
if result == true {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
}
|
||||
|
|
22
main.go
22
main.go
|
@ -10,39 +10,35 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
|
||||
zerolog.TimeFieldFormat = zerolog.TimeFormatUnix
|
||||
|
||||
cfg, err := ReadConfig()
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var (
|
||||
grpcEnable = cfg.GetBool("services.external.grpc.enable")
|
||||
svc *services.ServiceHandler
|
||||
stg storage.Storage
|
||||
hdl *handler.SilverMobiHandler
|
||||
grpc_enable = cfg.GetBool("services.external.grpc.enable")
|
||||
)
|
||||
|
||||
if svc, err = services.NewServicesHandler(cfg); err != nil {
|
||||
services, err := services.NewServicesHandler(cfg)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("failed starting services handler")
|
||||
}
|
||||
|
||||
if stg, err = storage.NewPostgresqlStorage(cfg); err != nil {
|
||||
storage, err := storage.NewPostgresqlStorage(cfg)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("failed starting storage handler")
|
||||
}
|
||||
|
||||
if hdl, err = handler.NewSilverMobiHandler(cfg, svc, stg); err != nil {
|
||||
handler, err := handler.NewSilvermobiHandler(cfg, services, storage)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("failed starting ridygo handler")
|
||||
}
|
||||
|
||||
failed := make(chan error)
|
||||
|
||||
if grpcEnable {
|
||||
if grpc_enable {
|
||||
log.Info().Msg("Running gRPC server")
|
||||
go grpcserver.Run(failed, cfg, hdl)
|
||||
go grpcserver.Run(failed, cfg, handler)
|
||||
}
|
||||
|
||||
err = <-failed
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/golang-jwt/jwt/v4"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Account struct {
|
||||
|
@ -37,11 +36,11 @@ type UserClaims struct {
|
|||
}
|
||||
|
||||
func (account Account) CreateToken(ttl time.Duration, key string) (token string, err error) {
|
||||
expiresAt := jwt.NewNumericDate(time.Now().Add(ttl))
|
||||
expires_at := jwt.NewNumericDate(time.Now().Add(ttl))
|
||||
claims := UserClaims{
|
||||
RegisteredClaims: jwt.RegisteredClaims{
|
||||
Subject: account.ID,
|
||||
ExpiresAt: expiresAt,
|
||||
ExpiresAt: expires_at,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v3.12.4
|
||||
// source: silvermobi-service.proto
|
||||
|
||||
|
@ -1341,8 +1341,8 @@ type AccountTypeRequest struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Request bool `protobuf:"varint,2,opt,name=request,proto3" json:"request,omitempty"`
|
||||
Type AccountTypeRequest_AccountType `protobuf:"varint,1,opt,name=type,proto3,enum=AccountTypeRequest_AccountType" json:"type,omitempty"`
|
||||
Request *bool `protobuf:"varint,2,opt,name=request,proto3,oneof" json:"request,omitempty"`
|
||||
Type *AccountTypeRequest_AccountType `protobuf:"varint,1,opt,name=type,proto3,enum=AccountTypeRequest_AccountType,oneof" json:"type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AccountTypeRequest) Reset() {
|
||||
|
@ -1378,15 +1378,15 @@ func (*AccountTypeRequest) Descriptor() ([]byte, []int) {
|
|||
}
|
||||
|
||||
func (x *AccountTypeRequest) GetRequest() bool {
|
||||
if x != nil {
|
||||
return x.Request
|
||||
if x != nil && x.Request != nil {
|
||||
return *x.Request
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *AccountTypeRequest) GetType() AccountTypeRequest_AccountType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
if x != nil && x.Type != nil {
|
||||
return *x.Type
|
||||
}
|
||||
return AccountTypeRequest_PASSENGER
|
||||
}
|
||||
|
@ -1396,8 +1396,8 @@ type AccountTypeResponse struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
|
||||
Type AccountTypeResponse_AccountType `protobuf:"varint,2,opt,name=type,proto3,enum=AccountTypeResponse_AccountType" json:"type,omitempty"`
|
||||
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
|
||||
Type *AccountTypeResponse_AccountType `protobuf:"varint,2,opt,name=type,proto3,enum=AccountTypeResponse_AccountType,oneof" json:"type,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AccountTypeResponse) Reset() {
|
||||
|
@ -1440,8 +1440,8 @@ func (x *AccountTypeResponse) GetOk() bool {
|
|||
}
|
||||
|
||||
func (x *AccountTypeResponse) GetType() AccountTypeResponse_AccountType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
if x != nil && x.Type != nil {
|
||||
return *x.Type
|
||||
}
|
||||
return AccountTypeResponse_PASSENGER
|
||||
}
|
||||
|
@ -1515,6 +1515,7 @@ type GeoAutocompleteResponse struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to FeatureCollection:
|
||||
//
|
||||
// *GeoAutocompleteResponse_FeatureCollectionRaw
|
||||
// *GeoAutocompleteResponse_FeatureCollectionImpl
|
||||
FeatureCollection isGeoAutocompleteResponse_FeatureCollection `protobuf_oneof:"feature_collection"`
|
||||
|
@ -1595,6 +1596,7 @@ type GeoRouteRequest struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Locations:
|
||||
//
|
||||
// *GeoRouteRequest_LocationsRaw
|
||||
// *GeoRouteRequest_LocationsImpl
|
||||
Locations isGeoRouteRequest_Locations `protobuf_oneof:"locations"`
|
||||
|
@ -1722,6 +1724,7 @@ type GeoRouteWithReturnRequest struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Locations:
|
||||
//
|
||||
// *GeoRouteWithReturnRequest_LocationsRaw
|
||||
// *GeoRouteWithReturnRequest_LocationsImpl
|
||||
Locations isGeoRouteWithReturnRequest_Locations `protobuf_oneof:"locations"`
|
||||
|
@ -2134,158 +2137,160 @@ var file_silvermobi_service_proto_rawDesc = []byte{
|
|||
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, 0x8d, 0x01, 0x0a,
|
||||
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, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 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, 0x52, 0x04, 0x74, 0x79,
|
||||
0x70, 0x65, 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, 0x22, 0x85, 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, 0x34, 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, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 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, 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, 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,
|
||||
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, 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 (
|
||||
|
@ -2821,6 +2826,8 @@ func file_silvermobi_service_proto_init() {
|
|||
}
|
||||
}
|
||||
}
|
||||
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),
|
||||
|
|
|
@ -134,8 +134,8 @@ message AccountTypeRequest {
|
|||
PASSENGER = 0;
|
||||
DRIVER = 1;
|
||||
}
|
||||
bool request = 2;
|
||||
AccountType type = 1;
|
||||
optional bool request = 2;
|
||||
optional AccountType type = 1;
|
||||
}
|
||||
|
||||
message AccountTypeResponse {
|
||||
|
@ -144,7 +144,7 @@ message AccountTypeResponse {
|
|||
PASSENGER = 0;
|
||||
DRIVER = 1;
|
||||
}
|
||||
AccountType type = 2;
|
||||
optional AccountType type = 2;
|
||||
}
|
||||
|
||||
message GeoAutocompleteRequest {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v3.12.4
|
||||
// source: silvermobi-service.proto
|
||||
|
||||
|
@ -15,8 +15,8 @@ import (
|
|||
|
||||
// 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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
SilvermobiGRPC_AuthLogin_FullMethodName = "/SilvermobiGRPC/AuthLogin"
|
||||
|
@ -70,9 +70,8 @@ func NewSilvermobiGRPCClient(cc grpc.ClientConnInterface) SilvermobiGRPCClient {
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) AuthLogin(ctx context.Context, in *AuthLoginRequest, opts ...grpc.CallOption) (*AuthLoginResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AuthLoginResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_AuthLogin_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_AuthLogin_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -80,9 +79,8 @@ func (c *silvermobiGRPCClient) AuthLogin(ctx context.Context, in *AuthLoginReque
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) AuthRegister(ctx context.Context, in *AuthRegisterRequest, opts ...grpc.CallOption) (*AuthRegisterResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AuthRegisterResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_AuthRegister_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_AuthRegister_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -90,9 +88,8 @@ func (c *silvermobiGRPCClient) AuthRegister(ctx context.Context, in *AuthRegiste
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) ForgetAccount(ctx context.Context, in *ForgetAccountRequest, opts ...grpc.CallOption) (*ForgetAccountResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ForgetAccountResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_ForgetAccount_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_ForgetAccount_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -100,9 +97,8 @@ func (c *silvermobiGRPCClient) ForgetAccount(ctx context.Context, in *ForgetAcco
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) UpdatePassword(ctx context.Context, in *UpdatePasswordRequest, opts ...grpc.CallOption) (*UpdatePasswordResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdatePasswordResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_UpdatePassword_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_UpdatePassword_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -110,9 +106,8 @@ func (c *silvermobiGRPCClient) UpdatePassword(ctx context.Context, in *UpdatePas
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) SetPhoneNumber(ctx context.Context, in *SetPhoneNumberRequest, opts ...grpc.CallOption) (*SetPhoneNumberResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SetPhoneNumberResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_SetPhoneNumber_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_SetPhoneNumber_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -120,9 +115,8 @@ func (c *silvermobiGRPCClient) SetPhoneNumber(ctx context.Context, in *SetPhoneN
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) VerifyPhoneNumber(ctx context.Context, in *VerifyPhoneNumberRequest, opts ...grpc.CallOption) (*VerifyPhoneNumberResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(VerifyPhoneNumberResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_VerifyPhoneNumber_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_VerifyPhoneNumber_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -130,9 +124,8 @@ func (c *silvermobiGRPCClient) VerifyPhoneNumber(ctx context.Context, in *Verify
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) SetBirthDate(ctx context.Context, in *BirthDateRequest, opts ...grpc.CallOption) (*BirthDateResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(BirthDateResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_SetBirthDate_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_SetBirthDate_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -140,9 +133,8 @@ func (c *silvermobiGRPCClient) SetBirthDate(ctx context.Context, in *BirthDateRe
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) SetAccountType(ctx context.Context, in *AccountTypeRequest, opts ...grpc.CallOption) (*AccountTypeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AccountTypeResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_SetAccountType_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_SetAccountType_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -150,9 +142,8 @@ func (c *silvermobiGRPCClient) SetAccountType(ctx context.Context, in *AccountTy
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) GetAccountType(ctx context.Context, in *AccountTypeRequest, opts ...grpc.CallOption) (*AccountTypeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AccountTypeResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GetAccountType_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GetAccountType_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -160,9 +151,8 @@ func (c *silvermobiGRPCClient) GetAccountType(ctx context.Context, in *AccountTy
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) SetKeyValue(ctx context.Context, in *KeyValueRequest, opts ...grpc.CallOption) (*KeyValueResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(KeyValueResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_SetKeyValue_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_SetKeyValue_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -170,9 +160,8 @@ func (c *silvermobiGRPCClient) SetKeyValue(ctx context.Context, in *KeyValueRequ
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) GetKeyValue(ctx context.Context, in *KeyRequest, opts ...grpc.CallOption) (*ValueResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ValueResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GetKeyValue_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GetKeyValue_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -180,9 +169,8 @@ func (c *silvermobiGRPCClient) GetKeyValue(ctx context.Context, in *KeyRequest,
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) GetValidation(ctx context.Context, in *ValidationRequest, opts ...grpc.CallOption) (*ValidationResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ValidationResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GetValidation_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GetValidation_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -190,9 +178,8 @@ func (c *silvermobiGRPCClient) GetValidation(ctx context.Context, in *Validation
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) GeoAutocomplete(ctx context.Context, in *GeoAutocompleteRequest, opts ...grpc.CallOption) (*GeoAutocompleteResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GeoAutocompleteResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GeoAutocomplete_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GeoAutocomplete_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -200,9 +187,8 @@ func (c *silvermobiGRPCClient) GeoAutocomplete(ctx context.Context, in *GeoAutoc
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) GeoRoute(ctx context.Context, in *GeoRouteRequest, opts ...grpc.CallOption) (*GeoRouteResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GeoRouteResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GeoRoute_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GeoRoute_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -210,9 +196,8 @@ func (c *silvermobiGRPCClient) GeoRoute(ctx context.Context, in *GeoRouteRequest
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) GeoRouteWithReturn(ctx context.Context, in *GeoRouteWithReturnRequest, opts ...grpc.CallOption) (*GeoRouteWithReturnResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GeoRouteWithReturnResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GeoRouteWithReturn_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GeoRouteWithReturn_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -220,9 +205,8 @@ func (c *silvermobiGRPCClient) GeoRouteWithReturn(ctx context.Context, in *GeoRo
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) PutFirebaseToken(ctx context.Context, in *FirebaseTokenRequest, opts ...grpc.CallOption) (*FirebaseTokenResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FirebaseTokenResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_PutFirebaseToken_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_PutFirebaseToken_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -230,9 +214,8 @@ func (c *silvermobiGRPCClient) PutFirebaseToken(ctx context.Context, in *Firebas
|
|||
}
|
||||
|
||||
func (c *silvermobiGRPCClient) GetAccountInfo(ctx context.Context, in *AccountInfoRequest, opts ...grpc.CallOption) (*AccountInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AccountInfoResponse)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GetAccountInfo_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SilvermobiGRPC_GetAccountInfo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -241,7 +224,7 @@ func (c *silvermobiGRPCClient) GetAccountInfo(ctx context.Context, in *AccountIn
|
|||
|
||||
// SilvermobiGRPCServer is the server API for SilvermobiGRPC service.
|
||||
// All implementations must embed UnimplementedSilvermobiGRPCServer
|
||||
// for forward compatibility.
|
||||
// for forward compatibility
|
||||
type SilvermobiGRPCServer interface {
|
||||
AuthLogin(context.Context, *AuthLoginRequest) (*AuthLoginResponse, error)
|
||||
AuthRegister(context.Context, *AuthRegisterRequest) (*AuthRegisterResponse, error)
|
||||
|
@ -263,12 +246,9 @@ type SilvermobiGRPCServer interface {
|
|||
mustEmbedUnimplementedSilvermobiGRPCServer()
|
||||
}
|
||||
|
||||
// UnimplementedSilvermobiGRPCServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedSilvermobiGRPCServer struct{}
|
||||
// UnimplementedSilvermobiGRPCServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedSilvermobiGRPCServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedSilvermobiGRPCServer) AuthLogin(context.Context, *AuthLoginRequest) (*AuthLoginResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AuthLogin not implemented")
|
||||
|
@ -322,7 +302,6 @@ func (UnimplementedSilvermobiGRPCServer) GetAccountInfo(context.Context, *Accoun
|
|||
return nil, status.Errorf(codes.Unimplemented, "method GetAccountInfo not implemented")
|
||||
}
|
||||
func (UnimplementedSilvermobiGRPCServer) mustEmbedUnimplementedSilvermobiGRPCServer() {}
|
||||
func (UnimplementedSilvermobiGRPCServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeSilvermobiGRPCServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SilvermobiGRPCServer will
|
||||
|
@ -332,13 +311,6 @@ type UnsafeSilvermobiGRPCServer interface {
|
|||
}
|
||||
|
||||
func RegisterSilvermobiGRPCServer(s grpc.ServiceRegistrar, srv SilvermobiGRPCServer) {
|
||||
// If the following call pancis, it indicates UnimplementedSilvermobiGRPCServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&SilvermobiGRPC_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v3.12.4
|
||||
// source: solidarity-api-types.proto
|
||||
|
||||
|
@ -307,11 +307,12 @@ type DriverJourney struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
|
||||
Car *Car `protobuf:"bytes,2,opt,name=car,proto3" json:"car,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" json:"price,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"`
|
||||
|
@ -523,8 +524,8 @@ type DriverRequest struct {
|
|||
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" json:"preferences,omitempty"`
|
||||
Car *Car `protobuf:"bytes,5,opt,name=car,proto3" json:"car,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() {
|
||||
|
@ -827,10 +828,10 @@ type Booking struct {
|
|||
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" json:"duration,omitempty"`
|
||||
Distance int64 `protobuf:"varint,9,opt,name=distance,proto3" json:"distance,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" json:"car,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"`
|
||||
}
|
||||
|
||||
|
@ -916,15 +917,15 @@ func (x *Booking) GetStatus() BookingStatus {
|
|||
}
|
||||
|
||||
func (x *Booking) GetDuration() int64 {
|
||||
if x != nil {
|
||||
return x.Duration
|
||||
if x != nil && x.Duration != nil {
|
||||
return *x.Duration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Booking) GetDistance() int64 {
|
||||
if x != nil {
|
||||
return x.Distance
|
||||
if x != nil && x.Distance != nil {
|
||||
return *x.Distance
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
@ -955,8 +956,8 @@ type Car struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
|
||||
Brand string `protobuf:"bytes,2,opt,name=brand,proto3" json:"brand,omitempty"`
|
||||
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() {
|
||||
|
@ -992,15 +993,15 @@ func (*Car) Descriptor() ([]byte, []int) {
|
|||
}
|
||||
|
||||
func (x *Car) GetModel() string {
|
||||
if x != nil {
|
||||
return x.Model
|
||||
if x != nil && x.Model != nil {
|
||||
return *x.Model
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Car) GetBrand() string {
|
||||
if x != nil {
|
||||
return x.Brand
|
||||
if x != nil && x.Brand != nil {
|
||||
return *x.Brand
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -1010,11 +1011,11 @@ type Preferences struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Smoking bool `protobuf:"varint,1,opt,name=smoking,proto3" json:"smoking,omitempty"`
|
||||
Animals bool `protobuf:"varint,2,opt,name=animals,proto3" json:"animals,omitempty"`
|
||||
Music bool `protobuf:"varint,3,opt,name=music,proto3" json:"music,omitempty"`
|
||||
IsTalker bool `protobuf:"varint,4,opt,name=is_talker,json=isTalker,proto3" json:"is_talker,omitempty"`
|
||||
LuggageSize int64 `protobuf:"varint,5,opt,name=luggage_size,json=luggageSize,proto3" json:"luggage_size,omitempty"`
|
||||
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() {
|
||||
|
@ -1050,36 +1051,36 @@ func (*Preferences) Descriptor() ([]byte, []int) {
|
|||
}
|
||||
|
||||
func (x *Preferences) GetSmoking() bool {
|
||||
if x != nil {
|
||||
return x.Smoking
|
||||
if x != nil && x.Smoking != nil {
|
||||
return *x.Smoking
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Preferences) GetAnimals() bool {
|
||||
if x != nil {
|
||||
return x.Animals
|
||||
if x != nil && x.Animals != nil {
|
||||
return *x.Animals
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Preferences) GetMusic() bool {
|
||||
if x != nil {
|
||||
return x.Music
|
||||
if x != nil && x.Music != nil {
|
||||
return *x.Music
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Preferences) GetIsTalker() bool {
|
||||
if x != nil {
|
||||
return x.IsTalker
|
||||
if x != nil && x.IsTalker != nil {
|
||||
return *x.IsTalker
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *Preferences) GetLuggageSize() int64 {
|
||||
if x != nil {
|
||||
return x.LuggageSize
|
||||
if x != nil && x.LuggageSize != nil {
|
||||
return *x.LuggageSize
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
@ -1089,9 +1090,9 @@ type Price struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Type PriceType `protobuf:"varint,1,opt,name=type,proto3,enum=PriceType" json:"type,omitempty"`
|
||||
Amount float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"`
|
||||
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() {
|
||||
|
@ -1127,22 +1128,22 @@ func (*Price) Descriptor() ([]byte, []int) {
|
|||
}
|
||||
|
||||
func (x *Price) GetType() PriceType {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
if x != nil && x.Type != nil {
|
||||
return *x.Type
|
||||
}
|
||||
return PriceType_FREE
|
||||
}
|
||||
|
||||
func (x *Price) GetAmount() float64 {
|
||||
if x != nil {
|
||||
return x.Amount
|
||||
if x != nil && x.Amount != nil {
|
||||
return *x.Amount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Price) GetCurrency() string {
|
||||
if x != nil {
|
||||
return x.Currency
|
||||
if x != nil && x.Currency != nil {
|
||||
return *x.Currency
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -1152,14 +1153,14 @@ type User struct {
|
|||
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" json:"first_name,omitempty"`
|
||||
LastName string `protobuf:"bytes,4,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
|
||||
Grade int64 `protobuf:"varint,5,opt,name=grade,proto3" json:"grade,omitempty"`
|
||||
Picture string `protobuf:"bytes,6,opt,name=picture,proto3" json:"picture,omitempty"`
|
||||
Gender string `protobuf:"bytes,7,opt,name=gender,proto3" json:"gender,omitempty"`
|
||||
VerifiedIdentity bool `protobuf:"varint,8,opt,name=verified_identity,json=verifiedIdentity,proto3" json:"verified_identity,omitempty"`
|
||||
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() {
|
||||
|
@ -1209,43 +1210,43 @@ func (x *User) GetAlias() string {
|
|||
}
|
||||
|
||||
func (x *User) GetFirstName() string {
|
||||
if x != nil {
|
||||
return x.FirstName
|
||||
if x != nil && x.FirstName != nil {
|
||||
return *x.FirstName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *User) GetLastName() string {
|
||||
if x != nil {
|
||||
return x.LastName
|
||||
if x != nil && x.LastName != nil {
|
||||
return *x.LastName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *User) GetGrade() int64 {
|
||||
if x != nil {
|
||||
return x.Grade
|
||||
if x != nil && x.Grade != nil {
|
||||
return *x.Grade
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *User) GetPicture() string {
|
||||
if x != nil {
|
||||
return x.Picture
|
||||
if x != nil && x.Picture != nil {
|
||||
return *x.Picture
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *User) GetGender() string {
|
||||
if x != nil {
|
||||
return x.Gender
|
||||
if x != nil && x.Gender != nil {
|
||||
return *x.Gender
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *User) GetVerifiedIdentity() bool {
|
||||
if x != nil {
|
||||
return x.VerifiedIdentity
|
||||
if x != nil && x.VerifiedIdentity != nil {
|
||||
return *x.VerifiedIdentity
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
@ -1261,192 +1262,217 @@ var file_solidarity_api_types_proto_rawDesc = []byte{
|
|||
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, 0xd7, 0x03, 0x0a, 0x0d, 0x44, 0x72, 0x69,
|
||||
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, 0x16, 0x0a, 0x03, 0x63, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x04, 0x2e, 0x43, 0x61, 0x72, 0x52, 0x03, 0x63, 0x61, 0x72, 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, 0x1c, 0x0a,
|
||||
0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 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, 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, 0xcc,
|
||||
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, 0x2e, 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, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72,
|
||||
0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x03, 0x63, 0x61, 0x72, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x04, 0x2e, 0x43, 0x61, 0x72, 0x52, 0x03, 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,
|
||||
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,
|
||||
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, 0x8e, 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, 0x1a, 0x0a,
|
||||
0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73,
|
||||
0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x69, 0x73,
|
||||
0x74, 0x61, 0x6e, 0x63, 0x65, 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, 0x16, 0x0a, 0x03, 0x63, 0x61, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x04, 0x2e, 0x43, 0x61, 0x72, 0x52, 0x03, 0x63, 0x61, 0x72, 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, 0x22, 0x31, 0x0a, 0x03, 0x43, 0x61, 0x72, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x72, 0x61, 0x6e, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x0b,
|
||||
0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x73,
|
||||
0x6d, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x6d,
|
||||
0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x73,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x61, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x6d, 0x75, 0x73, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,
|
||||
0x6d, 0x75, 0x73, 0x69, 0x63, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x74, 0x61, 0x6c, 0x6b,
|
||||
0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x54, 0x61, 0x6c, 0x6b,
|
||||
0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6c, 0x75, 0x67, 0x67, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69,
|
||||
0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x75, 0x67, 0x67, 0x61, 0x67,
|
||||
0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x5b, 0x0a, 0x05, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1e,
|
||||
0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x06,
|
||||
0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e,
|
||||
0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e,
|
||||
0x63, 0x79, 0x22, 0xdd, 0x01, 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, 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, 0x14, 0x0a,
|
||||
0x05, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x67, 0x72,
|
||||
0x61, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x16, 0x0a,
|
||||
0x06, 0x67, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x67,
|
||||
0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x2b, 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,
|
||||
0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x49, 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,
|
||||
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 (
|
||||
|
@ -1686,6 +1712,12 @@ func file_solidarity_api_types_proto_init() {
|
|||
(*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{
|
||||
|
|
|
@ -12,9 +12,9 @@ message Feature {
|
|||
|
||||
message DriverJourney {
|
||||
User user = 1;
|
||||
Car car = 2;
|
||||
optional Car car = 2;
|
||||
google.protobuf.Timestamp driver_departure_Date = 3;
|
||||
Price price = 4;
|
||||
optional Price price = 4;
|
||||
string driver_departure_Address = 5;
|
||||
oneof availabilities {
|
||||
RepeatedPunctualAvailabilitySlot repeated_punctual_availabilities = 6;
|
||||
|
@ -33,8 +33,8 @@ message DriverRequest{
|
|||
Feature driver_address = 1;
|
||||
int32 driver_radius = 2;
|
||||
User driver = 3;
|
||||
Preferences preferences = 4;
|
||||
Car car = 5;
|
||||
optional Preferences preferences = 4;
|
||||
optional Car car = 5;
|
||||
}
|
||||
|
||||
message PunctualAvailabilitySlot {
|
||||
|
@ -76,25 +76,25 @@ message Booking {
|
|||
Feature passenger_departure_route = 5;
|
||||
Feature passenger_destination_route = 6;
|
||||
BookingStatus status = 7;
|
||||
int64 duration = 8;
|
||||
int64 distance = 9;
|
||||
optional int64 duration = 8;
|
||||
optional int64 distance = 9;
|
||||
Price price = 10;
|
||||
Car car = 11;
|
||||
optional Car car = 11;
|
||||
google.protobuf.Timestamp pickup_date = 12;
|
||||
}
|
||||
|
||||
|
||||
message Car {
|
||||
string model = 1;
|
||||
string brand = 2;
|
||||
optional string model = 1;
|
||||
optional string brand = 2;
|
||||
}
|
||||
|
||||
message Preferences {
|
||||
bool smoking = 1;
|
||||
bool animals = 2;
|
||||
bool music = 3;
|
||||
bool is_talker = 4;
|
||||
int64 luggage_size = 5;
|
||||
optional bool smoking = 1;
|
||||
optional bool animals = 2;
|
||||
optional bool music = 3;
|
||||
optional bool is_talker = 4;
|
||||
optional int64 luggage_size = 5;
|
||||
}
|
||||
|
||||
|
||||
|
@ -105,20 +105,20 @@ enum PriceType {
|
|||
}
|
||||
|
||||
message Price {
|
||||
PriceType type = 1;
|
||||
double amount = 2;
|
||||
string currency = 3;
|
||||
optional PriceType type = 1;
|
||||
optional double amount = 2;
|
||||
optional string currency = 3;
|
||||
}
|
||||
|
||||
message User {
|
||||
string id = 1;
|
||||
string alias = 2;
|
||||
string first_name = 3;
|
||||
string last_name = 4;
|
||||
int64 grade = 5;
|
||||
string picture = 6;
|
||||
string gender = 7;
|
||||
bool verified_identity = 8;
|
||||
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 {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v3.12.4
|
||||
// source: solidarity-api.proto
|
||||
|
||||
|
@ -27,7 +27,7 @@ type PassengerTripRequest struct {
|
|||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Passenger *User `protobuf:"bytes,1,opt,name=passenger,proto3" json:"passenger,omitempty"`
|
||||
Preferences *Preferences `protobuf:"bytes,2,opt,name=preferences,proto3" json:"preferences,omitempty"`
|
||||
Preferences *Preferences `protobuf:"bytes,2,opt,name=preferences,proto3,oneof" json:"preferences,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PassengerTripRequest) Reset() {
|
||||
|
@ -191,8 +191,8 @@ type PassengerTripResponse struct {
|
|||
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" json:"message,omitempty"`
|
||||
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() {
|
||||
|
@ -235,8 +235,8 @@ func (x *PassengerTripResponse) GetSuccess() bool {
|
|||
}
|
||||
|
||||
func (x *PassengerTripResponse) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
if x != nil && x.Message != nil {
|
||||
return *x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -246,8 +246,8 @@ type DriverAvailabilitiesResponse struct {
|
|||
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" json:"message,omitempty"`
|
||||
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() {
|
||||
|
@ -290,8 +290,8 @@ func (x *DriverAvailabilitiesResponse) GetSuccess() bool {
|
|||
}
|
||||
|
||||
func (x *DriverAvailabilitiesResponse) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
if x != nil && x.Message != nil {
|
||||
return *x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -397,7 +397,7 @@ type UpdateBookingRequest struct {
|
|||
|
||||
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" json:"message,omitempty"`
|
||||
Message *string `protobuf:"bytes,3,opt,name=message,proto3,oneof" json:"message,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdateBookingRequest) Reset() {
|
||||
|
@ -447,8 +447,8 @@ func (x *UpdateBookingRequest) GetStatus() BookingStatus {
|
|||
}
|
||||
|
||||
func (x *UpdateBookingRequest) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
if x != nil && x.Message != nil {
|
||||
return *x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -458,8 +458,8 @@ type UpdateBookingResponse struct {
|
|||
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" json:"message,omitempty"`
|
||||
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() {
|
||||
|
@ -502,8 +502,8 @@ func (x *UpdateBookingResponse) GetSuccess() bool {
|
|||
}
|
||||
|
||||
func (x *UpdateBookingResponse) GetMessage() string {
|
||||
if x != nil {
|
||||
return x.Message
|
||||
if x != nil && x.Message != nil {
|
||||
return *x.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
@ -822,141 +822,147 @@ var file_solidarity_api_proto_rawDesc = []byte{
|
|||
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, 0x6b, 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, 0x2e, 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, 0x52, 0x0b, 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, 0x4b,
|
||||
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, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x52, 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, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 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,
|
||||
0x77, 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, 0x18,
|
||||
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x4b, 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, 0x18, 0x0a, 0x07, 0x6d,
|
||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 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,
|
||||
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, 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, 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,
|
||||
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,
|
||||
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 (
|
||||
|
@ -1229,6 +1235,11 @@ func file_solidarity_api_proto_init() {
|
|||
}
|
||||
}
|
||||
}
|
||||
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{
|
||||
|
|
|
@ -17,7 +17,7 @@ service SolidarityService {
|
|||
|
||||
message PassengerTripRequest{
|
||||
User passenger = 1;
|
||||
Preferences preferences = 2;
|
||||
optional Preferences preferences = 2;
|
||||
}
|
||||
|
||||
message DriverRegularAvailabilities{
|
||||
|
@ -33,12 +33,12 @@ message DriverPunctualAvailabilities{
|
|||
|
||||
message PassengerTripResponse {
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
optional string message = 2;
|
||||
}
|
||||
|
||||
message DriverAvailabilitiesResponse {
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
optional string message = 2;
|
||||
}
|
||||
|
||||
message CreateBookingRequest {
|
||||
|
@ -51,12 +51,12 @@ message CreateBookingResponse {
|
|||
message UpdateBookingRequest {
|
||||
string booking_id = 1;
|
||||
BookingStatus status = 2;
|
||||
string message = 3;
|
||||
optional string message = 3;
|
||||
}
|
||||
|
||||
message UpdateBookingResponse {
|
||||
bool success = 1;
|
||||
string message = 2;
|
||||
optional string message = 2;
|
||||
}
|
||||
|
||||
message GetBookingRequest {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v3.12.4
|
||||
// source: solidarity-api.proto
|
||||
|
||||
|
@ -15,8 +15,8 @@ import (
|
|||
|
||||
// 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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
SolidarityService_SetDriverRegularAvailabilities_FullMethodName = "/SolidarityService/SetDriverRegularAvailabilities"
|
||||
|
@ -52,9 +52,8 @@ func NewSolidarityServiceClient(cc grpc.ClientConnInterface) SolidarityServiceCl
|
|||
}
|
||||
|
||||
func (c *solidarityServiceClient) SetDriverRegularAvailabilities(ctx context.Context, in *DriverRegularAvailabilities, opts ...grpc.CallOption) (*DriverAvailabilitiesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DriverAvailabilitiesResponse)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_SetDriverRegularAvailabilities_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_SetDriverRegularAvailabilities_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -62,9 +61,8 @@ func (c *solidarityServiceClient) SetDriverRegularAvailabilities(ctx context.Con
|
|||
}
|
||||
|
||||
func (c *solidarityServiceClient) SetDriverPunctualAvailabilities(ctx context.Context, in *DriverPunctualAvailabilities, opts ...grpc.CallOption) (*DriverAvailabilitiesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DriverAvailabilitiesResponse)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_SetDriverPunctualAvailabilities_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_SetDriverPunctualAvailabilities_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -72,9 +70,8 @@ func (c *solidarityServiceClient) SetDriverPunctualAvailabilities(ctx context.Co
|
|||
}
|
||||
|
||||
func (c *solidarityServiceClient) CreateBooking(ctx context.Context, in *CreateBookingRequest, opts ...grpc.CallOption) (*CreateBookingResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CreateBookingResponse)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_CreateBooking_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_CreateBooking_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -82,9 +79,8 @@ func (c *solidarityServiceClient) CreateBooking(ctx context.Context, in *CreateB
|
|||
}
|
||||
|
||||
func (c *solidarityServiceClient) UpdateBooking(ctx context.Context, in *UpdateBookingRequest, opts ...grpc.CallOption) (*UpdateBookingResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdateBookingResponse)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_UpdateBooking_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_UpdateBooking_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -92,9 +88,8 @@ func (c *solidarityServiceClient) UpdateBooking(ctx context.Context, in *UpdateB
|
|||
}
|
||||
|
||||
func (c *solidarityServiceClient) GetBooking(ctx context.Context, in *GetBookingRequest, opts ...grpc.CallOption) (*GetBookingResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetBookingResponse)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_GetBooking_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_GetBooking_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -102,9 +97,8 @@ func (c *solidarityServiceClient) GetBooking(ctx context.Context, in *GetBooking
|
|||
}
|
||||
|
||||
func (c *solidarityServiceClient) GetBookingsByStatus(ctx context.Context, in *GetBookingsByStatusRequest, opts ...grpc.CallOption) (*GetBookingsByStatusResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetBookingsByStatusResponse)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_GetBookingsByStatus_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_GetBookingsByStatus_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -112,9 +106,8 @@ func (c *solidarityServiceClient) GetBookingsByStatus(ctx context.Context, in *G
|
|||
}
|
||||
|
||||
func (c *solidarityServiceClient) DriverJourneys(ctx context.Context, in *DriverJourneysRequest, opts ...grpc.CallOption) (*DriverJourneysResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DriverJourneysResponse)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_DriverJourneys_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_DriverJourneys_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -122,9 +115,8 @@ func (c *solidarityServiceClient) DriverJourneys(ctx context.Context, in *Driver
|
|||
}
|
||||
|
||||
func (c *solidarityServiceClient) SetPassengerTrip(ctx context.Context, in *PassengerTripRequest, opts ...grpc.CallOption) (*PassengerTripResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PassengerTripResponse)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_SetPassengerTrip_FullMethodName, in, out, cOpts...)
|
||||
err := c.cc.Invoke(ctx, SolidarityService_SetPassengerTrip_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -133,7 +125,7 @@ func (c *solidarityServiceClient) SetPassengerTrip(ctx context.Context, in *Pass
|
|||
|
||||
// SolidarityServiceServer is the server API for SolidarityService service.
|
||||
// All implementations must embed UnimplementedSolidarityServiceServer
|
||||
// for forward compatibility.
|
||||
// for forward compatibility
|
||||
type SolidarityServiceServer interface {
|
||||
SetDriverRegularAvailabilities(context.Context, *DriverRegularAvailabilities) (*DriverAvailabilitiesResponse, error)
|
||||
SetDriverPunctualAvailabilities(context.Context, *DriverPunctualAvailabilities) (*DriverAvailabilitiesResponse, error)
|
||||
|
@ -146,12 +138,9 @@ type SolidarityServiceServer interface {
|
|||
mustEmbedUnimplementedSolidarityServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedSolidarityServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedSolidarityServiceServer struct{}
|
||||
// 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")
|
||||
|
@ -178,7 +167,6 @@ func (UnimplementedSolidarityServiceServer) SetPassengerTrip(context.Context, *P
|
|||
return nil, status.Errorf(codes.Unimplemented, "method SetPassengerTrip not implemented")
|
||||
}
|
||||
func (UnimplementedSolidarityServiceServer) mustEmbedUnimplementedSolidarityServiceServer() {}
|
||||
func (UnimplementedSolidarityServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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
|
||||
|
@ -188,13 +176,6 @@ type UnsafeSolidarityServiceServer interface {
|
|||
}
|
||||
|
||||
func RegisterSolidarityServiceServer(s grpc.ServiceRegistrar, srv SolidarityServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedSolidarityServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&SolidarityService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,48 +2,32 @@ package grpcserver
|
|||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
"git.coopgo.io/coopgo-apps/silvermobi/models"
|
||||
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) {
|
||||
|
||||
var (
|
||||
md metadata.MD
|
||||
account *models.Account
|
||||
authHeader []string
|
||||
ok bool
|
||||
)
|
||||
|
||||
if md, ok = metadata.FromIncomingContext(ctx); !ok {
|
||||
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"]
|
||||
|
||||
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)
|
||||
|
||||
if account, err = s.Handler.GetAccountInfos(context.Background(), id); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
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,
|
||||
|
|
|
@ -8,15 +8,13 @@ import (
|
|||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func (s SilvermobiGRPCService) AuthLogin(ctx context.Context,
|
||||
req *grpcproto.AuthLoginRequest) (res *grpcproto.AuthLoginResponse, err error) {
|
||||
var jwt string
|
||||
|
||||
func (s SilvermobiGRPCService) AuthLogin(ctx context.Context, req *grpcproto.AuthLoginRequest) (res *grpcproto.AuthLoginResponse, err error) {
|
||||
log.Info().
|
||||
Str("username", req.Username).
|
||||
Msg("AuthLogin")
|
||||
|
||||
if jwt, err = s.Handler.Login(ctx, req.Username, req.Password); err != nil {
|
||||
jwt, err := s.Handler.Login(ctx, req.Username, req.Password)
|
||||
if err != nil {
|
||||
log.Error().
|
||||
Err(err).
|
||||
Str("username", req.Username).
|
||||
|
@ -30,16 +28,13 @@ func (s SilvermobiGRPCService) AuthLogin(ctx context.Context,
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (s SilvermobiGRPCService) AuthRegister(ctx context.Context,
|
||||
req *grpcproto.AuthRegisterRequest) (res *grpcproto.AuthRegisterResponse, err error) {
|
||||
var jwt string
|
||||
|
||||
func (s SilvermobiGRPCService) AuthRegister(ctx context.Context, req *grpcproto.AuthRegisterRequest) (res *grpcproto.AuthRegisterResponse, err error) {
|
||||
log.Info().
|
||||
Str("username", req.Email).
|
||||
Msg("AuthRegister")
|
||||
|
||||
if jwt, err = s.Handler.Register(ctx, req.Email, req.Password,
|
||||
req.Email, req.PhoneNumber, req.FirstName, req.LastName); err != nil {
|
||||
jwt, err := s.Handler.Register(ctx, req.Email, req.Password, req.Email, req.PhoneNumber, req.FirstName, req.LastName)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("AuthRegister failed")
|
||||
return nil, errors.New("could not register user")
|
||||
}
|
||||
|
|
|
@ -2,57 +2,44 @@ package grpcserver
|
|||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
|
||||
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) {
|
||||
|
||||
var (
|
||||
ok bool
|
||||
md metadata.MD
|
||||
authHeader []string
|
||||
)
|
||||
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
|
||||
}
|
||||
|
||||
if md, ok = metadata.FromIncomingContext(ctx); !ok {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return &grpcproto.FirebaseTokenResponse{
|
||||
Result: false,
|
||||
}, status.Errorf(codes.Unauthenticated, "Missing metadata")
|
||||
}
|
||||
|
||||
authHeader, ok = md["authorization"]
|
||||
|
||||
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")
|
||||
|
||||
if err = s.Handler.PutFirebase(context.Background(), id, req.Token, req.DevicePlatform); err != nil {
|
||||
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
|
||||
|
|
|
@ -2,30 +2,26 @@ package grpcserver
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
grpcproto "git.coopgo.io/coopgo-apps/silvermobi/servers/grpcapi/proto"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func (s SilvermobiGRPCService) ForgetAccount(ctx context.Context,
|
||||
req *grpcproto.ForgetAccountRequest) (res *grpcproto.ForgetAccountResponse, err error) {
|
||||
|
||||
func (s SilvermobiGRPCService) ForgetAccount(ctx context.Context, req *grpcproto.ForgetAccountRequest) (res *grpcproto.ForgetAccountResponse, err error) {
|
||||
log.Info().
|
||||
Str("username", req.Username).
|
||||
Str("namespace", req.Namespace).
|
||||
Msg("ForgetAccount")
|
||||
|
||||
response, accessCode := s.Handler.ForgetAccount(ctx, req.Username, req.Namespace)
|
||||
|
||||
response, access_code := s.Handler.ForgetAccount(ctx, req.Username, req.Namespace)
|
||||
if response == true {
|
||||
return &grpcproto.ForgetAccountResponse{
|
||||
Response: true,
|
||||
AccessCode: accessCode,
|
||||
AccessCode: access_code,
|
||||
}, nil
|
||||
} else {
|
||||
return &grpcproto.ForgetAccountResponse{
|
||||
Response: false,
|
||||
AccessCode: "",
|
||||
}, nil
|
||||
}
|
||||
return &grpcproto.ForgetAccountResponse{
|
||||
Response: false,
|
||||
AccessCode: "",
|
||||
}, nil
|
||||
|
||||
}
|
||||
|
|
|
@ -2,46 +2,47 @@ package grpcserver
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
grpcproto "git.coopgo.io/coopgo-apps/silvermobi/servers/grpcapi/proto"
|
||||
"git.coopgo.io/coopgo-platform/routing-service"
|
||||
"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) {
|
||||
|
||||
var (
|
||||
results *geojson.FeatureCollection
|
||||
rawFc []byte
|
||||
)
|
||||
|
||||
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")
|
||||
|
||||
requestID := uuid.NewString()
|
||||
|
||||
log.Debug().Str("requestID", requestID).Msg("GRPC GeoAutocomplete start")
|
||||
|
||||
if results, err = s.Handler.GeoAutocomplete(in.Text); err != nil {
|
||||
log.Error().Str("requestID", requestID).Err(err).Msg("GRPC GeoAutocomplete geocoding error")
|
||||
if err == io.EOF {
|
||||
log.Debug().Str("requestid", requestid).Msg("GRPC GeoAutocomplete EOF")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if rawFc, err = results.MarshalJSON(); err != nil {
|
||||
log.Error().Str("requestID", requestID).Err(err).Msg("GRPC GeoAutocomplete " +
|
||||
"protocol buffer conversion error")
|
||||
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),
|
||||
FeatureCollectionRaw: string(rawfc),
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -49,58 +50,50 @@ func (s SilvermobiGRPCService) GeoAutocomplete(ctx context.Context,
|
|||
|
||||
}
|
||||
|
||||
func (s SilvermobiGRPCService) GeoRoute(ctx context.Context,
|
||||
req *grpcproto.GeoRouteRequest) (*grpcproto.GeoRouteResponse, error) {
|
||||
locationsRaw, ok := req.Locations.(*grpcproto.GeoRouteRequest_LocationsRaw)
|
||||
|
||||
var route *routing.Route
|
||||
|
||||
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(locationsRaw.LocationsRaw))
|
||||
locations, err := geojson.UnmarshalFeatureCollection([]byte(locations_raw.LocationsRaw))
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
if route, err = s.Handler.GeoRoute(*locations); err != nil {
|
||||
route, err := s.Handler.GeoRoute(*locations)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &grpcproto.GeoRouteResponse{
|
||||
Polyline: route.Summary.Polyline,
|
||||
Polyline: route.Polyline.String(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s SilvermobiGRPCService) GeoRouteWithReturn(ctx context.Context,
|
||||
req *grpcproto.GeoRouteWithReturnRequest) (*grpcproto.GeoRouteWithReturnResponse, error) {
|
||||
|
||||
var (
|
||||
route, returnRoute *routing.Route
|
||||
)
|
||||
|
||||
locationsRaw, ok := req.Locations.(*grpcproto.GeoRouteWithReturnRequest_LocationsRaw)
|
||||
|
||||
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(locationsRaw.LocationsRaw))
|
||||
locations, err := geojson.UnmarshalFeatureCollection([]byte(locations_raw.LocationsRaw))
|
||||
if err != nil {
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
if route, err = s.Handler.GeoRoute(*locations); err != nil {
|
||||
route, err := s.Handler.GeoRoute(*locations)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if returnRoute, err = s.Handler.GeoReturnRoute(*locations); err != nil {
|
||||
return_route, err := s.Handler.GeoReturnRoute(*locations)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &grpcproto.GeoRouteWithReturnResponse{
|
||||
Polyline: route.Summary.Polyline,
|
||||
ReturnPolyline: returnRoute.Summary.Polyline,
|
||||
Polyline: route.Polyline.String(),
|
||||
ReturnPolyline: return_route.Polyline.String(),
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -4,38 +4,28 @@ import (
|
|||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"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"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func (s SilvermobiGRPCService) SetPhoneNumber(ctx context.Context,
|
||||
req *grpcproto.SetPhoneNumberRequest) (res *grpcproto.SetPhoneNumberResponse, err error) {
|
||||
|
||||
var (
|
||||
md metadata.MD
|
||||
authHeader []string
|
||||
ok bool
|
||||
)
|
||||
|
||||
if md, ok = metadata.FromIncomingContext(ctx); !ok {
|
||||
func (s SilvermobiGRPCService) SetPhoneNumber(ctx context.Context, req *grpcproto.SetPhoneNumberRequest) (res *grpcproto.SetPhoneNumberResponse, err error) {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil, status.Errorf(codes.Unauthenticated, "Missing metadata")
|
||||
}
|
||||
|
||||
authHeader, ok = md["authorization"]
|
||||
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("SetPhoneNumber")
|
||||
|
@ -50,33 +40,20 @@ func (s SilvermobiGRPCService) SetPhoneNumber(ctx context.Context,
|
|||
return &grpcproto.SetPhoneNumberResponse{Ok: true}, nil
|
||||
}
|
||||
|
||||
func (s SilvermobiGRPCService) VerifyPhoneNumber(ctx context.Context,
|
||||
req *grpcproto.VerifyPhoneNumberRequest) (res *grpcproto.VerifyPhoneNumberResponse, err error) {
|
||||
|
||||
var (
|
||||
md metadata.MD
|
||||
authHeader []string
|
||||
ok bool
|
||||
)
|
||||
|
||||
if md, ok = metadata.FromIncomingContext(ctx); !ok {
|
||||
func (s SilvermobiGRPCService) VerifyPhoneNumber(ctx context.Context, req *grpcproto.VerifyPhoneNumberRequest) (res *grpcproto.VerifyPhoneNumberResponse, err error) {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil, status.Errorf(codes.Unauthenticated, "Missing metadata")
|
||||
}
|
||||
|
||||
authHeader, ok = md["authorization"]
|
||||
|
||||
authHeader, ok := md["authorization"]
|
||||
if !ok || len(authHeader) == 0 {
|
||||
return nil, status.Errorf(codes.Unauthenticated,
|
||||
"Missing authorization header")
|
||||
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,
|
||||
|
@ -89,31 +66,21 @@ func (s SilvermobiGRPCService) VerifyPhoneNumber(ctx context.Context,
|
|||
return &grpcproto.VerifyPhoneNumberResponse{Ok: true}, nil
|
||||
}
|
||||
|
||||
func (s SilvermobiGRPCService) SetBirthDate(ctx context.Context,
|
||||
req *grpcproto.BirthDateRequest) (res *grpcproto.BirthDateResponse, err error) {
|
||||
|
||||
var (
|
||||
md metadata.MD
|
||||
authHeader []string
|
||||
ok bool
|
||||
)
|
||||
|
||||
if md, ok = metadata.FromIncomingContext(ctx); !ok {
|
||||
func (s SilvermobiGRPCService) SetBirthDate(ctx context.Context, req *grpcproto.BirthDateRequest) (res *grpcproto.BirthDateResponse, err error) {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil, status.Errorf(codes.Unauthenticated, "Missing metadata")
|
||||
}
|
||||
|
||||
authHeader, ok = md["authorization"]
|
||||
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("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 {
|
||||
|
@ -125,85 +92,55 @@ func (s SilvermobiGRPCService) SetBirthDate(ctx context.Context,
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (s SilvermobiGRPCService) SetAccountType(ctx context.Context,
|
||||
req *grpcproto.AccountTypeRequest) (res *grpcproto.AccountTypeResponse, err error) {
|
||||
|
||||
var (
|
||||
md metadata.MD
|
||||
authHeader []string
|
||||
ok bool
|
||||
)
|
||||
|
||||
if md, ok = metadata.FromIncomingContext(ctx); !ok {
|
||||
func (s SilvermobiGRPCService) SetAccountType(ctx context.Context, req *grpcproto.AccountTypeRequest) (res *grpcproto.AccountTypeResponse, err error) {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil, status.Errorf(codes.Unauthenticated, "Missing metadata")
|
||||
}
|
||||
|
||||
authHeader, ok = md["authorization"]
|
||||
authHeader, ok := md["authorization"]
|
||||
if !ok || len(authHeader) == 0 {
|
||||
return nil, status.Errorf(codes.Unauthenticated,
|
||||
"Missing authorization header")
|
||||
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("SetAccountType")
|
||||
|
||||
if req.GetType() != grpcproto.AccountTypeRequest_PASSENGER && req.GetType() != grpcproto.AccountTypeRequest_DRIVER {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "Type should be PASSENGER or DRIVER")
|
||||
}
|
||||
|
||||
if err = s.Handler.SetAccountType(ctx, id, req.GetType().String()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &grpcproto.AccountTypeResponse{
|
||||
Ok: true,
|
||||
}, nil
|
||||
|
||||
}
|
||||
|
||||
func (s SilvermobiGRPCService) GetAccountType(ctx context.Context,
|
||||
req *grpcproto.AccountTypeRequest) (res *grpcproto.AccountTypeResponse, err error) {
|
||||
|
||||
var (
|
||||
md metadata.MD
|
||||
authHeader []string
|
||||
ok bool
|
||||
accountType string
|
||||
responseType grpcproto.AccountTypeResponse_AccountType
|
||||
)
|
||||
|
||||
if md, ok = metadata.FromIncomingContext(ctx); !ok {
|
||||
func (s SilvermobiGRPCService) GetAccountType(ctx context.Context, req *grpcproto.AccountTypeRequest) (res *grpcproto.AccountTypeResponse, err error) {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil, status.Errorf(codes.Unauthenticated, "Missing metadata")
|
||||
}
|
||||
|
||||
authHeader, ok = md["authorization"]
|
||||
|
||||
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("GetAccountType")
|
||||
|
||||
if req.Request == false || !req.Request {
|
||||
if req.Request == nil || !*req.Request {
|
||||
return nil, status.Errorf(codes.InvalidArgument, "request arg should be true")
|
||||
}
|
||||
|
||||
if accountType, err = s.Handler.GetAccountType(ctx, id); err != nil {
|
||||
account_type, err := s.Handler.GetAccountType(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch accountType {
|
||||
var responseType grpcproto.AccountTypeResponse_AccountType
|
||||
switch account_type {
|
||||
case "PASSENGER":
|
||||
responseType = grpcproto.AccountTypeResponse_PASSENGER
|
||||
case "DRIVER":
|
||||
|
@ -213,73 +150,52 @@ func (s SilvermobiGRPCService) GetAccountType(ctx context.Context,
|
|||
}
|
||||
|
||||
response := &grpcproto.AccountTypeResponse{
|
||||
Type: responseType,
|
||||
Type: &responseType,
|
||||
}
|
||||
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (s SilvermobiGRPCService) GetValidation(ctx context.Context,
|
||||
req *grpcproto.ValidationRequest) (res *grpcproto.ValidationResponse, err error) {
|
||||
|
||||
var (
|
||||
md metadata.MD
|
||||
authHeader []string
|
||||
ok, phoneValidation, birthValidation, typeValidation bool
|
||||
)
|
||||
|
||||
if md, ok = metadata.FromIncomingContext(ctx); ok {
|
||||
func (s SilvermobiGRPCService) GetValidation(ctx context.Context, req *grpcproto.ValidationRequest) (res *grpcproto.ValidationResponse, err error) {
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
if !ok {
|
||||
return nil, status.Errorf(codes.Unauthenticated, "Missing metadata")
|
||||
}
|
||||
|
||||
authHeader, ok = md["authorization"]
|
||||
|
||||
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)
|
||||
|
||||
if phoneValidation, birthValidation, typeValidation, err = s.Handler.CheckValidation(ctx, id); err != nil {
|
||||
fmt.Println(id)
|
||||
phone_validation, birth_validation, type_validation, err := s.Handler.CheckValidation(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &grpcproto.ValidationResponse{
|
||||
Phone: phoneValidation,
|
||||
Birthdate: birthValidation,
|
||||
Type: typeValidation,
|
||||
Phone: phone_validation,
|
||||
Birthdate: birth_validation,
|
||||
Type: type_validation,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func ExtractIdFromToken(tokenString string) string {
|
||||
var (
|
||||
err error
|
||||
payloadBytes []byte
|
||||
payloadMap map[string]interface{}
|
||||
id string
|
||||
ok bool
|
||||
)
|
||||
|
||||
parts := strings.Split(tokenString, ".")
|
||||
|
||||
if len(parts) != 3 {
|
||||
return ""
|
||||
}
|
||||
|
||||
if payloadBytes, err = base64.RawStdEncoding.DecodeString(parts[1]); err != nil {
|
||||
payloadBytes, err := base64.RawStdEncoding.DecodeString(parts[1])
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
if err = json.Unmarshal(payloadBytes, &payloadMap); err != nil {
|
||||
var payloadMap map[string]interface{}
|
||||
if err := json.Unmarshal(payloadBytes, &payloadMap); err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
if id, ok = payloadMap["sub"].(string); !ok {
|
||||
id, ok := payloadMap["sub"].(string)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
|
||||
return id
|
||||
}
|
||||
|
|
|
@ -2,20 +2,19 @@ package grpcserver
|
|||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
|
||||
"fmt"
|
||||
"git.coopgo.io/coopgo-apps/silvermobi/handler"
|
||||
grpcproto "git.coopgo.io/coopgo-apps/silvermobi/servers/grpcapi/proto"
|
||||
"github.com/golang-jwt/jwt/v4"
|
||||
grpcmiddleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
grpcauth "github.com/grpc-ecosystem/go-grpc-middleware/auth"
|
||||
grpcctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags"
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
grpc_auth "github.com/grpc-ecosystem/go-grpc-middleware/auth"
|
||||
grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/status"
|
||||
"net"
|
||||
)
|
||||
|
||||
type contextKey string
|
||||
|
@ -43,78 +42,62 @@ func NoAuth(method string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func UnaryAuthServerInterceptor(authFunc grpcauth.AuthFunc) grpc.UnaryServerInterceptor {
|
||||
func UnaryAuthServerInterceptor(authFunc grpc_auth.AuthFunc) grpc.UnaryServerInterceptor {
|
||||
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||
|
||||
var (
|
||||
newCtx context.Context
|
||||
err error
|
||||
)
|
||||
|
||||
print(info.FullMethod)
|
||||
|
||||
if NoAuth(info.FullMethod) {
|
||||
return handler(ctx, req)
|
||||
}
|
||||
|
||||
if newCtx, err = authFunc(ctx); err != nil {
|
||||
var newCtx context.Context
|
||||
var err error
|
||||
newCtx, err = authFunc(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return handler(newCtx, req)
|
||||
}
|
||||
}
|
||||
|
||||
func StreamAuthServerInterceptor(authFunc grpcauth.AuthFunc) grpc.StreamServerInterceptor {
|
||||
return func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo,
|
||||
handler grpc.StreamHandler) error {
|
||||
|
||||
var (
|
||||
newCtx context.Context
|
||||
err error
|
||||
)
|
||||
|
||||
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) {
|
||||
wrapped := grpcmiddleware.WrapServerStream(stream)
|
||||
wrapped := grpc_middleware.WrapServerStream(stream)
|
||||
wrapped.WrappedContext = stream.Context()
|
||||
|
||||
return handler(srv, wrapped)
|
||||
}
|
||||
|
||||
if newCtx, err = authFunc(stream.Context()); err != nil {
|
||||
var newCtx context.Context
|
||||
var err error
|
||||
newCtx, err = authFunc(stream.Context())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
wrapped := grpcmiddleware.WrapServerStream(stream)
|
||||
wrapped := grpc_middleware.WrapServerStream(stream)
|
||||
wrapped.WrappedContext = newCtx
|
||||
|
||||
return handler(srv, wrapped)
|
||||
}
|
||||
}
|
||||
|
||||
type SilvermobiGRPCService struct {
|
||||
Config *viper.Viper
|
||||
Handler *handler.SilverMobiHandler
|
||||
Handler *handler.SilvermobiHandler
|
||||
grpcproto.UnimplementedSilvermobiGRPCServer
|
||||
}
|
||||
|
||||
type SolidarityService struct {
|
||||
Config *viper.Viper
|
||||
Handler *handler.SilverMobiHandler
|
||||
SolidarityClient grpcproto.SolidarityServiceClient
|
||||
grpcproto.UnimplementedSolidarityServiceServer
|
||||
Config *viper.Viper
|
||||
Handler *handler.SilvermobiHandler
|
||||
SolidarityClient grpcproto.SolidarityServiceClient
|
||||
grpcproto.UnimplementedSolidarityServiceServer // Add this client
|
||||
}
|
||||
|
||||
func NewSolidarityService(cfg *viper.Viper, handler *handler.SilverMobiHandler) SolidarityService {
|
||||
func NewSolidarityService(cfg *viper.Viper, handler *handler.SilvermobiHandler) SolidarityService {
|
||||
solidarityServiceAddress := cfg.GetString("solidarity_service.address")
|
||||
|
||||
conn, err := grpc.NewClient(solidarityServiceAddress, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
conn, err := grpc.Dial(solidarityServiceAddress, grpc.WithInsecure())
|
||||
if err != nil {
|
||||
log.Fatal().Err(err)
|
||||
}
|
||||
|
||||
solidarityClient := grpcproto.NewSolidarityServiceClient(conn)
|
||||
|
||||
return SolidarityService{
|
||||
Config: cfg,
|
||||
Handler: handler,
|
||||
|
@ -122,70 +105,63 @@ func NewSolidarityService(cfg *viper.Viper, handler *handler.SilverMobiHandler)
|
|||
}
|
||||
}
|
||||
|
||||
func NewSilvermobiGRPCService(cfg *viper.Viper, handler *handler.SilverMobiHandler) SilvermobiGRPCService {
|
||||
func NewSilvermobiGRPCService(cfg *viper.Viper, handler *handler.SilvermobiHandler) SilvermobiGRPCService {
|
||||
return SilvermobiGRPCService{
|
||||
Config: cfg,
|
||||
Handler: handler,
|
||||
}
|
||||
}
|
||||
|
||||
func Run(done chan error, cfg *viper.Viper, handler *handler.SilverMobiHandler) {
|
||||
func Run(done chan error, cfg *viper.Viper, handler *handler.SilvermobiHandler) {
|
||||
var (
|
||||
address = cfg.GetString("services.external.grpc.ip") + ":" + cfg.GetString("services.external.grpc.port")
|
||||
jwtSecret = cfg.GetString("identification.local.jwt_secret")
|
||||
address = cfg.GetString("services.external.grpc.ip") + ":" + cfg.GetString("services.external.grpc.port")
|
||||
jwt_secret = cfg.GetString("identification.local.jwt_secret")
|
||||
)
|
||||
|
||||
log.Info().Msg("GRPC server on " + address)
|
||||
|
||||
server := grpc.NewServer(
|
||||
grpc.StreamInterceptor(grpcmiddleware.ChainStreamServer(
|
||||
grpcctxtags.StreamServerInterceptor(),
|
||||
StreamAuthServerInterceptor(GRPCAuthFunc(jwtSecret)),
|
||||
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
|
||||
grpc_ctxtags.StreamServerInterceptor(),
|
||||
StreamAuthServerInterceptor(GRPCAuthFunc(jwt_secret)),
|
||||
)),
|
||||
grpc.UnaryInterceptor(grpcmiddleware.ChainUnaryServer(
|
||||
grpcctxtags.UnaryServerInterceptor(),
|
||||
UnaryAuthServerInterceptor(GRPCAuthFunc(jwtSecret)),
|
||||
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
|
||||
grpc_ctxtags.UnaryServerInterceptor(),
|
||||
UnaryAuthServerInterceptor(GRPCAuthFunc(jwt_secret)),
|
||||
)),
|
||||
)
|
||||
|
||||
solidarityService := NewSolidarityService(cfg, handler)
|
||||
solidarity_service := NewSolidarityService(cfg, handler)
|
||||
|
||||
silvermobiService := NewSilvermobiGRPCService(cfg, handler)
|
||||
grpcproto.RegisterSilvermobiGRPCServer(server, silvermobiService)
|
||||
grpcproto.RegisterSolidarityServiceServer(server, &solidarityService)
|
||||
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)
|
||||
}
|
||||
|
||||
if err = server.Serve(l); err != nil {
|
||||
if err := server.Serve(l); err != nil {
|
||||
log.Error().Err(err).Msg("gRPC service ended")
|
||||
done <- err
|
||||
}
|
||||
}
|
||||
|
||||
func GRPCAuthFunc(jwtKey string) grpcauth.AuthFunc {
|
||||
func GRPCAuthFunc(jwtKey string) grpc_auth.AuthFunc {
|
||||
return func(ctx context.Context) (context.Context, error) {
|
||||
|
||||
var token *jwt.Token
|
||||
|
||||
tokenString, err := grpcauth.AuthFromMD(ctx, "bearer")
|
||||
|
||||
tokenString, err := grpc_auth.AuthFromMD(ctx, "bearer")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
claims := jwt.MapClaims{}
|
||||
|
||||
token, err = jwt.ParseWithClaims(tokenString, claims, func(token *jwt.Token) (interface{}, error) {
|
||||
token, err := jwt.ParseWithClaims(tokenString, claims, func(token *jwt.Token) (interface{}, error) {
|
||||
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))
|
||||
|
||||
return ctx, nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,106 +2,76 @@ 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) {
|
||||
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) {
|
||||
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) {
|
||||
|
||||
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")
|
||||
|
||||
if resp, err = s.SolidarityClient.CreateBooking(ctx, req); err != nil {
|
||||
return nil, err
|
||||
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)
|
||||
}
|
||||
|
||||
if err = 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 != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if 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."); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (s *SolidarityService) UpdateBooking(ctx context.Context,
|
||||
req *proto.UpdateBookingRequest) (resp *proto.UpdateBookingResponse, err error) {
|
||||
|
||||
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) {
|
||||
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) {
|
||||
|
||||
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) {
|
||||
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) {
|
||||
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
|
||||
}
|
||||
|
|
|
@ -2,27 +2,22 @@ package grpcserver
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
grpcproto "git.coopgo.io/coopgo-apps/silvermobi/servers/grpcapi/proto"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func (s SilvermobiGRPCService) UpdatePassword(ctx context.Context,
|
||||
req *grpcproto.UpdatePasswordRequest) (res *grpcproto.UpdatePasswordResponse, err error) {
|
||||
|
||||
func (s SilvermobiGRPCService) UpdatePassword(ctx context.Context, req *grpcproto.UpdatePasswordRequest) (res *grpcproto.UpdatePasswordResponse, err error) {
|
||||
log.Info().
|
||||
Str("username", req.Email).
|
||||
Msg("Update Password")
|
||||
|
||||
result := s.Handler.UpdatePassword(ctx, req.Email, req.Password)
|
||||
if result {
|
||||
if result == true {
|
||||
return &grpcproto.UpdatePasswordResponse{
|
||||
Response: true,
|
||||
}, nil
|
||||
} else {
|
||||
return &grpcproto.UpdatePasswordResponse{
|
||||
Response: false,
|
||||
}, nil
|
||||
}
|
||||
|
||||
return &grpcproto.UpdatePasswordResponse{
|
||||
Response: false,
|
||||
}, nil
|
||||
|
||||
}
|
||||
|
|
|
@ -2,12 +2,10 @@ package services
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.coopgo.io/coopgo-apps/silvermobi/models"
|
||||
mobilityaccounts "git.coopgo.io/coopgo-platform/mobility-accounts/grpcapi"
|
||||
ma "git.coopgo.io/coopgo-platform/mobility-accounts/storage"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
)
|
||||
|
||||
|
@ -16,8 +14,7 @@ type MobilityAccountService struct {
|
|||
}
|
||||
|
||||
func NewMobilityAccountService(mobilityAccountsDial string) (MobilityAccountService, error) {
|
||||
mobilityAccountsConn, err := grpc.NewClient(mobilityAccountsDial,
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
mobilityAccountsConn, err := grpc.Dial(mobilityAccountsDial, grpc.WithInsecure())
|
||||
|
||||
client := mobilityaccounts.NewMobilityAccountsClient(mobilityAccountsConn)
|
||||
if err != nil {
|
||||
|
@ -45,7 +42,6 @@ func (s MobilityAccountService) Login(ctx context.Context, username, password, n
|
|||
|
||||
func (s MobilityAccountService) UpdateAccountData(ctx context.Context, id string, data map[string]any) error {
|
||||
d, err := structpb.NewStruct(data)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -67,17 +63,14 @@ func (s MobilityAccountService) UpdatePassword(ctx context.Context, id string, p
|
|||
Id: id,
|
||||
Password: password,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
if err == nil {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (s MobilityAccountService) GetAccountUsername(ctx context.Context,
|
||||
username string, namespace string) (*models.Account, error) {
|
||||
|
||||
func (s MobilityAccountService) GetAccountUsername(ctx context.Context, username string, namespace string) (*models.Account, error) {
|
||||
resp, err := s.Client.GetAccountUsername(ctx, &mobilityaccounts.GetAccountUsernameRequest{
|
||||
Username: username,
|
||||
Namespace: namespace,
|
||||
|
@ -85,22 +78,17 @@ func (s MobilityAccountService) GetAccountUsername(ctx context.Context,
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return s.ToAccountModel(resp.Account.ToStorageType()), nil
|
||||
}
|
||||
|
||||
func (s MobilityAccountService) Register(ctx context.Context, username string, password string,
|
||||
email string, phoneNumber string, data map[string]any, namespace string) (*models.Account, error) {
|
||||
|
||||
var resp *mobilityaccounts.RegisterResponse
|
||||
|
||||
func (s MobilityAccountService) Register(ctx context.Context, username string, password string, email string, phone_number string, data map[string]any, namespace string) (*models.Account, error) {
|
||||
account := &ma.Account{
|
||||
Authentication: ma.AccountAuth{
|
||||
Local: ma.LocalAuth{
|
||||
Username: username,
|
||||
Password: password,
|
||||
Email: email,
|
||||
PhoneNumber: phoneNumber,
|
||||
PhoneNumber: phone_number,
|
||||
},
|
||||
},
|
||||
Namespace: namespace,
|
||||
|
@ -112,26 +100,28 @@ func (s MobilityAccountService) Register(ctx context.Context, username string, p
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if resp, err = s.Client.Register(ctx, &mobilityaccounts.RegisterRequest{
|
||||
resp, err := s.Client.Register(ctx, &mobilityaccounts.RegisterRequest{
|
||||
Account: acc,
|
||||
}); err != nil {
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return s.ToAccountModel(resp.Account.ToStorageType()), nil
|
||||
}
|
||||
func (s MobilityAccountService) UpdatePhoneNumber(ctx context.Context, accountID string, phoneNumber string,
|
||||
verified bool, verificationCode string) error {
|
||||
|
||||
if _, err := s.Client.UpdatePhoneNumber(
|
||||
func (s MobilityAccountService) UpdatePhoneNumber(ctx context.Context, accountid string, phone_number string, verified bool, verification_code string) error {
|
||||
_, err := s.Client.UpdatePhoneNumber(
|
||||
ctx,
|
||||
&mobilityaccounts.UpdatePhoneNumberRequest{
|
||||
Id: accountID,
|
||||
PhoneNumber: phoneNumber,
|
||||
Id: accountid,
|
||||
PhoneNumber: phone_number,
|
||||
Verified: verified,
|
||||
VerificationCode: verificationCode,
|
||||
VerificationCode: verification_code,
|
||||
},
|
||||
); err != nil {
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -139,30 +129,20 @@ func (s MobilityAccountService) UpdatePhoneNumber(ctx context.Context, accountID
|
|||
}
|
||||
|
||||
func (s MobilityAccountService) SetAccountType(ctx context.Context, id string, accountType string) error {
|
||||
|
||||
var (
|
||||
account *mobilityaccounts.GetAccountResponse
|
||||
err error
|
||||
)
|
||||
|
||||
if account, err = s.Client.GetAccount(ctx, &mobilityaccounts.GetAccountRequest{
|
||||
account, err := s.Client.GetAccount(ctx, &mobilityaccounts.GetAccountRequest{
|
||||
Id: id,
|
||||
}); err != nil {
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
data := make(map[string]interface{})
|
||||
|
||||
data["type"] = accountType
|
||||
|
||||
dataStruct := &structpb.Struct{
|
||||
Fields: make(map[string]*structpb.Value),
|
||||
}
|
||||
|
||||
for key, value := range data {
|
||||
|
||||
stringValue, ok := value.(string)
|
||||
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
@ -173,34 +153,22 @@ func (s MobilityAccountService) SetAccountType(ctx context.Context, id string, a
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
account.Account.Data = dataStruct
|
||||
|
||||
if _, err = s.Client.UpdateData(ctx, &mobilityaccounts.UpdateDataRequest{
|
||||
_, err = s.Client.UpdateData(ctx, &mobilityaccounts.UpdateDataRequest{
|
||||
Account: account.Account,
|
||||
}); err != nil {
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func (s MobilityAccountService) UpdateAccountBirthDate(ctx context.Context, id string,
|
||||
namespace string, birthdate string) error {
|
||||
|
||||
var (
|
||||
account *mobilityaccounts.GetAccountResponse
|
||||
err error
|
||||
)
|
||||
|
||||
if account, err = s.Client.GetAccount(ctx, &mobilityaccounts.GetAccountRequest{
|
||||
func (s MobilityAccountService) UpdateAccountBirthDate(ctx context.Context, id string, namespace string, birthdate string) error {
|
||||
account, err := s.Client.GetAccount(ctx, &mobilityaccounts.GetAccountRequest{
|
||||
Id: id,
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
})
|
||||
data := make(map[string]interface{})
|
||||
|
||||
data["birthdate"] = birthdate
|
||||
|
||||
dataStruct := &structpb.Struct{
|
||||
|
@ -209,7 +177,6 @@ func (s MobilityAccountService) UpdateAccountBirthDate(ctx context.Context, id s
|
|||
|
||||
for key, value := range data {
|
||||
stringValue, ok := value.(string)
|
||||
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
@ -220,56 +187,47 @@ func (s MobilityAccountService) UpdateAccountBirthDate(ctx context.Context, id s
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
account.Account.Data = dataStruct
|
||||
|
||||
if _, err = s.Client.UpdateData(ctx, &mobilityaccounts.UpdateDataRequest{
|
||||
_, err = s.Client.UpdateData(ctx, &mobilityaccounts.UpdateDataRequest{
|
||||
Account: account.Account,
|
||||
}); err != nil {
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s MobilityAccountService) ToAccountModel(account ma.Account) *models.Account {
|
||||
|
||||
var (
|
||||
accountType, birthDate, phoneNumber, email string
|
||||
ok bool
|
||||
)
|
||||
|
||||
firstName := account.Data["first_name"].(string)
|
||||
lastName := account.Data["last_name"].(string)
|
||||
|
||||
if birthDate, ok = account.Data["birthdate"].(string); !ok {
|
||||
birthDate = ""
|
||||
first_name := account.Data["first_name"].(string)
|
||||
last_name := account.Data["last_name"].(string)
|
||||
birth_date, ok := account.Data["birthdate"].(string)
|
||||
if !ok {
|
||||
birth_date = ""
|
||||
}
|
||||
|
||||
if accountType, ok = account.Data["type"].(string); !ok {
|
||||
accountType, ok := account.Data["type"].(string)
|
||||
if !ok {
|
||||
accountType = ""
|
||||
}
|
||||
|
||||
if phoneNumber, ok = account.Data["phone_number"].(string); !ok {
|
||||
phoneNumber = ""
|
||||
phone_number, ok := account.Data["phone_number"].(string)
|
||||
if !ok {
|
||||
phone_number = ""
|
||||
}
|
||||
|
||||
if email, ok = account.Data["email"].(string); !ok {
|
||||
email, ok := account.Data["email"].(string)
|
||||
if !ok {
|
||||
email = ""
|
||||
}
|
||||
|
||||
return &models.Account{
|
||||
ID: account.ID,
|
||||
FirstName: firstName,
|
||||
LastName: lastName,
|
||||
FirstName: first_name,
|
||||
LastName: last_name,
|
||||
Email: email,
|
||||
BirthDate: birthDate,
|
||||
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: phoneNumber,
|
||||
PhoneNumber: phone_number,
|
||||
PhoneNumberVerified: account.Authentication.Local.PhoneNumberValidation.Validated,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2,12 +2,11 @@ package services
|
|||
|
||||
import (
|
||||
"context"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
|
||||
"github.com/appleboy/gorush/rpc/proto"
|
||||
"github.com/rs/zerolog/log"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -37,8 +36,7 @@ type PushService struct {
|
|||
}
|
||||
|
||||
func NewPushService(address string) (*PushService, error) {
|
||||
conn, err := grpc.NewClient(address,
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
conn, err := grpc.Dial(address, grpc.WithInsecure())
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -50,12 +48,6 @@ func NewPushService(address string) (*PushService, error) {
|
|||
}
|
||||
|
||||
func (s *PushService) Send(notification Notification) error {
|
||||
|
||||
var (
|
||||
resp *proto.NotificationReply
|
||||
err error
|
||||
)
|
||||
|
||||
log.Debug().
|
||||
Int32("Platform", notification.Platform).
|
||||
Strs("recipients", notification.Recipients).
|
||||
|
@ -63,7 +55,7 @@ func (s *PushService) Send(notification Notification) error {
|
|||
Str("notification_title", notification.Title).
|
||||
Msg("Send notification")
|
||||
|
||||
if resp, err = s.Client.Send(context.Background(), &proto.NotificationRequest{
|
||||
resp, err := s.Client.Send(context.Background(), &proto.NotificationRequest{
|
||||
Data: notification.Data,
|
||||
ID: notification.ID,
|
||||
Platform: notification.Platform,
|
||||
|
@ -75,7 +67,9 @@ func (s *PushService) Send(notification Notification) error {
|
|||
Title: notification.Title,
|
||||
Body: notification.Message,
|
||||
},
|
||||
}); err != nil {
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -2,58 +2,53 @@ package services
|
|||
|
||||
import (
|
||||
"git.coopgo.io/coopgo-platform/geocode"
|
||||
"git.coopgo.io/coopgo-platform/routing-service"
|
||||
routing "git.coopgo.io/coopgo-platform/routing-service"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
type ServiceHandler struct {
|
||||
type ServicesHandler struct {
|
||||
MobilityAccounts MobilityAccountService
|
||||
Push *PushService
|
||||
Geocoder geocode.Geocoder
|
||||
Routing routing.RoutingService
|
||||
}
|
||||
|
||||
func NewServicesHandler(cfg *viper.Viper) (*ServiceHandler, error) {
|
||||
func NewServicesHandler(cfg *viper.Viper) (*ServicesHandler, error) {
|
||||
var (
|
||||
mobilityAccountsDial = cfg.GetString("services.internal.mobility_accounts.dial")
|
||||
pushDial = cfg.GetString("services.internal.push.dial")
|
||||
geocoderType = cfg.GetString("geocoder.type")
|
||||
peliasBaseUrl = cfg.GetString("geocoder.pelias.base_url")
|
||||
routingServiceType = cfg.GetString("routing.type")
|
||||
valhallaBaseUrl = cfg.GetString("routing.valhalla.base_url")
|
||||
|
||||
mobilityAccounts MobilityAccountService
|
||||
push *PushService
|
||||
geocoder geocode.Geocoder
|
||||
routingsvc routing.RoutingService
|
||||
err error
|
||||
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")
|
||||
)
|
||||
|
||||
if mobilityAccounts, err = NewMobilityAccountService(mobilityAccountsDial); err != nil {
|
||||
mobilityAccounts, err := NewMobilityAccountService(mobilityAccountsDial)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("Could not connect to Mobility Accounts Service")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if push, err = NewPushService(pushDial); err != nil {
|
||||
push, err := NewPushService(pushDial)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("Could not connect to Push Notifications Service")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if geocoder, err = geocode.NewGeocoder(geocoderType, peliasBaseUrl); err != nil {
|
||||
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
|
||||
}
|
||||
|
||||
if routingsvc, err = routing.NewRoutingService(routingServiceType, valhallaBaseUrl); err != nil {
|
||||
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 &ServiceHandler{
|
||||
return &ServicesHandler{
|
||||
MobilityAccounts: mobilityAccounts,
|
||||
Push: push,
|
||||
Geocoder: geocoder,
|
||||
Routing: routingsvc,
|
||||
Geocoder: geocoder,
|
||||
Routing: routing,
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -3,13 +3,12 @@ package storage
|
|||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/google/uuid"
|
||||
_ "github.com/lib/pq"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type PostgresqlStorage struct {
|
||||
|
@ -20,79 +19,70 @@ type PostgresqlStorage struct {
|
|||
|
||||
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")
|
||||
pgSchema = cfg.GetString("storage.db.psql.schema")
|
||||
pgtablesUsersFirebase = cfg.GetString("storage.db.psql.tables.users_firebase")
|
||||
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)
|
||||
|
||||
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")
|
||||
}
|
||||
|
||||
if err = db.Ping(); err != nil {
|
||||
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: pgSchema,
|
||||
Schema: pg_schema,
|
||||
Tables: map[string]string{
|
||||
"users_firebase": fmt.Sprintf("%s.%s", pgSchema, pgtablesUsersFirebase),
|
||||
"users_firebase": fmt.Sprintf("%s.%s", pg_schema, pgtables_users_firebase),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s PostgresqlStorage) CreateFirebaseToken(userId string, fcmToken string, devicePlatform string) (err error) {
|
||||
|
||||
if _, err = uuid.Parse(userId); err != 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
|
||||
}
|
||||
if _, err = s.DbConnection.Exec(fmt.Sprintf("INSERT INTO %s "+
|
||||
"(user_id , fcm_token , device_platform) VALUES($1,$2,$3)", s.Tables["users_firebase"]),
|
||||
userId,
|
||||
fcmToken,
|
||||
devicePlatform); err != nil {
|
||||
_, 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(userId, devicePlatform, fcmToken)
|
||||
_ = s.UpdateFirebaseToken(user_id, device_platform, fcm_token)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
func (s PostgresqlStorage) GetFirebaseToken(userId string) (fcm string, devicePlatform string, err error) {
|
||||
if err = s.DbConnection.QueryRow(fmt.Sprintf("SELECT fcm_token , "+
|
||||
"device_platform FROM %s WHERE user_id = $1", s.Tables["users_firebase"]), userId).
|
||||
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,
|
||||
&devicePlatform,
|
||||
); err != nil {
|
||||
&device_platform,
|
||||
)
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
return fcm, devicePlatform, nil
|
||||
return fcm, device_platform, nil
|
||||
}
|
||||
func (s PostgresqlStorage) UpdateFirebaseToken(userId string, fcmToken string, devicePlatform string) error {
|
||||
query := fmt.Sprintf("UPDATE %s SET fcm_token ="+
|
||||
" $1 device_platform = $2 WHERE user_id = $3", s.Tables["users_firebase"])
|
||||
|
||||
if _, err := s.DbConnection.Exec(query, fcmToken, devicePlatform, userId); err != 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
|
||||
}
|
||||
|
|
|
@ -2,25 +2,24 @@ package storage
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
type Storage interface {
|
||||
CreateFirebaseToken(userId string, fcmToken string, devicePlatform string) (err error)
|
||||
UpdateFirebaseToken(userId string, fcmToken string, devicePlatform string) error
|
||||
GetFirebaseToken(userId string) (fcm string, devicePlatform string, err error)
|
||||
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 (
|
||||
storageType = cfg.GetString("storage.db.type")
|
||||
storage_type = cfg.GetString("storage.db.type")
|
||||
)
|
||||
switch storageType {
|
||||
switch storage_type {
|
||||
case "psql":
|
||||
s, err := NewPostgresqlStorage(cfg)
|
||||
return s, err
|
||||
default:
|
||||
return nil, fmt.Errorf("storage type %v is not supported", storageType)
|
||||
return nil, fmt.Errorf("storage type %v is not supported", storage_type)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue