feat: initial rust crate
This commit is contained in:
commit
c486c765ea
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Ignore everything
|
||||||
|
*
|
||||||
|
|
||||||
|
# But not these
|
||||||
|
!/.gitignore
|
||||||
|
!buf.gen.yaml
|
||||||
|
!buf.lock
|
||||||
|
!buf.yaml
|
||||||
|
|
||||||
|
!*.rs
|
||||||
|
!Cargo.toml
|
||||||
|
!Cargo.lock
|
||||||
|
|
||||||
|
!legal/*
|
||||||
|
|
||||||
|
!.woodpecker.yml
|
||||||
|
!LICENSE
|
||||||
|
!Makefile
|
||||||
|
!README.md
|
||||||
|
|
||||||
|
# ...even if they are in subdirectories
|
||||||
|
!*/
|
19
.woodpecker.yml
Normal file
19
.woodpecker.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# -- Switch back to depends_on when 2.1.x becomes available via cli
|
||||||
|
|
||||||
|
steps:
|
||||||
|
generate:
|
||||||
|
image: bufbuild/buf:1.28.1
|
||||||
|
commands:
|
||||||
|
- buf generate https://code.pitz.tech/licensing/proto.git
|
||||||
|
|
||||||
|
license:
|
||||||
|
image: golang:1.20
|
||||||
|
environment:
|
||||||
|
GO111MODULE: on
|
||||||
|
GOBIN: /usr/local/bin
|
||||||
|
commands:
|
||||||
|
- go install github.com/google/addlicense@latest
|
||||||
|
- addlicense -f ./legal/header.txt -skip yaml -skip yml -skip xml .
|
||||||
|
|
||||||
|
block-changes:
|
||||||
|
image: qwerty287/woodpecker-block-git-changes
|
870
Cargo.lock
generated
Normal file
870
Cargo.lock
generated
Normal file
@ -0,0 +1,870 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "addr2line"
|
||||||
|
version = "0.21.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
|
||||||
|
dependencies = [
|
||||||
|
"gimli",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "adler"
|
||||||
|
version = "1.0.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "anyhow"
|
||||||
|
version = "1.0.78"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ca87830a3e3fb156dc96cfbd31cb620265dd053be734723f22b760d6cc3c3051"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "async-stream"
|
||||||
|
version = "0.3.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51"
|
||||||
|
dependencies = [
|
||||||
|
"async-stream-impl",
|
||||||
|
"futures-core",
|
||||||
|
"pin-project-lite",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "async-stream-impl"
|
||||||
|
version = "0.3.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "async-trait"
|
||||||
|
version = "0.1.76"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "autocfg"
|
||||||
|
version = "1.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "axum"
|
||||||
|
version = "0.6.20"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
|
||||||
|
dependencies = [
|
||||||
|
"async-trait",
|
||||||
|
"axum-core",
|
||||||
|
"bitflags",
|
||||||
|
"bytes",
|
||||||
|
"futures-util",
|
||||||
|
"http",
|
||||||
|
"http-body",
|
||||||
|
"hyper",
|
||||||
|
"itoa",
|
||||||
|
"matchit",
|
||||||
|
"memchr",
|
||||||
|
"mime",
|
||||||
|
"percent-encoding",
|
||||||
|
"pin-project-lite",
|
||||||
|
"rustversion",
|
||||||
|
"serde",
|
||||||
|
"sync_wrapper",
|
||||||
|
"tower",
|
||||||
|
"tower-layer",
|
||||||
|
"tower-service",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "axum-core"
|
||||||
|
version = "0.3.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
|
||||||
|
dependencies = [
|
||||||
|
"async-trait",
|
||||||
|
"bytes",
|
||||||
|
"futures-util",
|
||||||
|
"http",
|
||||||
|
"http-body",
|
||||||
|
"mime",
|
||||||
|
"rustversion",
|
||||||
|
"tower-layer",
|
||||||
|
"tower-service",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "backtrace"
|
||||||
|
version = "0.3.69"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837"
|
||||||
|
dependencies = [
|
||||||
|
"addr2line",
|
||||||
|
"cc",
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
"miniz_oxide",
|
||||||
|
"object",
|
||||||
|
"rustc-demangle",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "base64"
|
||||||
|
version = "0.21.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bitflags"
|
||||||
|
version = "1.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "bytes"
|
||||||
|
version = "1.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cc"
|
||||||
|
version = "1.0.83"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cfg-if"
|
||||||
|
version = "1.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crc32fast"
|
||||||
|
version = "1.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "either"
|
||||||
|
version = "1.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "equivalent"
|
||||||
|
version = "1.0.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "flate2"
|
||||||
|
version = "1.0.26"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743"
|
||||||
|
dependencies = [
|
||||||
|
"crc32fast",
|
||||||
|
"miniz_oxide",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "fnv"
|
||||||
|
version = "1.0.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "futures-channel"
|
||||||
|
version = "0.3.30"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
|
||||||
|
dependencies = [
|
||||||
|
"futures-core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "futures-core"
|
||||||
|
version = "0.3.30"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "futures-sink"
|
||||||
|
version = "0.3.30"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "futures-task"
|
||||||
|
version = "0.3.30"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "futures-util"
|
||||||
|
version = "0.3.30"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
|
||||||
|
dependencies = [
|
||||||
|
"futures-core",
|
||||||
|
"futures-task",
|
||||||
|
"pin-project-lite",
|
||||||
|
"pin-utils",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "getrandom"
|
||||||
|
version = "0.2.11"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
"wasi",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "gimli"
|
||||||
|
version = "0.28.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "h2"
|
||||||
|
version = "0.3.22"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"fnv",
|
||||||
|
"futures-core",
|
||||||
|
"futures-sink",
|
||||||
|
"futures-util",
|
||||||
|
"http",
|
||||||
|
"indexmap 2.1.0",
|
||||||
|
"slab",
|
||||||
|
"tokio",
|
||||||
|
"tokio-util",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hashbrown"
|
||||||
|
version = "0.12.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hashbrown"
|
||||||
|
version = "0.14.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "http"
|
||||||
|
version = "0.2.11"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"fnv",
|
||||||
|
"itoa",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "http-body"
|
||||||
|
version = "0.4.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"http",
|
||||||
|
"pin-project-lite",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "httparse"
|
||||||
|
version = "1.8.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "httpdate"
|
||||||
|
version = "1.0.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hyper"
|
||||||
|
version = "0.14.28"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"futures-channel",
|
||||||
|
"futures-core",
|
||||||
|
"futures-util",
|
||||||
|
"h2",
|
||||||
|
"http",
|
||||||
|
"http-body",
|
||||||
|
"httparse",
|
||||||
|
"httpdate",
|
||||||
|
"itoa",
|
||||||
|
"pin-project-lite",
|
||||||
|
"socket2",
|
||||||
|
"tokio",
|
||||||
|
"tower-service",
|
||||||
|
"tracing",
|
||||||
|
"want",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hyper-timeout"
|
||||||
|
version = "0.4.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
|
||||||
|
dependencies = [
|
||||||
|
"hyper",
|
||||||
|
"pin-project-lite",
|
||||||
|
"tokio",
|
||||||
|
"tokio-io-timeout",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "indexmap"
|
||||||
|
version = "1.9.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
"hashbrown 0.12.3",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "indexmap"
|
||||||
|
version = "2.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
|
||||||
|
dependencies = [
|
||||||
|
"equivalent",
|
||||||
|
"hashbrown 0.14.3",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itertools"
|
||||||
|
version = "0.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
|
||||||
|
dependencies = [
|
||||||
|
"either",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itoa"
|
||||||
|
version = "1.0.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libc"
|
||||||
|
version = "0.2.151"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "licensing-api"
|
||||||
|
version = "0.0.0"
|
||||||
|
dependencies = [
|
||||||
|
"prost",
|
||||||
|
"serde",
|
||||||
|
"tonic",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "matchit"
|
||||||
|
version = "0.7.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memchr"
|
||||||
|
version = "2.7.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mime"
|
||||||
|
version = "0.3.17"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "miniz_oxide"
|
||||||
|
version = "0.7.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7"
|
||||||
|
dependencies = [
|
||||||
|
"adler",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mio"
|
||||||
|
version = "0.8.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"wasi",
|
||||||
|
"windows-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "object"
|
||||||
|
version = "0.32.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "once_cell"
|
||||||
|
version = "1.19.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "percent-encoding"
|
||||||
|
version = "2.3.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pin-project"
|
||||||
|
version = "1.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422"
|
||||||
|
dependencies = [
|
||||||
|
"pin-project-internal",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pin-project-internal"
|
||||||
|
version = "1.1.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pin-project-lite"
|
||||||
|
version = "0.2.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pin-utils"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ppv-lite86"
|
||||||
|
version = "0.2.17"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "proc-macro2"
|
||||||
|
version = "1.0.72"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a293318316cf6478ec1ad2a21c49390a8d5b5eae9fab736467d93fbc0edc29c5"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "prost"
|
||||||
|
version = "0.12.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"prost-derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "prost-derive"
|
||||||
|
version = "0.12.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"itertools",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "quote"
|
||||||
|
version = "1.0.34"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "22a37c9326af5ed140c86a46655b5278de879853be5573c01df185b6f49a580a"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand"
|
||||||
|
version = "0.8.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"rand_chacha",
|
||||||
|
"rand_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand_chacha"
|
||||||
|
version = "0.3.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
||||||
|
dependencies = [
|
||||||
|
"ppv-lite86",
|
||||||
|
"rand_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rand_core"
|
||||||
|
version = "0.6.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||||
|
dependencies = [
|
||||||
|
"getrandom",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustc-demangle"
|
||||||
|
version = "0.1.23"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustversion"
|
||||||
|
version = "1.0.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde"
|
||||||
|
version = "1.0.193"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
|
||||||
|
dependencies = [
|
||||||
|
"serde_derive",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_derive"
|
||||||
|
version = "1.0.193"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "slab"
|
||||||
|
version = "0.4.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "socket2"
|
||||||
|
version = "0.5.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"windows-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "syn"
|
||||||
|
version = "2.0.43"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sync_wrapper"
|
||||||
|
version = "0.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tokio"
|
||||||
|
version = "1.35.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104"
|
||||||
|
dependencies = [
|
||||||
|
"backtrace",
|
||||||
|
"bytes",
|
||||||
|
"libc",
|
||||||
|
"mio",
|
||||||
|
"pin-project-lite",
|
||||||
|
"socket2",
|
||||||
|
"windows-sys",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tokio-io-timeout"
|
||||||
|
version = "1.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
|
||||||
|
dependencies = [
|
||||||
|
"pin-project-lite",
|
||||||
|
"tokio",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tokio-stream"
|
||||||
|
version = "0.1.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
|
||||||
|
dependencies = [
|
||||||
|
"futures-core",
|
||||||
|
"pin-project-lite",
|
||||||
|
"tokio",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tokio-util"
|
||||||
|
version = "0.7.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"futures-core",
|
||||||
|
"futures-sink",
|
||||||
|
"pin-project-lite",
|
||||||
|
"tokio",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tonic"
|
||||||
|
version = "0.10.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e"
|
||||||
|
dependencies = [
|
||||||
|
"async-stream",
|
||||||
|
"async-trait",
|
||||||
|
"axum",
|
||||||
|
"base64",
|
||||||
|
"bytes",
|
||||||
|
"flate2",
|
||||||
|
"h2",
|
||||||
|
"http",
|
||||||
|
"http-body",
|
||||||
|
"hyper",
|
||||||
|
"hyper-timeout",
|
||||||
|
"percent-encoding",
|
||||||
|
"pin-project",
|
||||||
|
"prost",
|
||||||
|
"tokio",
|
||||||
|
"tokio-stream",
|
||||||
|
"tower",
|
||||||
|
"tower-layer",
|
||||||
|
"tower-service",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tower"
|
||||||
|
version = "0.4.13"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
|
||||||
|
dependencies = [
|
||||||
|
"futures-core",
|
||||||
|
"futures-util",
|
||||||
|
"indexmap 1.9.3",
|
||||||
|
"pin-project",
|
||||||
|
"pin-project-lite",
|
||||||
|
"rand",
|
||||||
|
"slab",
|
||||||
|
"tokio",
|
||||||
|
"tokio-util",
|
||||||
|
"tower-layer",
|
||||||
|
"tower-service",
|
||||||
|
"tracing",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tower-layer"
|
||||||
|
version = "0.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tower-service"
|
||||||
|
version = "0.3.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tracing"
|
||||||
|
version = "0.1.40"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
|
||||||
|
dependencies = [
|
||||||
|
"pin-project-lite",
|
||||||
|
"tracing-attributes",
|
||||||
|
"tracing-core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tracing-attributes"
|
||||||
|
version = "0.1.27"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tracing-core"
|
||||||
|
version = "0.1.32"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
|
||||||
|
dependencies = [
|
||||||
|
"once_cell",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "try-lock"
|
||||||
|
version = "0.2.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-ident"
|
||||||
|
version = "1.0.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "want"
|
||||||
|
version = "0.3.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
|
||||||
|
dependencies = [
|
||||||
|
"try-lock",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "wasi"
|
||||||
|
version = "0.11.0+wasi-snapshot-preview1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-sys"
|
||||||
|
version = "0.48.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
||||||
|
dependencies = [
|
||||||
|
"windows-targets",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-targets"
|
||||||
|
version = "0.48.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
||||||
|
dependencies = [
|
||||||
|
"windows_aarch64_gnullvm",
|
||||||
|
"windows_aarch64_msvc",
|
||||||
|
"windows_i686_gnu",
|
||||||
|
"windows_i686_msvc",
|
||||||
|
"windows_x86_64_gnu",
|
||||||
|
"windows_x86_64_gnullvm",
|
||||||
|
"windows_x86_64_msvc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_aarch64_gnullvm"
|
||||||
|
version = "0.48.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_aarch64_msvc"
|
||||||
|
version = "0.48.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_i686_gnu"
|
||||||
|
version = "0.48.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_i686_msvc"
|
||||||
|
version = "0.48.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_x86_64_gnu"
|
||||||
|
version = "0.48.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_x86_64_gnullvm"
|
||||||
|
version = "0.48.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows_x86_64_msvc"
|
||||||
|
version = "0.48.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
11
Cargo.toml
Normal file
11
Cargo.toml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[package]
|
||||||
|
name = "licensing-api"
|
||||||
|
version = "0.0.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
prost = { version = "0.12.3", features = ["std"] }
|
||||||
|
serde = { version = "1.0.193", features = ["derive"] }
|
||||||
|
tonic = { version = "0.10.2", features = ["gzip"] }
|
15
LICENSE
Normal file
15
LICENSE
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2023 The Licensing Authors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||||
|
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||||
|
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||||
|
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
Makefile
Normal file
20
Makefile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
define HELP_TEXT
|
||||||
|
Welcome!
|
||||||
|
|
||||||
|
Targets:
|
||||||
|
help provides help text
|
||||||
|
legal prepends license to source code
|
||||||
|
generate generates code for client library
|
||||||
|
|
||||||
|
endef
|
||||||
|
export HELP_TEXT
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo "$$HELP_TEXT"
|
||||||
|
|
||||||
|
legal: .legal
|
||||||
|
.legal:
|
||||||
|
addlicense -f ./legal/header.txt -skip yaml -skip yml -skip xml .
|
||||||
|
|
||||||
|
generate:
|
||||||
|
buf generate https://code.pitz.tech/licensing/proto.git
|
19
buf.gen.yaml
Normal file
19
buf.gen.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
version: v1
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
- plugin: buf.build/community/neoeinstein-prost:v0.2.3
|
||||||
|
out: src/gen
|
||||||
|
opt:
|
||||||
|
- bytes=.
|
||||||
|
- compile_well_known_types
|
||||||
|
- extern_path=.google.protobuf=::pbjson_types
|
||||||
|
- file_descriptor_set
|
||||||
|
|
||||||
|
- plugin: buf.build/community/neoeinstein-prost-serde:v0.2.3
|
||||||
|
out: src/gen
|
||||||
|
|
||||||
|
- plugin: buf.build/community/neoeinstein-tonic:v0.3.0
|
||||||
|
out: src/gen
|
||||||
|
opt:
|
||||||
|
- compile_well_known_types
|
||||||
|
- extern_path=.google.protobuf=::pbjson_types
|
2
legal/header.txt
Normal file
2
legal/header.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Copyright (C) {{ .Year }} The Licensing Authors
|
||||||
|
SPDX-License-Identifier: MIT
|
272
src/gen/contributors.v1.rs
Normal file
272
src/gen/contributors.v1.rs
Normal file
@ -0,0 +1,272 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Contributor {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub product_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="3")]
|
||||||
|
pub email: ::prost::alloc::string::String,
|
||||||
|
#[prost(enumeration="Role", tag="4")]
|
||||||
|
pub role: i32,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListRequest {
|
||||||
|
#[prost(string, tag="5")]
|
||||||
|
pub product_id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListResponse {
|
||||||
|
#[prost(message, repeated, tag="5")]
|
||||||
|
pub contributors: ::prost::alloc::vec::Vec<Contributor>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct InviteRequest {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub contributor: ::core::option::Option<Contributor>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct InviteResponse {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct UpdateRequest {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub contributor: ::core::option::Option<Contributor>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct UpdateResponse {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct RevokeRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub product_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub contributor_id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct RevokeResponse {
|
||||||
|
}
|
||||||
|
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||||
|
#[repr(i32)]
|
||||||
|
pub enum Role {
|
||||||
|
Unspecified = 0,
|
||||||
|
Owner = 1,
|
||||||
|
}
|
||||||
|
impl Role {
|
||||||
|
/// String value of the enum field names used in the ProtoBuf definition.
|
||||||
|
///
|
||||||
|
/// The values are not transformed in any way and thus are considered stable
|
||||||
|
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
|
||||||
|
pub fn as_str_name(&self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Role::Unspecified => "ROLE_UNSPECIFIED",
|
||||||
|
Role::Owner => "ROLE_OWNER",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// Creates an enum from field names used in the ProtoBuf definition.
|
||||||
|
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
||||||
|
match value {
|
||||||
|
"ROLE_UNSPECIFIED" => Some(Self::Unspecified),
|
||||||
|
"ROLE_OWNER" => Some(Self::Owner),
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// Encoded file descriptor set for the `contributors.v1` package
|
||||||
|
pub const FILE_DESCRIPTOR_SET: &[u8] = &[
|
||||||
|
0x0a, 0xb8, 0x16, 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
|
||||||
|
0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x12, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73,
|
||||||
|
0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||||
|
0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x22, 0x7d, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
|
||||||
|
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
|
||||||
|
0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12,
|
||||||
|
0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||||
|
0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x29, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20,
|
||||||
|
0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f,
|
||||||
|
0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65,
|
||||||
|
0x22, 0x2c, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||||
|
0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x22, 0x50,
|
||||||
|
0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40,
|
||||||
|
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x05,
|
||||||
|
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
||||||
|
0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
||||||
|
0x6f, 0x72, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73,
|
||||||
|
0x22, 0x4f, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
|
||||||
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62,
|
||||||
|
0x75, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62,
|
||||||
|
0x75, 0x74, 0x6f, 0x72, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f,
|
||||||
|
0x72, 0x22, 0x10, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
|
0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75,
|
||||||
|
0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6e, 0x74,
|
||||||
|
0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74,
|
||||||
|
0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62,
|
||||||
|
0x75, 0x74, 0x6f, 0x72, 0x22, 0x10, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x0a, 0x0d, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65,
|
||||||
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75,
|
||||||
|
0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f,
|
||||||
|
0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69,
|
||||||
|
0x62, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
|
||||||
|
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x49, 0x64, 0x22, 0x10, 0x0a,
|
||||||
|
0x0e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a,
|
||||||
|
0x2c, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x4c, 0x45, 0x5f,
|
||||||
|
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a,
|
||||||
|
0x0a, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x32, 0xbd, 0x04,
|
||||||
|
0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72,
|
||||||
|
0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x63,
|
||||||
|
0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c,
|
||||||
|
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x63, 0x6f, 0x6e,
|
||||||
|
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,
|
||||||
|
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||||
|
0x28, 0x12, 0x26, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f,
|
||||||
|
0x7b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6f, 0x6e,
|
||||||
|
0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x88, 0x01, 0x0a, 0x06, 0x49, 0x6e,
|
||||||
|
0x76, 0x69, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
||||||
|
0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
|
||||||
|
0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x3a, 0x01, 0x2a,
|
||||||
|
0x22, 0x32, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b,
|
||||||
|
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x64,
|
||||||
|
0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75,
|
||||||
|
0x74, 0x6f, 0x72, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12,
|
||||||
|
0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x76,
|
||||||
|
0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||||
|
0x1f, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x76,
|
||||||
|
0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
|
0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x3a, 0x01, 0x2a, 0x22, 0x43, 0x2f, 0x76, 0x31,
|
||||||
|
0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||||
|
0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69,
|
||||||
|
0x64, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x2f,
|
||||||
|
0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x69, 0x64, 0x7d,
|
||||||
|
0x12, 0x8a, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x12, 0x1e, 0x2e, 0x63, 0x6f,
|
||||||
|
0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65,
|
||||||
|
0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x63, 0x6f,
|
||||||
|
0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65,
|
||||||
|
0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3,
|
||||||
|
0xe4, 0x93, 0x02, 0x39, 0x2a, 0x37, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
|
||||||
|
0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f,
|
||||||
|
0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x2f, 0x7b, 0x63, 0x6f,
|
||||||
|
0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x4a, 0xc3, 0x0c,
|
||||||
|
0x0a, 0x06, 0x12, 0x04, 0x0a, 0x00, 0x51, 0x01, 0x0a, 0xb0, 0x02, 0x0a, 0x01, 0x0c, 0x12, 0x03,
|
||||||
|
0x0a, 0x00, 0x12, 0x32, 0x48, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20,
|
||||||
|
0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x32, 0x33, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x63,
|
||||||
|
0x65, 0x6e, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x0a, 0x20,
|
||||||
|
0x53, 0x50, 0x44, 0x58, 0x2d, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2d, 0x49, 0x64, 0x65,
|
||||||
|
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x20, 0x4d, 0x49, 0x54, 0x0a, 0x32, 0xdb, 0x01,
|
||||||
|
0x0a, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x61, 0x74, 0x74, 0x65,
|
||||||
|
0x6d, 0x70, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x63,
|
||||||
|
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64,
|
||||||
|
0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73,
|
||||||
|
0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x20, 0x47,
|
||||||
|
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x62, 0x61, 0x73, 0x65,
|
||||||
|
0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e,
|
||||||
|
0x73, 0x69, 0x76, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x0a, 0x20,
|
||||||
|
0x2d, 0x20, 0x53, 0x65, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d,
|
||||||
|
0x6f, 0x72, 0x65, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6c, 0x6f,
|
||||||
|
0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70,
|
||||||
|
0x69, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e,
|
||||||
|
0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x0a, 0x0a, 0x0a, 0x08, 0x0a, 0x01, 0x02,
|
||||||
|
0x12, 0x03, 0x0c, 0x00, 0x18, 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x00, 0x12, 0x03, 0x0e, 0x00, 0x26,
|
||||||
|
0x0a, 0x0a, 0x0a, 0x02, 0x05, 0x00, 0x12, 0x04, 0x10, 0x00, 0x13, 0x01, 0x0a, 0x0a, 0x0a, 0x03,
|
||||||
|
0x05, 0x00, 0x01, 0x12, 0x03, 0x10, 0x05, 0x09, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x00,
|
||||||
|
0x12, 0x03, 0x11, 0x02, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03,
|
||||||
|
0x11, 0x02, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x05, 0x00, 0x02, 0x00, 0x02, 0x12, 0x03, 0x11, 0x15,
|
||||||
|
0x16, 0x0a, 0x0b, 0x0a, 0x04, 0x05, 0x00, 0x02, 0x01, 0x12, 0x03, 0x12, 0x02, 0x11, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x05, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x12, 0x02, 0x0c, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x05, 0x00, 0x02, 0x01, 0x02, 0x12, 0x03, 0x12, 0x0f, 0x10, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x00,
|
||||||
|
0x12, 0x04, 0x15, 0x00, 0x1a, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x00, 0x01, 0x12, 0x03, 0x15,
|
||||||
|
0x08, 0x13, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x00, 0x12, 0x03, 0x16, 0x02, 0x10, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x05, 0x12, 0x03, 0x16, 0x02, 0x08, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x16, 0x09, 0x0b, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x16, 0x0e, 0x0f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02,
|
||||||
|
0x01, 0x12, 0x03, 0x17, 0x02, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x05, 0x12,
|
||||||
|
0x03, 0x17, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x17,
|
||||||
|
0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x17, 0x16, 0x17,
|
||||||
|
0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x02, 0x12, 0x03, 0x18, 0x02, 0x13, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x00, 0x02, 0x02, 0x05, 0x12, 0x03, 0x18, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x18, 0x09, 0x0e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02,
|
||||||
|
0x02, 0x03, 0x12, 0x03, 0x18, 0x11, 0x12, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x03, 0x12,
|
||||||
|
0x03, 0x19, 0x02, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x06, 0x12, 0x03, 0x19,
|
||||||
|
0x02, 0x06, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x01, 0x12, 0x03, 0x19, 0x07, 0x0b,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x03, 0x12, 0x03, 0x19, 0x0e, 0x0f, 0x0a, 0x0a,
|
||||||
|
0x0a, 0x02, 0x04, 0x01, 0x12, 0x04, 0x1c, 0x00, 0x1e, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x01,
|
||||||
|
0x01, 0x12, 0x03, 0x1c, 0x08, 0x13, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x00, 0x12, 0x03,
|
||||||
|
0x1d, 0x02, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x05, 0x12, 0x03, 0x1d, 0x02,
|
||||||
|
0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x1d, 0x09, 0x13, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x03, 0x12, 0x03, 0x1d, 0x16, 0x17, 0x0a, 0x0a, 0x0a,
|
||||||
|
0x02, 0x04, 0x02, 0x12, 0x04, 0x20, 0x00, 0x22, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, 0x01,
|
||||||
|
0x12, 0x03, 0x20, 0x08, 0x14, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x00, 0x12, 0x03, 0x21,
|
||||||
|
0x02, 0x28, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x04, 0x12, 0x03, 0x21, 0x02, 0x0a,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x06, 0x12, 0x03, 0x21, 0x0b, 0x16, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x01, 0x12, 0x03, 0x21, 0x17, 0x23, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x02, 0x02, 0x00, 0x03, 0x12, 0x03, 0x21, 0x26, 0x27, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x03,
|
||||||
|
0x12, 0x04, 0x24, 0x00, 0x26, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x03, 0x01, 0x12, 0x03, 0x24,
|
||||||
|
0x08, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x03, 0x02, 0x00, 0x12, 0x03, 0x25, 0x02, 0x1e, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x06, 0x12, 0x03, 0x25, 0x02, 0x0d, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x03, 0x02, 0x00, 0x01, 0x12, 0x03, 0x25, 0x0e, 0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x03, 0x02, 0x00, 0x03, 0x12, 0x03, 0x25, 0x1c, 0x1d, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x04, 0x12,
|
||||||
|
0x03, 0x28, 0x00, 0x19, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x04, 0x01, 0x12, 0x03, 0x28, 0x08, 0x16,
|
||||||
|
0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x05, 0x12, 0x04, 0x2a, 0x00, 0x2c, 0x01, 0x0a, 0x0a, 0x0a, 0x03,
|
||||||
|
0x04, 0x05, 0x01, 0x12, 0x03, 0x2a, 0x08, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x05, 0x02, 0x00,
|
||||||
|
0x12, 0x03, 0x2b, 0x02, 0x1e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x06, 0x12, 0x03,
|
||||||
|
0x2b, 0x02, 0x0d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x01, 0x12, 0x03, 0x2b, 0x0e,
|
||||||
|
0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x03, 0x12, 0x03, 0x2b, 0x1c, 0x1d, 0x0a,
|
||||||
|
0x09, 0x0a, 0x02, 0x04, 0x06, 0x12, 0x03, 0x2e, 0x00, 0x19, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x06,
|
||||||
|
0x01, 0x12, 0x03, 0x2e, 0x08, 0x16, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x07, 0x12, 0x04, 0x30, 0x00,
|
||||||
|
0x33, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x07, 0x01, 0x12, 0x03, 0x30, 0x08, 0x15, 0x0a, 0x0b,
|
||||||
|
0x0a, 0x04, 0x04, 0x07, 0x02, 0x00, 0x12, 0x03, 0x31, 0x02, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x07, 0x02, 0x00, 0x05, 0x12, 0x03, 0x31, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02,
|
||||||
|
0x00, 0x01, 0x12, 0x03, 0x31, 0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x00, 0x03,
|
||||||
|
0x12, 0x03, 0x31, 0x16, 0x17, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x07, 0x02, 0x01, 0x12, 0x03, 0x32,
|
||||||
|
0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x01, 0x05, 0x12, 0x03, 0x32, 0x02, 0x08,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x01, 0x01, 0x12, 0x03, 0x32, 0x09, 0x17, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x07, 0x02, 0x01, 0x03, 0x12, 0x03, 0x32, 0x1a, 0x1b, 0x0a, 0x09, 0x0a, 0x02,
|
||||||
|
0x04, 0x08, 0x12, 0x03, 0x35, 0x00, 0x19, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x08, 0x01, 0x12, 0x03,
|
||||||
|
0x35, 0x08, 0x16, 0x0a, 0x0a, 0x0a, 0x02, 0x06, 0x00, 0x12, 0x04, 0x37, 0x00, 0x51, 0x01, 0x0a,
|
||||||
|
0x0a, 0x0a, 0x03, 0x06, 0x00, 0x01, 0x12, 0x03, 0x37, 0x08, 0x1a, 0x0a, 0x0c, 0x0a, 0x04, 0x06,
|
||||||
|
0x00, 0x02, 0x00, 0x12, 0x04, 0x38, 0x02, 0x3c, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02,
|
||||||
|
0x00, 0x01, 0x12, 0x03, 0x38, 0x06, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x02,
|
||||||
|
0x12, 0x03, 0x38, 0x0b, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03,
|
||||||
|
0x38, 0x21, 0x2d, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x04, 0x12, 0x04, 0x39, 0x04,
|
||||||
|
0x3b, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x00, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12,
|
||||||
|
0x04, 0x39, 0x04, 0x3b, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x01, 0x12, 0x04, 0x3e,
|
||||||
|
0x02, 0x43, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x3e, 0x06,
|
||||||
|
0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x02, 0x12, 0x03, 0x3e, 0x0d, 0x1a, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x3e, 0x25, 0x33, 0x0a, 0x0d, 0x0a,
|
||||||
|
0x05, 0x06, 0x00, 0x02, 0x01, 0x04, 0x12, 0x04, 0x3f, 0x04, 0x42, 0x06, 0x0a, 0x11, 0x0a, 0x09,
|
||||||
|
0x06, 0x00, 0x02, 0x01, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x3f, 0x04, 0x42, 0x06, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x02, 0x12, 0x04, 0x45, 0x02, 0x4a, 0x03, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x06, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x45, 0x06, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x06,
|
||||||
|
0x00, 0x02, 0x02, 0x02, 0x12, 0x03, 0x45, 0x0d, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02,
|
||||||
|
0x02, 0x03, 0x12, 0x03, 0x45, 0x25, 0x33, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x02, 0x04,
|
||||||
|
0x12, 0x04, 0x46, 0x04, 0x49, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x02, 0x04, 0xb0,
|
||||||
|
0xca, 0xbc, 0x22, 0x12, 0x04, 0x46, 0x04, 0x49, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02,
|
||||||
|
0x03, 0x12, 0x04, 0x4c, 0x02, 0x50, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x01,
|
||||||
|
0x12, 0x03, 0x4c, 0x06, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x02, 0x12, 0x03,
|
||||||
|
0x4c, 0x0d, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x03, 0x12, 0x03, 0x4c, 0x25,
|
||||||
|
0x33, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x04, 0x12, 0x04, 0x4d, 0x04, 0x4f, 0x06,
|
||||||
|
0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x03, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x4d,
|
||||||
|
0x04, 0x4f, 0x06, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
];
|
||||||
|
include!("contributors.v1.serde.rs");
|
||||||
|
include!("contributors.v1.tonic.rs");
|
||||||
|
// @@protoc_insertion_point(module)
|
910
src/gen/contributors.v1.serde.rs
Normal file
910
src/gen/contributors.v1.serde.rs
Normal file
@ -0,0 +1,910 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
impl serde::Serialize for Contributor {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
if !self.email.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
if self.role != 0 {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("contributors.v1.Contributor", len)?;
|
||||||
|
if !self.id.is_empty() {
|
||||||
|
struct_ser.serialize_field("id", &self.id)?;
|
||||||
|
}
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
struct_ser.serialize_field("productId", &self.product_id)?;
|
||||||
|
}
|
||||||
|
if !self.email.is_empty() {
|
||||||
|
struct_ser.serialize_field("email", &self.email)?;
|
||||||
|
}
|
||||||
|
if self.role != 0 {
|
||||||
|
let v = Role::from_i32(self.role)
|
||||||
|
.ok_or_else(|| serde::ser::Error::custom(format!("Invalid variant {}", self.role)))?;
|
||||||
|
struct_ser.serialize_field("role", &v)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for Contributor {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"id",
|
||||||
|
"product_id",
|
||||||
|
"productId",
|
||||||
|
"email",
|
||||||
|
"role",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Id,
|
||||||
|
ProductId,
|
||||||
|
Email,
|
||||||
|
Role,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"id" => Ok(GeneratedField::Id),
|
||||||
|
"productId" | "product_id" => Ok(GeneratedField::ProductId),
|
||||||
|
"email" => Ok(GeneratedField::Email),
|
||||||
|
"role" => Ok(GeneratedField::Role),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = Contributor;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct contributors.v1.Contributor")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<Contributor, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut id__ = None;
|
||||||
|
let mut product_id__ = None;
|
||||||
|
let mut email__ = None;
|
||||||
|
let mut role__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Id => {
|
||||||
|
if id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("id"));
|
||||||
|
}
|
||||||
|
id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
GeneratedField::ProductId => {
|
||||||
|
if product_id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("productId"));
|
||||||
|
}
|
||||||
|
product_id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
GeneratedField::Email => {
|
||||||
|
if email__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("email"));
|
||||||
|
}
|
||||||
|
email__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
GeneratedField::Role => {
|
||||||
|
if role__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("role"));
|
||||||
|
}
|
||||||
|
role__ = Some(map.next_value::<Role>()? as i32);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(Contributor {
|
||||||
|
id: id__.unwrap_or_default(),
|
||||||
|
product_id: product_id__.unwrap_or_default(),
|
||||||
|
email: email__.unwrap_or_default(),
|
||||||
|
role: role__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("contributors.v1.Contributor", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for InviteRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if self.contributor.is_some() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("contributors.v1.InviteRequest", len)?;
|
||||||
|
if let Some(v) = self.contributor.as_ref() {
|
||||||
|
struct_ser.serialize_field("contributor", v)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for InviteRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"contributor",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Contributor,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"contributor" => Ok(GeneratedField::Contributor),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = InviteRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct contributors.v1.InviteRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<InviteRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut contributor__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Contributor => {
|
||||||
|
if contributor__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("contributor"));
|
||||||
|
}
|
||||||
|
contributor__ = map.next_value()?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(InviteRequest {
|
||||||
|
contributor: contributor__,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("contributors.v1.InviteRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for InviteResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("contributors.v1.InviteResponse", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for InviteResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = InviteResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct contributors.v1.InviteResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<InviteResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(InviteResponse {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("contributors.v1.InviteResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for ListRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("contributors.v1.ListRequest", len)?;
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
struct_ser.serialize_field("productId", &self.product_id)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for ListRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"product_id",
|
||||||
|
"productId",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
ProductId,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"productId" | "product_id" => Ok(GeneratedField::ProductId),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = ListRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct contributors.v1.ListRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<ListRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut product_id__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::ProductId => {
|
||||||
|
if product_id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("productId"));
|
||||||
|
}
|
||||||
|
product_id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(ListRequest {
|
||||||
|
product_id: product_id__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("contributors.v1.ListRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for ListResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.contributors.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("contributors.v1.ListResponse", len)?;
|
||||||
|
if !self.contributors.is_empty() {
|
||||||
|
struct_ser.serialize_field("contributors", &self.contributors)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for ListResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"contributors",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Contributors,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"contributors" => Ok(GeneratedField::Contributors),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = ListResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct contributors.v1.ListResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<ListResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut contributors__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Contributors => {
|
||||||
|
if contributors__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("contributors"));
|
||||||
|
}
|
||||||
|
contributors__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(ListResponse {
|
||||||
|
contributors: contributors__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("contributors.v1.ListResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for RevokeRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
if !self.contributor_id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("contributors.v1.RevokeRequest", len)?;
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
struct_ser.serialize_field("productId", &self.product_id)?;
|
||||||
|
}
|
||||||
|
if !self.contributor_id.is_empty() {
|
||||||
|
struct_ser.serialize_field("contributorId", &self.contributor_id)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for RevokeRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"product_id",
|
||||||
|
"productId",
|
||||||
|
"contributor_id",
|
||||||
|
"contributorId",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
ProductId,
|
||||||
|
ContributorId,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"productId" | "product_id" => Ok(GeneratedField::ProductId),
|
||||||
|
"contributorId" | "contributor_id" => Ok(GeneratedField::ContributorId),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = RevokeRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct contributors.v1.RevokeRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<RevokeRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut product_id__ = None;
|
||||||
|
let mut contributor_id__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::ProductId => {
|
||||||
|
if product_id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("productId"));
|
||||||
|
}
|
||||||
|
product_id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
GeneratedField::ContributorId => {
|
||||||
|
if contributor_id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("contributorId"));
|
||||||
|
}
|
||||||
|
contributor_id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(RevokeRequest {
|
||||||
|
product_id: product_id__.unwrap_or_default(),
|
||||||
|
contributor_id: contributor_id__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("contributors.v1.RevokeRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for RevokeResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("contributors.v1.RevokeResponse", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for RevokeResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = RevokeResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct contributors.v1.RevokeResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<RevokeResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(RevokeResponse {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("contributors.v1.RevokeResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for Role {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
let variant = match self {
|
||||||
|
Self::Unspecified => "ROLE_UNSPECIFIED",
|
||||||
|
Self::Owner => "ROLE_OWNER",
|
||||||
|
};
|
||||||
|
serializer.serialize_str(variant)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for Role {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"ROLE_UNSPECIFIED",
|
||||||
|
"ROLE_OWNER",
|
||||||
|
];
|
||||||
|
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = Role;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_i64<E>(self, v: i64) -> std::result::Result<Self::Value, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
use std::convert::TryFrom;
|
||||||
|
i32::try_from(v)
|
||||||
|
.ok()
|
||||||
|
.and_then(Role::from_i32)
|
||||||
|
.ok_or_else(|| {
|
||||||
|
serde::de::Error::invalid_value(serde::de::Unexpected::Signed(v), &self)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_u64<E>(self, v: u64) -> std::result::Result<Self::Value, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
use std::convert::TryFrom;
|
||||||
|
i32::try_from(v)
|
||||||
|
.ok()
|
||||||
|
.and_then(Role::from_i32)
|
||||||
|
.ok_or_else(|| {
|
||||||
|
serde::de::Error::invalid_value(serde::de::Unexpected::Unsigned(v), &self)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<Self::Value, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"ROLE_UNSPECIFIED" => Ok(Role::Unspecified),
|
||||||
|
"ROLE_OWNER" => Ok(Role::Owner),
|
||||||
|
_ => Err(serde::de::Error::unknown_variant(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_any(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for UpdateRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if self.contributor.is_some() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("contributors.v1.UpdateRequest", len)?;
|
||||||
|
if let Some(v) = self.contributor.as_ref() {
|
||||||
|
struct_ser.serialize_field("contributor", v)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for UpdateRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"contributor",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Contributor,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"contributor" => Ok(GeneratedField::Contributor),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = UpdateRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct contributors.v1.UpdateRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<UpdateRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut contributor__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Contributor => {
|
||||||
|
if contributor__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("contributor"));
|
||||||
|
}
|
||||||
|
contributor__ = map.next_value()?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(UpdateRequest {
|
||||||
|
contributor: contributor__,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("contributors.v1.UpdateRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for UpdateResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("contributors.v1.UpdateResponse", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for UpdateResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = UpdateResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct contributors.v1.UpdateResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<UpdateResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(UpdateResponse {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("contributors.v1.UpdateResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
509
src/gen/contributors.v1.tonic.rs
Normal file
509
src/gen/contributors.v1.tonic.rs
Normal file
@ -0,0 +1,509 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
/// Generated client implementations.
|
||||||
|
pub mod contributor_service_client {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
use tonic::codegen::http::Uri;
|
||||||
|
///
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct ContributorServiceClient<T> {
|
||||||
|
inner: tonic::client::Grpc<T>,
|
||||||
|
}
|
||||||
|
impl ContributorServiceClient<tonic::transport::Channel> {
|
||||||
|
/// Attempt to create a new client by connecting to a given endpoint.
|
||||||
|
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
|
||||||
|
where
|
||||||
|
D: TryInto<tonic::transport::Endpoint>,
|
||||||
|
D::Error: Into<StdError>,
|
||||||
|
{
|
||||||
|
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
|
||||||
|
Ok(Self::new(conn))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T> ContributorServiceClient<T>
|
||||||
|
where
|
||||||
|
T: tonic::client::GrpcService<tonic::body::BoxBody>,
|
||||||
|
T::Error: Into<StdError>,
|
||||||
|
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
|
||||||
|
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
|
||||||
|
{
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::new(inner);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_origin(inner: T, origin: Uri) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::with_origin(inner, origin);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> ContributorServiceClient<InterceptedService<T, F>>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
T::ResponseBody: Default,
|
||||||
|
T: tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
Response = http::Response<
|
||||||
|
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
|
||||||
|
>,
|
||||||
|
>,
|
||||||
|
<T as tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
>>::Error: Into<StdError> + Send + Sync,
|
||||||
|
{
|
||||||
|
ContributorServiceClient::new(InterceptedService::new(inner, interceptor))
|
||||||
|
}
|
||||||
|
/// Compress requests with the given encoding.
|
||||||
|
///
|
||||||
|
/// This requires the server to support it otherwise it might respond with an
|
||||||
|
/// error.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.send_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Enable decompressing responses.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.accept_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_decoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_encoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn list(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::ListRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/contributors.v1.ContributorService/List",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("contributors.v1.ContributorService", "List"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn invite(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::InviteRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::InviteResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/contributors.v1.ContributorService/Invite",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("contributors.v1.ContributorService", "Invite"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn update(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::UpdateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::UpdateResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/contributors.v1.ContributorService/Update",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("contributors.v1.ContributorService", "Update"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn revoke(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::RevokeRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::RevokeResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/contributors.v1.ContributorService/Revoke",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("contributors.v1.ContributorService", "Revoke"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// Generated server implementations.
|
||||||
|
pub mod contributor_service_server {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
/// Generated trait containing gRPC methods that should be implemented for use with ContributorServiceServer.
|
||||||
|
#[async_trait]
|
||||||
|
pub trait ContributorService: Send + Sync + 'static {
|
||||||
|
///
|
||||||
|
async fn list(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::ListRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn invite(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::InviteRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::InviteResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn update(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::UpdateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::UpdateResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn revoke(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::RevokeRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::RevokeResponse>, tonic::Status>;
|
||||||
|
}
|
||||||
|
///
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct ContributorServiceServer<T: ContributorService> {
|
||||||
|
inner: _Inner<T>,
|
||||||
|
accept_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
send_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
max_decoding_message_size: Option<usize>,
|
||||||
|
max_encoding_message_size: Option<usize>,
|
||||||
|
}
|
||||||
|
struct _Inner<T>(Arc<T>);
|
||||||
|
impl<T: ContributorService> ContributorServiceServer<T> {
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
Self::from_arc(Arc::new(inner))
|
||||||
|
}
|
||||||
|
pub fn from_arc(inner: Arc<T>) -> Self {
|
||||||
|
let inner = _Inner(inner);
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: Default::default(),
|
||||||
|
send_compression_encodings: Default::default(),
|
||||||
|
max_decoding_message_size: None,
|
||||||
|
max_encoding_message_size: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> InterceptedService<Self, F>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
{
|
||||||
|
InterceptedService::new(Self::new(inner), interceptor)
|
||||||
|
}
|
||||||
|
/// Enable decompressing requests with the given encoding.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.accept_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Compress responses with the given encoding, if the client supports it.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.send_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_decoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_encoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T, B> tonic::codegen::Service<http::Request<B>> for ContributorServiceServer<T>
|
||||||
|
where
|
||||||
|
T: ContributorService,
|
||||||
|
B: Body + Send + 'static,
|
||||||
|
B::Error: Into<StdError> + Send + 'static,
|
||||||
|
{
|
||||||
|
type Response = http::Response<tonic::body::BoxBody>;
|
||||||
|
type Error = std::convert::Infallible;
|
||||||
|
type Future = BoxFuture<Self::Response, Self::Error>;
|
||||||
|
fn poll_ready(
|
||||||
|
&mut self,
|
||||||
|
_cx: &mut Context<'_>,
|
||||||
|
) -> Poll<std::result::Result<(), Self::Error>> {
|
||||||
|
Poll::Ready(Ok(()))
|
||||||
|
}
|
||||||
|
fn call(&mut self, req: http::Request<B>) -> Self::Future {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
match req.uri().path() {
|
||||||
|
"/contributors.v1.ContributorService/List" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct ListSvc<T: ContributorService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: ContributorService,
|
||||||
|
> tonic::server::UnaryService<super::ListRequest> for ListSvc<T> {
|
||||||
|
type Response = super::ListResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::ListRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).list(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = ListSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/contributors.v1.ContributorService/Invite" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct InviteSvc<T: ContributorService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: ContributorService,
|
||||||
|
> tonic::server::UnaryService<super::InviteRequest>
|
||||||
|
for InviteSvc<T> {
|
||||||
|
type Response = super::InviteResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::InviteRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).invite(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = InviteSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/contributors.v1.ContributorService/Update" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct UpdateSvc<T: ContributorService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: ContributorService,
|
||||||
|
> tonic::server::UnaryService<super::UpdateRequest>
|
||||||
|
for UpdateSvc<T> {
|
||||||
|
type Response = super::UpdateResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::UpdateRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).update(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = UpdateSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/contributors.v1.ContributorService/Revoke" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct RevokeSvc<T: ContributorService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: ContributorService,
|
||||||
|
> tonic::server::UnaryService<super::RevokeRequest>
|
||||||
|
for RevokeSvc<T> {
|
||||||
|
type Response = super::RevokeResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::RevokeRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).revoke(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = RevokeSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
Box::pin(async move {
|
||||||
|
Ok(
|
||||||
|
http::Response::builder()
|
||||||
|
.status(200)
|
||||||
|
.header("grpc-status", "12")
|
||||||
|
.header("content-type", "application/grpc")
|
||||||
|
.body(empty_body())
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: ContributorService> Clone for ContributorServiceServer<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: self.accept_compression_encodings,
|
||||||
|
send_compression_encodings: self.send_compression_encodings,
|
||||||
|
max_decoding_message_size: self.max_decoding_message_size,
|
||||||
|
max_encoding_message_size: self.max_encoding_message_size,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: ContributorService> Clone for _Inner<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
Self(Arc::clone(&self.0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(f, "{:?}", self.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: ContributorService> tonic::server::NamedService
|
||||||
|
for ContributorServiceServer<T> {
|
||||||
|
const NAME: &'static str = "contributors.v1.ContributorService";
|
||||||
|
}
|
||||||
|
}
|
166
src/gen/licenses.v1.rs
Normal file
166
src/gen/licenses.v1.rs
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct License {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub product_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="3")]
|
||||||
|
pub package_name: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListRequest {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListResponse {
|
||||||
|
#[prost(message, repeated, tag="1")]
|
||||||
|
pub licenses: ::prost::alloc::vec::Vec<License>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct PurchaseRequest {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub license: ::core::option::Option<License>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct PurchaseResponse {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CancelRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub license_id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CancelResponse {
|
||||||
|
}
|
||||||
|
/// Encoded file descriptor set for the `licenses.v1` package
|
||||||
|
pub const FILE_DESCRIPTOR_SET: &[u8] = &[
|
||||||
|
0x0a, 0xb9, 0x0e, 0x0a, 0x19, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2f, 0x76, 0x31,
|
||||||
|
0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b,
|
||||||
|
0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f,
|
||||||
|
0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5b, 0x0a, 0x07, 0x4c, 0x69, 0x63,
|
||||||
|
0x65, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f,
|
||||||
|
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
|
||||||
|
0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e,
|
||||||
|
0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61,
|
||||||
|
0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x40, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
|
||||||
|
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73,
|
||||||
|
0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x6c,
|
||||||
|
0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x41, 0x0a, 0x0f, 0x50, 0x75, 0x72, 0x63, 0x68,
|
||||||
|
0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x6c, 0x69,
|
||||||
|
0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x69,
|
||||||
|
0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,
|
||||||
|
0x65, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x50, 0x75,
|
||||||
|
0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e,
|
||||||
|
0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||||
|
0x1d, 0x0a, 0x0a, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x49, 0x64, 0x22, 0x10,
|
||||||
|
0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
|
0x32, 0xab, 0x02, 0x0a, 0x0e, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76,
|
||||||
|
0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x6c, 0x69,
|
||||||
|
0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73,
|
||||||
|
0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
|
0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69,
|
||||||
|
0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x08, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61,
|
||||||
|
0x73, 0x65, 0x12, 0x1c, 0x2e, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x76, 0x31,
|
||||||
|
0x2e, 0x50, 0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x1a, 0x1d, 0x2e, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50,
|
||||||
|
0x75, 0x72, 0x63, 0x68, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||||
|
0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f,
|
||||||
|
0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x64, 0x0a, 0x06, 0x43, 0x61, 0x6e, 0x63,
|
||||||
|
0x65, 0x6c, 0x12, 0x1a, 0x2e, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x76, 0x31,
|
||||||
|
0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b,
|
||||||
|
0x2e, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6e,
|
||||||
|
0x63, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4,
|
||||||
|
0x93, 0x02, 0x1b, 0x2a, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
|
||||||
|
0x73, 0x2f, 0x7b, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x4a, 0xf3,
|
||||||
|
0x08, 0x0a, 0x06, 0x12, 0x04, 0x0a, 0x00, 0x3b, 0x01, 0x0a, 0xb0, 0x02, 0x0a, 0x01, 0x0c, 0x12,
|
||||||
|
0x03, 0x0a, 0x00, 0x12, 0x32, 0x48, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74,
|
||||||
|
0x20, 0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x32, 0x33, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4c, 0x69,
|
||||||
|
0x63, 0x65, 0x6e, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x0a,
|
||||||
|
0x20, 0x53, 0x50, 0x44, 0x58, 0x2d, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2d, 0x49, 0x64,
|
||||||
|
0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x20, 0x4d, 0x49, 0x54, 0x0a, 0x32, 0xdb,
|
||||||
|
0x01, 0x0a, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x61, 0x74, 0x74,
|
||||||
|
0x65, 0x6d, 0x70, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x20,
|
||||||
|
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x20, 0x61, 0x6e,
|
||||||
|
0x64, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e,
|
||||||
|
0x73, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x20,
|
||||||
|
0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x62, 0x61, 0x73,
|
||||||
|
0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x65, 0x78, 0x74, 0x65,
|
||||||
|
0x6e, 0x73, 0x69, 0x76, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x0a,
|
||||||
|
0x20, 0x2d, 0x20, 0x53, 0x65, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20,
|
||||||
|
0x6d, 0x6f, 0x72, 0x65, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6c,
|
||||||
|
0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61,
|
||||||
|
0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2f, 0x64, 0x65, 0x73, 0x69, 0x67,
|
||||||
|
0x6e, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x0a, 0x0a, 0x0a, 0x08, 0x0a, 0x01,
|
||||||
|
0x02, 0x12, 0x03, 0x0c, 0x00, 0x14, 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x00, 0x12, 0x03, 0x0e, 0x00,
|
||||||
|
0x26, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x00, 0x12, 0x04, 0x10, 0x00, 0x14, 0x01, 0x0a, 0x0a, 0x0a,
|
||||||
|
0x03, 0x04, 0x00, 0x01, 0x12, 0x03, 0x10, 0x08, 0x0f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02,
|
||||||
|
0x00, 0x12, 0x03, 0x11, 0x02, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x05, 0x12,
|
||||||
|
0x03, 0x11, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x11,
|
||||||
|
0x09, 0x0b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x11, 0x0e, 0x0f,
|
||||||
|
0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x01, 0x12, 0x03, 0x12, 0x02, 0x18, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x00, 0x02, 0x01, 0x05, 0x12, 0x03, 0x12, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x12, 0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02,
|
||||||
|
0x01, 0x03, 0x12, 0x03, 0x12, 0x16, 0x17, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x02, 0x12,
|
||||||
|
0x03, 0x13, 0x02, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x05, 0x12, 0x03, 0x13,
|
||||||
|
0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x13, 0x09, 0x15,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x03, 0x12, 0x03, 0x13, 0x18, 0x19, 0x0a, 0x09,
|
||||||
|
0x0a, 0x02, 0x04, 0x01, 0x12, 0x03, 0x16, 0x00, 0x16, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x01, 0x01,
|
||||||
|
0x12, 0x03, 0x16, 0x08, 0x13, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x02, 0x12, 0x04, 0x18, 0x00, 0x1a,
|
||||||
|
0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, 0x01, 0x12, 0x03, 0x18, 0x08, 0x14, 0x0a, 0x0b, 0x0a,
|
||||||
|
0x04, 0x04, 0x02, 0x02, 0x00, 0x12, 0x03, 0x19, 0x02, 0x20, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02,
|
||||||
|
0x02, 0x00, 0x04, 0x12, 0x03, 0x19, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00,
|
||||||
|
0x06, 0x12, 0x03, 0x19, 0x0b, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x01, 0x12,
|
||||||
|
0x03, 0x19, 0x13, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x03, 0x12, 0x03, 0x19,
|
||||||
|
0x1e, 0x1f, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x03, 0x12, 0x04, 0x1c, 0x00, 0x1e, 0x01, 0x0a, 0x0a,
|
||||||
|
0x0a, 0x03, 0x04, 0x03, 0x01, 0x12, 0x03, 0x1c, 0x08, 0x17, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x03,
|
||||||
|
0x02, 0x00, 0x12, 0x03, 0x1d, 0x02, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x06,
|
||||||
|
0x12, 0x03, 0x1d, 0x02, 0x09, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x01, 0x12, 0x03,
|
||||||
|
0x1d, 0x0a, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x03, 0x12, 0x03, 0x1d, 0x14,
|
||||||
|
0x15, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x04, 0x12, 0x03, 0x20, 0x00, 0x1b, 0x0a, 0x0a, 0x0a, 0x03,
|
||||||
|
0x04, 0x04, 0x01, 0x12, 0x03, 0x20, 0x08, 0x18, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x05, 0x12, 0x04,
|
||||||
|
0x22, 0x00, 0x24, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x05, 0x01, 0x12, 0x03, 0x22, 0x08, 0x15,
|
||||||
|
0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x05, 0x02, 0x00, 0x12, 0x03, 0x23, 0x02, 0x18, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x05, 0x02, 0x00, 0x05, 0x12, 0x03, 0x23, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x05, 0x02, 0x00, 0x01, 0x12, 0x03, 0x23, 0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02,
|
||||||
|
0x00, 0x03, 0x12, 0x03, 0x23, 0x16, 0x17, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x06, 0x12, 0x03, 0x26,
|
||||||
|
0x00, 0x19, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x06, 0x01, 0x12, 0x03, 0x26, 0x08, 0x16, 0x0a, 0x0a,
|
||||||
|
0x0a, 0x02, 0x06, 0x00, 0x12, 0x04, 0x28, 0x00, 0x3b, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x06, 0x00,
|
||||||
|
0x01, 0x12, 0x03, 0x28, 0x08, 0x16, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x00, 0x12, 0x04,
|
||||||
|
0x29, 0x02, 0x2d, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x29,
|
||||||
|
0x06, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x02, 0x12, 0x03, 0x29, 0x0b, 0x16,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x29, 0x21, 0x2d, 0x0a, 0x0d,
|
||||||
|
0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x04, 0x12, 0x04, 0x2a, 0x04, 0x2c, 0x06, 0x0a, 0x11, 0x0a,
|
||||||
|
0x09, 0x06, 0x00, 0x02, 0x00, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x2a, 0x04, 0x2c, 0x06,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x01, 0x12, 0x04, 0x2f, 0x02, 0x34, 0x03, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x2f, 0x06, 0x0e, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x06, 0x00, 0x02, 0x01, 0x02, 0x12, 0x03, 0x2f, 0x0f, 0x1e, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00,
|
||||||
|
0x02, 0x01, 0x03, 0x12, 0x03, 0x2f, 0x29, 0x39, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01,
|
||||||
|
0x04, 0x12, 0x04, 0x30, 0x04, 0x33, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x01, 0x04,
|
||||||
|
0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x30, 0x04, 0x33, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00,
|
||||||
|
0x02, 0x02, 0x12, 0x04, 0x36, 0x02, 0x3a, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x02,
|
||||||
|
0x01, 0x12, 0x03, 0x36, 0x06, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x02, 0x02, 0x12,
|
||||||
|
0x03, 0x36, 0x0d, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x02, 0x03, 0x12, 0x03, 0x36,
|
||||||
|
0x25, 0x33, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x02, 0x04, 0x12, 0x04, 0x37, 0x04, 0x39,
|
||||||
|
0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x02, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04,
|
||||||
|
0x37, 0x04, 0x39, 0x06, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
];
|
||||||
|
include!("licenses.v1.serde.rs");
|
||||||
|
include!("licenses.v1.tonic.rs");
|
||||||
|
// @@protoc_insertion_point(module)
|
618
src/gen/licenses.v1.serde.rs
Normal file
618
src/gen/licenses.v1.serde.rs
Normal file
@ -0,0 +1,618 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
impl serde::Serialize for CancelRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.license_id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("licenses.v1.CancelRequest", len)?;
|
||||||
|
if !self.license_id.is_empty() {
|
||||||
|
struct_ser.serialize_field("licenseId", &self.license_id)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for CancelRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"license_id",
|
||||||
|
"licenseId",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
LicenseId,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"licenseId" | "license_id" => Ok(GeneratedField::LicenseId),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = CancelRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct licenses.v1.CancelRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<CancelRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut license_id__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::LicenseId => {
|
||||||
|
if license_id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("licenseId"));
|
||||||
|
}
|
||||||
|
license_id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(CancelRequest {
|
||||||
|
license_id: license_id__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("licenses.v1.CancelRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for CancelResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("licenses.v1.CancelResponse", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for CancelResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = CancelResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct licenses.v1.CancelResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<CancelResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(CancelResponse {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("licenses.v1.CancelResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for License {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
if !self.package_name.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("licenses.v1.License", len)?;
|
||||||
|
if !self.id.is_empty() {
|
||||||
|
struct_ser.serialize_field("id", &self.id)?;
|
||||||
|
}
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
struct_ser.serialize_field("productId", &self.product_id)?;
|
||||||
|
}
|
||||||
|
if !self.package_name.is_empty() {
|
||||||
|
struct_ser.serialize_field("packageName", &self.package_name)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for License {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"id",
|
||||||
|
"product_id",
|
||||||
|
"productId",
|
||||||
|
"package_name",
|
||||||
|
"packageName",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Id,
|
||||||
|
ProductId,
|
||||||
|
PackageName,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"id" => Ok(GeneratedField::Id),
|
||||||
|
"productId" | "product_id" => Ok(GeneratedField::ProductId),
|
||||||
|
"packageName" | "package_name" => Ok(GeneratedField::PackageName),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = License;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct licenses.v1.License")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<License, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut id__ = None;
|
||||||
|
let mut product_id__ = None;
|
||||||
|
let mut package_name__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Id => {
|
||||||
|
if id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("id"));
|
||||||
|
}
|
||||||
|
id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
GeneratedField::ProductId => {
|
||||||
|
if product_id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("productId"));
|
||||||
|
}
|
||||||
|
product_id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
GeneratedField::PackageName => {
|
||||||
|
if package_name__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("packageName"));
|
||||||
|
}
|
||||||
|
package_name__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(License {
|
||||||
|
id: id__.unwrap_or_default(),
|
||||||
|
product_id: product_id__.unwrap_or_default(),
|
||||||
|
package_name: package_name__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("licenses.v1.License", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for ListRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("licenses.v1.ListRequest", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for ListRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = ListRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct licenses.v1.ListRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<ListRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(ListRequest {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("licenses.v1.ListRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for ListResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.licenses.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("licenses.v1.ListResponse", len)?;
|
||||||
|
if !self.licenses.is_empty() {
|
||||||
|
struct_ser.serialize_field("licenses", &self.licenses)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for ListResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"licenses",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Licenses,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"licenses" => Ok(GeneratedField::Licenses),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = ListResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct licenses.v1.ListResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<ListResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut licenses__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Licenses => {
|
||||||
|
if licenses__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("licenses"));
|
||||||
|
}
|
||||||
|
licenses__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(ListResponse {
|
||||||
|
licenses: licenses__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("licenses.v1.ListResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for PurchaseRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if self.license.is_some() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("licenses.v1.PurchaseRequest", len)?;
|
||||||
|
if let Some(v) = self.license.as_ref() {
|
||||||
|
struct_ser.serialize_field("license", v)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for PurchaseRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"license",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
License,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"license" => Ok(GeneratedField::License),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = PurchaseRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct licenses.v1.PurchaseRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<PurchaseRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut license__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::License => {
|
||||||
|
if license__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("license"));
|
||||||
|
}
|
||||||
|
license__ = map.next_value()?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(PurchaseRequest {
|
||||||
|
license: license__,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("licenses.v1.PurchaseRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for PurchaseResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("licenses.v1.PurchaseResponse", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for PurchaseResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = PurchaseResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct licenses.v1.PurchaseResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<PurchaseResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(PurchaseResponse {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("licenses.v1.PurchaseResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
442
src/gen/licenses.v1.tonic.rs
Normal file
442
src/gen/licenses.v1.tonic.rs
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
/// Generated client implementations.
|
||||||
|
pub mod license_service_client {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
use tonic::codegen::http::Uri;
|
||||||
|
///
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct LicenseServiceClient<T> {
|
||||||
|
inner: tonic::client::Grpc<T>,
|
||||||
|
}
|
||||||
|
impl LicenseServiceClient<tonic::transport::Channel> {
|
||||||
|
/// Attempt to create a new client by connecting to a given endpoint.
|
||||||
|
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
|
||||||
|
where
|
||||||
|
D: TryInto<tonic::transport::Endpoint>,
|
||||||
|
D::Error: Into<StdError>,
|
||||||
|
{
|
||||||
|
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
|
||||||
|
Ok(Self::new(conn))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T> LicenseServiceClient<T>
|
||||||
|
where
|
||||||
|
T: tonic::client::GrpcService<tonic::body::BoxBody>,
|
||||||
|
T::Error: Into<StdError>,
|
||||||
|
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
|
||||||
|
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
|
||||||
|
{
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::new(inner);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_origin(inner: T, origin: Uri) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::with_origin(inner, origin);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> LicenseServiceClient<InterceptedService<T, F>>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
T::ResponseBody: Default,
|
||||||
|
T: tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
Response = http::Response<
|
||||||
|
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
|
||||||
|
>,
|
||||||
|
>,
|
||||||
|
<T as tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
>>::Error: Into<StdError> + Send + Sync,
|
||||||
|
{
|
||||||
|
LicenseServiceClient::new(InterceptedService::new(inner, interceptor))
|
||||||
|
}
|
||||||
|
/// Compress requests with the given encoding.
|
||||||
|
///
|
||||||
|
/// This requires the server to support it otherwise it might respond with an
|
||||||
|
/// error.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.send_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Enable decompressing responses.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.accept_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_decoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_encoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn list(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::ListRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/licenses.v1.LicenseService/List",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("licenses.v1.LicenseService", "List"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn purchase(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::PurchaseRequest>,
|
||||||
|
) -> std::result::Result<
|
||||||
|
tonic::Response<super::PurchaseResponse>,
|
||||||
|
tonic::Status,
|
||||||
|
> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/licenses.v1.LicenseService/Purchase",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("licenses.v1.LicenseService", "Purchase"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn cancel(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::CancelRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::CancelResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/licenses.v1.LicenseService/Cancel",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("licenses.v1.LicenseService", "Cancel"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// Generated server implementations.
|
||||||
|
pub mod license_service_server {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
/// Generated trait containing gRPC methods that should be implemented for use with LicenseServiceServer.
|
||||||
|
#[async_trait]
|
||||||
|
pub trait LicenseService: Send + Sync + 'static {
|
||||||
|
///
|
||||||
|
async fn list(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::ListRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn purchase(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::PurchaseRequest>,
|
||||||
|
) -> std::result::Result<
|
||||||
|
tonic::Response<super::PurchaseResponse>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
///
|
||||||
|
async fn cancel(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::CancelRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::CancelResponse>, tonic::Status>;
|
||||||
|
}
|
||||||
|
///
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct LicenseServiceServer<T: LicenseService> {
|
||||||
|
inner: _Inner<T>,
|
||||||
|
accept_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
send_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
max_decoding_message_size: Option<usize>,
|
||||||
|
max_encoding_message_size: Option<usize>,
|
||||||
|
}
|
||||||
|
struct _Inner<T>(Arc<T>);
|
||||||
|
impl<T: LicenseService> LicenseServiceServer<T> {
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
Self::from_arc(Arc::new(inner))
|
||||||
|
}
|
||||||
|
pub fn from_arc(inner: Arc<T>) -> Self {
|
||||||
|
let inner = _Inner(inner);
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: Default::default(),
|
||||||
|
send_compression_encodings: Default::default(),
|
||||||
|
max_decoding_message_size: None,
|
||||||
|
max_encoding_message_size: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> InterceptedService<Self, F>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
{
|
||||||
|
InterceptedService::new(Self::new(inner), interceptor)
|
||||||
|
}
|
||||||
|
/// Enable decompressing requests with the given encoding.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.accept_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Compress responses with the given encoding, if the client supports it.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.send_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_decoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_encoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T, B> tonic::codegen::Service<http::Request<B>> for LicenseServiceServer<T>
|
||||||
|
where
|
||||||
|
T: LicenseService,
|
||||||
|
B: Body + Send + 'static,
|
||||||
|
B::Error: Into<StdError> + Send + 'static,
|
||||||
|
{
|
||||||
|
type Response = http::Response<tonic::body::BoxBody>;
|
||||||
|
type Error = std::convert::Infallible;
|
||||||
|
type Future = BoxFuture<Self::Response, Self::Error>;
|
||||||
|
fn poll_ready(
|
||||||
|
&mut self,
|
||||||
|
_cx: &mut Context<'_>,
|
||||||
|
) -> Poll<std::result::Result<(), Self::Error>> {
|
||||||
|
Poll::Ready(Ok(()))
|
||||||
|
}
|
||||||
|
fn call(&mut self, req: http::Request<B>) -> Self::Future {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
match req.uri().path() {
|
||||||
|
"/licenses.v1.LicenseService/List" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct ListSvc<T: LicenseService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: LicenseService,
|
||||||
|
> tonic::server::UnaryService<super::ListRequest> for ListSvc<T> {
|
||||||
|
type Response = super::ListResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::ListRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).list(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = ListSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/licenses.v1.LicenseService/Purchase" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct PurchaseSvc<T: LicenseService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: LicenseService,
|
||||||
|
> tonic::server::UnaryService<super::PurchaseRequest>
|
||||||
|
for PurchaseSvc<T> {
|
||||||
|
type Response = super::PurchaseResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::PurchaseRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).purchase(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = PurchaseSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/licenses.v1.LicenseService/Cancel" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct CancelSvc<T: LicenseService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: LicenseService,
|
||||||
|
> tonic::server::UnaryService<super::CancelRequest>
|
||||||
|
for CancelSvc<T> {
|
||||||
|
type Response = super::CancelResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::CancelRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).cancel(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = CancelSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
Box::pin(async move {
|
||||||
|
Ok(
|
||||||
|
http::Response::builder()
|
||||||
|
.status(200)
|
||||||
|
.header("grpc-status", "12")
|
||||||
|
.header("content-type", "application/grpc")
|
||||||
|
.body(empty_body())
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: LicenseService> Clone for LicenseServiceServer<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: self.accept_compression_encodings,
|
||||||
|
send_compression_encodings: self.send_compression_encodings,
|
||||||
|
max_decoding_message_size: self.max_decoding_message_size,
|
||||||
|
max_encoding_message_size: self.max_encoding_message_size,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: LicenseService> Clone for _Inner<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
Self(Arc::clone(&self.0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(f, "{:?}", self.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: LicenseService> tonic::server::NamedService for LicenseServiceServer<T> {
|
||||||
|
const NAME: &'static str = "licenses.v1.LicenseService";
|
||||||
|
}
|
||||||
|
}
|
270
src/gen/packages.v1.rs
Normal file
270
src/gen/packages.v1.rs
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Package {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub product_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="3")]
|
||||||
|
pub name: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListRequest {
|
||||||
|
#[prost(string, tag="5")]
|
||||||
|
pub product_id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListResponse {
|
||||||
|
#[prost(message, repeated, tag="5")]
|
||||||
|
pub packages: ::prost::alloc::vec::Vec<Package>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CreateRequest {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub package: ::core::option::Option<Package>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CreateResponse {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ReadRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub product_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub package_name: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ReadResponse {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub package: ::core::option::Option<Package>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct UpdateRequest {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub package: ::core::option::Option<Package>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct UpdateResponse {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct DeleteRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub product_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub package_name: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct DeleteResponse {
|
||||||
|
}
|
||||||
|
/// Encoded file descriptor set for the `packages.v1` package
|
||||||
|
pub const FILE_DESCRIPTOR_SET: &[u8] = &[
|
||||||
|
0x0a, 0xf2, 0x17, 0x0a, 0x19, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31,
|
||||||
|
0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b,
|
||||||
|
0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f,
|
||||||
|
0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4c, 0x0a, 0x07, 0x50, 0x61, 0x63,
|
||||||
|
0x6b, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x02, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f,
|
||||||
|
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
|
||||||
|
0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2c, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
||||||
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
|
||||||
|
0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64,
|
||||||
|
0x75, 0x63, 0x74, 0x49, 0x64, 0x22, 0x40, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
|
||||||
|
0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67,
|
||||||
|
0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x08, 0x70,
|
||||||
|
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x22, 0x3f, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||||
|
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b,
|
||||||
|
0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x61, 0x63, 0x6b,
|
||||||
|
0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52,
|
||||||
|
0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61,
|
||||||
|
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4f, 0x0a, 0x0b, 0x52, 0x65,
|
||||||
|
0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f,
|
||||||
|
0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70,
|
||||||
|
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b,
|
||||||
|
0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
|
||||||
|
0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x0c, 0x52,
|
||||||
|
0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x70,
|
||||||
|
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70,
|
||||||
|
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61,
|
||||||
|
0x67, 0x65, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0x3f, 0x0a, 0x0d, 0x55,
|
||||||
|
0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07,
|
||||||
|
0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
|
||||||
|
0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b,
|
||||||
|
0x61, 0x67, 0x65, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0x10, 0x0a, 0x0e,
|
||||||
|
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51,
|
||||||
|
0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||||
|
0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x12, 0x21,
|
||||||
|
0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d,
|
||||||
|
0x65, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
|
0x6e, 0x73, 0x65, 0x32, 0xf3, 0x04, 0x0a, 0x0e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53,
|
||||||
|
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18,
|
||||||
|
0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,
|
||||||
|
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61,
|
||||||
|
0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
|
0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x76, 0x31,
|
||||||
|
0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x64, 0x75,
|
||||||
|
0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12,
|
||||||
|
0x78, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x6b,
|
||||||
|
0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73,
|
||||||
|
0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
|
0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x01, 0x2a, 0x22, 0x2a, 0x2f,
|
||||||
|
0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x63,
|
||||||
|
0x6b, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d,
|
||||||
|
0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x76, 0x0a, 0x04, 0x52, 0x65, 0x61,
|
||||||
|
0x64, 0x12, 0x18, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e,
|
||||||
|
0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x61,
|
||||||
|
0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31,
|
||||||
|
0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72,
|
||||||
|
0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67,
|
||||||
|
0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
|
||||||
|
0x7d, 0x12, 0x87, 0x01, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x70,
|
||||||
|
0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||||
|
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61,
|
||||||
|
0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x3a, 0x01, 0x2a,
|
||||||
|
0x22, 0x39, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b,
|
||||||
|
0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f,
|
||||||
|
0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61,
|
||||||
|
0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x7c, 0x0a, 0x06, 0x44,
|
||||||
|
0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73,
|
||||||
|
0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e,
|
||||||
|
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39,
|
||||||
|
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x2a, 0x31, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64,
|
||||||
|
0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64,
|
||||||
|
0x7d, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b,
|
||||||
|
0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x4a, 0xd1, 0x0d, 0x0a, 0x06, 0x12, 0x04,
|
||||||
|
0x0a, 0x00, 0x5a, 0x01, 0x0a, 0xb0, 0x02, 0x0a, 0x01, 0x0c, 0x12, 0x03, 0x0a, 0x00, 0x12, 0x32,
|
||||||
|
0x48, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x43, 0x29, 0x20,
|
||||||
|
0x32, 0x30, 0x32, 0x33, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x69,
|
||||||
|
0x6e, 0x67, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x0a, 0x20, 0x53, 0x50, 0x44, 0x58,
|
||||||
|
0x2d, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2d, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66,
|
||||||
|
0x69, 0x65, 0x72, 0x3a, 0x20, 0x4d, 0x49, 0x54, 0x0a, 0x32, 0xdb, 0x01, 0x0a, 0x20, 0x54, 0x68,
|
||||||
|
0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73,
|
||||||
|
0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||||
|
0x6e, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x65, 0x73,
|
||||||
|
0x69, 0x67, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x20, 0x64, 0x65, 0x73,
|
||||||
|
0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c,
|
||||||
|
0x65, 0x20, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e,
|
||||||
|
0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65,
|
||||||
|
0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||||
|
0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x2d, 0x20, 0x53, 0x65,
|
||||||
|
0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x3a,
|
||||||
|
0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67,
|
||||||
|
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64,
|
||||||
|
0x65, 0x73, 0x69, 0x67, 0x6e, 0x2f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x70, 0x61, 0x74,
|
||||||
|
0x74, 0x65, 0x72, 0x6e, 0x73, 0x0a, 0x0a, 0x0a, 0x08, 0x0a, 0x01, 0x02, 0x12, 0x03, 0x0c, 0x00,
|
||||||
|
0x14, 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x00, 0x12, 0x03, 0x0e, 0x00, 0x26, 0x0a, 0x0a, 0x0a, 0x02,
|
||||||
|
0x04, 0x00, 0x12, 0x04, 0x10, 0x00, 0x14, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x00, 0x01, 0x12,
|
||||||
|
0x03, 0x10, 0x08, 0x0f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x00, 0x12, 0x03, 0x11, 0x02,
|
||||||
|
0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x05, 0x12, 0x03, 0x11, 0x02, 0x08, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x11, 0x09, 0x0b, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x11, 0x0e, 0x0f, 0x0a, 0x0b, 0x0a, 0x04, 0x04,
|
||||||
|
0x00, 0x02, 0x01, 0x12, 0x03, 0x12, 0x02, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01,
|
||||||
|
0x05, 0x12, 0x03, 0x12, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, 0x12,
|
||||||
|
0x03, 0x12, 0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x12,
|
||||||
|
0x16, 0x17, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x02, 0x12, 0x03, 0x13, 0x02, 0x12, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x05, 0x12, 0x03, 0x13, 0x02, 0x08, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x13, 0x09, 0x0d, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x00, 0x02, 0x02, 0x03, 0x12, 0x03, 0x13, 0x10, 0x11, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x01, 0x12,
|
||||||
|
0x04, 0x16, 0x00, 0x18, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x01, 0x01, 0x12, 0x03, 0x16, 0x08,
|
||||||
|
0x13, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x00, 0x12, 0x03, 0x17, 0x02, 0x18, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x05, 0x12, 0x03, 0x17, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x17, 0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01,
|
||||||
|
0x02, 0x00, 0x03, 0x12, 0x03, 0x17, 0x16, 0x17, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x02, 0x12, 0x04,
|
||||||
|
0x1a, 0x00, 0x1c, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, 0x01, 0x12, 0x03, 0x1a, 0x08, 0x14,
|
||||||
|
0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x00, 0x12, 0x03, 0x1b, 0x02, 0x20, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x02, 0x02, 0x00, 0x04, 0x12, 0x03, 0x1b, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x02, 0x02, 0x00, 0x06, 0x12, 0x03, 0x1b, 0x0b, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02,
|
||||||
|
0x00, 0x01, 0x12, 0x03, 0x1b, 0x13, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x03,
|
||||||
|
0x12, 0x03, 0x1b, 0x1e, 0x1f, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x03, 0x12, 0x04, 0x1e, 0x00, 0x20,
|
||||||
|
0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x03, 0x01, 0x12, 0x03, 0x1e, 0x08, 0x15, 0x0a, 0x0b, 0x0a,
|
||||||
|
0x04, 0x04, 0x03, 0x02, 0x00, 0x12, 0x03, 0x1f, 0x02, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03,
|
||||||
|
0x02, 0x00, 0x06, 0x12, 0x03, 0x1f, 0x02, 0x09, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00,
|
||||||
|
0x01, 0x12, 0x03, 0x1f, 0x0a, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x03, 0x12,
|
||||||
|
0x03, 0x1f, 0x14, 0x15, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x04, 0x12, 0x03, 0x22, 0x00, 0x19, 0x0a,
|
||||||
|
0x0a, 0x0a, 0x03, 0x04, 0x04, 0x01, 0x12, 0x03, 0x22, 0x08, 0x16, 0x0a, 0x0a, 0x0a, 0x02, 0x04,
|
||||||
|
0x05, 0x12, 0x04, 0x24, 0x00, 0x27, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x05, 0x01, 0x12, 0x03,
|
||||||
|
0x24, 0x08, 0x13, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x05, 0x02, 0x00, 0x12, 0x03, 0x25, 0x02, 0x18,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x05, 0x12, 0x03, 0x25, 0x02, 0x08, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x01, 0x12, 0x03, 0x25, 0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x05, 0x02, 0x00, 0x03, 0x12, 0x03, 0x25, 0x16, 0x17, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x05,
|
||||||
|
0x02, 0x01, 0x12, 0x03, 0x26, 0x02, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x01, 0x05,
|
||||||
|
0x12, 0x03, 0x26, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x01, 0x01, 0x12, 0x03,
|
||||||
|
0x26, 0x09, 0x15, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x01, 0x03, 0x12, 0x03, 0x26, 0x18,
|
||||||
|
0x19, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x06, 0x12, 0x04, 0x29, 0x00, 0x2b, 0x01, 0x0a, 0x0a, 0x0a,
|
||||||
|
0x03, 0x04, 0x06, 0x01, 0x12, 0x03, 0x29, 0x08, 0x14, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x06, 0x02,
|
||||||
|
0x00, 0x12, 0x03, 0x2a, 0x02, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, 0x06, 0x12,
|
||||||
|
0x03, 0x2a, 0x02, 0x09, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, 0x01, 0x12, 0x03, 0x2a,
|
||||||
|
0x0a, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, 0x03, 0x12, 0x03, 0x2a, 0x14, 0x15,
|
||||||
|
0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x07, 0x12, 0x04, 0x2d, 0x00, 0x2f, 0x01, 0x0a, 0x0a, 0x0a, 0x03,
|
||||||
|
0x04, 0x07, 0x01, 0x12, 0x03, 0x2d, 0x08, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x07, 0x02, 0x00,
|
||||||
|
0x12, 0x03, 0x2e, 0x02, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x00, 0x06, 0x12, 0x03,
|
||||||
|
0x2e, 0x02, 0x09, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x00, 0x01, 0x12, 0x03, 0x2e, 0x0a,
|
||||||
|
0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x00, 0x03, 0x12, 0x03, 0x2e, 0x14, 0x15, 0x0a,
|
||||||
|
0x09, 0x0a, 0x02, 0x04, 0x08, 0x12, 0x03, 0x31, 0x00, 0x19, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x08,
|
||||||
|
0x01, 0x12, 0x03, 0x31, 0x08, 0x16, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x09, 0x12, 0x04, 0x33, 0x00,
|
||||||
|
0x36, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x09, 0x01, 0x12, 0x03, 0x33, 0x08, 0x15, 0x0a, 0x0b,
|
||||||
|
0x0a, 0x04, 0x04, 0x09, 0x02, 0x00, 0x12, 0x03, 0x34, 0x02, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x09, 0x02, 0x00, 0x05, 0x12, 0x03, 0x34, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02,
|
||||||
|
0x00, 0x01, 0x12, 0x03, 0x34, 0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x00, 0x03,
|
||||||
|
0x12, 0x03, 0x34, 0x16, 0x17, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x09, 0x02, 0x01, 0x12, 0x03, 0x35,
|
||||||
|
0x02, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x01, 0x05, 0x12, 0x03, 0x35, 0x02, 0x08,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x01, 0x01, 0x12, 0x03, 0x35, 0x09, 0x15, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x09, 0x02, 0x01, 0x03, 0x12, 0x03, 0x35, 0x18, 0x19, 0x0a, 0x09, 0x0a, 0x02,
|
||||||
|
0x04, 0x0a, 0x12, 0x03, 0x38, 0x00, 0x19, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x0a, 0x01, 0x12, 0x03,
|
||||||
|
0x38, 0x08, 0x16, 0x0a, 0x0a, 0x0a, 0x02, 0x06, 0x00, 0x12, 0x04, 0x3a, 0x00, 0x5a, 0x01, 0x0a,
|
||||||
|
0x0a, 0x0a, 0x03, 0x06, 0x00, 0x01, 0x12, 0x03, 0x3a, 0x08, 0x16, 0x0a, 0x0c, 0x0a, 0x04, 0x06,
|
||||||
|
0x00, 0x02, 0x00, 0x12, 0x04, 0x3b, 0x02, 0x3f, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02,
|
||||||
|
0x00, 0x01, 0x12, 0x03, 0x3b, 0x06, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x02,
|
||||||
|
0x12, 0x03, 0x3b, 0x0b, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03,
|
||||||
|
0x3b, 0x21, 0x2d, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x04, 0x12, 0x04, 0x3c, 0x04,
|
||||||
|
0x3e, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x00, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12,
|
||||||
|
0x04, 0x3c, 0x04, 0x3e, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x01, 0x12, 0x04, 0x41,
|
||||||
|
0x02, 0x46, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x41, 0x06,
|
||||||
|
0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x02, 0x12, 0x03, 0x41, 0x0d, 0x1a, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x41, 0x25, 0x33, 0x0a, 0x0d, 0x0a,
|
||||||
|
0x05, 0x06, 0x00, 0x02, 0x01, 0x04, 0x12, 0x04, 0x42, 0x04, 0x45, 0x06, 0x0a, 0x11, 0x0a, 0x09,
|
||||||
|
0x06, 0x00, 0x02, 0x01, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x42, 0x04, 0x45, 0x06, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x02, 0x12, 0x04, 0x48, 0x02, 0x4c, 0x03, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x06, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x48, 0x06, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x06,
|
||||||
|
0x00, 0x02, 0x02, 0x02, 0x12, 0x03, 0x48, 0x0b, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02,
|
||||||
|
0x02, 0x03, 0x12, 0x03, 0x48, 0x21, 0x2d, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x02, 0x04,
|
||||||
|
0x12, 0x04, 0x49, 0x04, 0x4b, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x02, 0x04, 0xb0,
|
||||||
|
0xca, 0xbc, 0x22, 0x12, 0x04, 0x49, 0x04, 0x4b, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02,
|
||||||
|
0x03, 0x12, 0x04, 0x4e, 0x02, 0x53, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x01,
|
||||||
|
0x12, 0x03, 0x4e, 0x06, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x02, 0x12, 0x03,
|
||||||
|
0x4e, 0x0d, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x03, 0x12, 0x03, 0x4e, 0x25,
|
||||||
|
0x33, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x04, 0x12, 0x04, 0x4f, 0x04, 0x52, 0x06,
|
||||||
|
0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x03, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x4f,
|
||||||
|
0x04, 0x52, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x04, 0x12, 0x04, 0x55, 0x02, 0x59,
|
||||||
|
0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x04, 0x01, 0x12, 0x03, 0x55, 0x06, 0x0c, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x04, 0x02, 0x12, 0x03, 0x55, 0x0d, 0x1a, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x06, 0x00, 0x02, 0x04, 0x03, 0x12, 0x03, 0x55, 0x25, 0x33, 0x0a, 0x0d, 0x0a, 0x05, 0x06,
|
||||||
|
0x00, 0x02, 0x04, 0x04, 0x12, 0x04, 0x56, 0x04, 0x58, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00,
|
||||||
|
0x02, 0x04, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x56, 0x04, 0x58, 0x06, 0x62, 0x06, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
];
|
||||||
|
include!("packages.v1.serde.rs");
|
||||||
|
include!("packages.v1.tonic.rs");
|
||||||
|
// @@protoc_insertion_point(module)
|
1019
src/gen/packages.v1.serde.rs
Normal file
1019
src/gen/packages.v1.serde.rs
Normal file
File diff suppressed because it is too large
Load Diff
579
src/gen/packages.v1.tonic.rs
Normal file
579
src/gen/packages.v1.tonic.rs
Normal file
@ -0,0 +1,579 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
/// Generated client implementations.
|
||||||
|
pub mod package_service_client {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
use tonic::codegen::http::Uri;
|
||||||
|
///
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct PackageServiceClient<T> {
|
||||||
|
inner: tonic::client::Grpc<T>,
|
||||||
|
}
|
||||||
|
impl PackageServiceClient<tonic::transport::Channel> {
|
||||||
|
/// Attempt to create a new client by connecting to a given endpoint.
|
||||||
|
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
|
||||||
|
where
|
||||||
|
D: TryInto<tonic::transport::Endpoint>,
|
||||||
|
D::Error: Into<StdError>,
|
||||||
|
{
|
||||||
|
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
|
||||||
|
Ok(Self::new(conn))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T> PackageServiceClient<T>
|
||||||
|
where
|
||||||
|
T: tonic::client::GrpcService<tonic::body::BoxBody>,
|
||||||
|
T::Error: Into<StdError>,
|
||||||
|
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
|
||||||
|
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
|
||||||
|
{
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::new(inner);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_origin(inner: T, origin: Uri) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::with_origin(inner, origin);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> PackageServiceClient<InterceptedService<T, F>>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
T::ResponseBody: Default,
|
||||||
|
T: tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
Response = http::Response<
|
||||||
|
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
|
||||||
|
>,
|
||||||
|
>,
|
||||||
|
<T as tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
>>::Error: Into<StdError> + Send + Sync,
|
||||||
|
{
|
||||||
|
PackageServiceClient::new(InterceptedService::new(inner, interceptor))
|
||||||
|
}
|
||||||
|
/// Compress requests with the given encoding.
|
||||||
|
///
|
||||||
|
/// This requires the server to support it otherwise it might respond with an
|
||||||
|
/// error.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.send_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Enable decompressing responses.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.accept_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_decoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_encoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn list(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::ListRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/packages.v1.PackageService/List",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("packages.v1.PackageService", "List"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn create(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::CreateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::CreateResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/packages.v1.PackageService/Create",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("packages.v1.PackageService", "Create"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn read(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::ReadRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ReadResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/packages.v1.PackageService/Read",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("packages.v1.PackageService", "Read"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn update(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::UpdateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::UpdateResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/packages.v1.PackageService/Update",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("packages.v1.PackageService", "Update"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn delete(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::DeleteRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/packages.v1.PackageService/Delete",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("packages.v1.PackageService", "Delete"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// Generated server implementations.
|
||||||
|
pub mod package_service_server {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
/// Generated trait containing gRPC methods that should be implemented for use with PackageServiceServer.
|
||||||
|
#[async_trait]
|
||||||
|
pub trait PackageService: Send + Sync + 'static {
|
||||||
|
///
|
||||||
|
async fn list(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::ListRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn create(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::CreateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::CreateResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn read(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::ReadRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ReadResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn update(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::UpdateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::UpdateResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn delete(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::DeleteRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status>;
|
||||||
|
}
|
||||||
|
///
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct PackageServiceServer<T: PackageService> {
|
||||||
|
inner: _Inner<T>,
|
||||||
|
accept_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
send_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
max_decoding_message_size: Option<usize>,
|
||||||
|
max_encoding_message_size: Option<usize>,
|
||||||
|
}
|
||||||
|
struct _Inner<T>(Arc<T>);
|
||||||
|
impl<T: PackageService> PackageServiceServer<T> {
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
Self::from_arc(Arc::new(inner))
|
||||||
|
}
|
||||||
|
pub fn from_arc(inner: Arc<T>) -> Self {
|
||||||
|
let inner = _Inner(inner);
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: Default::default(),
|
||||||
|
send_compression_encodings: Default::default(),
|
||||||
|
max_decoding_message_size: None,
|
||||||
|
max_encoding_message_size: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> InterceptedService<Self, F>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
{
|
||||||
|
InterceptedService::new(Self::new(inner), interceptor)
|
||||||
|
}
|
||||||
|
/// Enable decompressing requests with the given encoding.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.accept_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Compress responses with the given encoding, if the client supports it.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.send_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_decoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_encoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T, B> tonic::codegen::Service<http::Request<B>> for PackageServiceServer<T>
|
||||||
|
where
|
||||||
|
T: PackageService,
|
||||||
|
B: Body + Send + 'static,
|
||||||
|
B::Error: Into<StdError> + Send + 'static,
|
||||||
|
{
|
||||||
|
type Response = http::Response<tonic::body::BoxBody>;
|
||||||
|
type Error = std::convert::Infallible;
|
||||||
|
type Future = BoxFuture<Self::Response, Self::Error>;
|
||||||
|
fn poll_ready(
|
||||||
|
&mut self,
|
||||||
|
_cx: &mut Context<'_>,
|
||||||
|
) -> Poll<std::result::Result<(), Self::Error>> {
|
||||||
|
Poll::Ready(Ok(()))
|
||||||
|
}
|
||||||
|
fn call(&mut self, req: http::Request<B>) -> Self::Future {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
match req.uri().path() {
|
||||||
|
"/packages.v1.PackageService/List" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct ListSvc<T: PackageService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: PackageService,
|
||||||
|
> tonic::server::UnaryService<super::ListRequest> for ListSvc<T> {
|
||||||
|
type Response = super::ListResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::ListRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).list(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = ListSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/packages.v1.PackageService/Create" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct CreateSvc<T: PackageService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: PackageService,
|
||||||
|
> tonic::server::UnaryService<super::CreateRequest>
|
||||||
|
for CreateSvc<T> {
|
||||||
|
type Response = super::CreateResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::CreateRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).create(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = CreateSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/packages.v1.PackageService/Read" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct ReadSvc<T: PackageService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: PackageService,
|
||||||
|
> tonic::server::UnaryService<super::ReadRequest> for ReadSvc<T> {
|
||||||
|
type Response = super::ReadResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::ReadRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).read(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = ReadSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/packages.v1.PackageService/Update" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct UpdateSvc<T: PackageService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: PackageService,
|
||||||
|
> tonic::server::UnaryService<super::UpdateRequest>
|
||||||
|
for UpdateSvc<T> {
|
||||||
|
type Response = super::UpdateResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::UpdateRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).update(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = UpdateSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/packages.v1.PackageService/Delete" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct DeleteSvc<T: PackageService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: PackageService,
|
||||||
|
> tonic::server::UnaryService<super::DeleteRequest>
|
||||||
|
for DeleteSvc<T> {
|
||||||
|
type Response = super::DeleteResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::DeleteRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).delete(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = DeleteSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
Box::pin(async move {
|
||||||
|
Ok(
|
||||||
|
http::Response::builder()
|
||||||
|
.status(200)
|
||||||
|
.header("grpc-status", "12")
|
||||||
|
.header("content-type", "application/grpc")
|
||||||
|
.body(empty_body())
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: PackageService> Clone for PackageServiceServer<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: self.accept_compression_encodings,
|
||||||
|
send_compression_encodings: self.send_compression_encodings,
|
||||||
|
max_decoding_message_size: self.max_decoding_message_size,
|
||||||
|
max_encoding_message_size: self.max_encoding_message_size,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: PackageService> Clone for _Inner<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
Self(Arc::clone(&self.0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(f, "{:?}", self.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: PackageService> tonic::server::NamedService for PackageServiceServer<T> {
|
||||||
|
const NAME: &'static str = "packages.v1.PackageService";
|
||||||
|
}
|
||||||
|
}
|
239
src/gen/products.v1.rs
Normal file
239
src/gen/products.v1.rs
Normal file
@ -0,0 +1,239 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Product {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub name: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="3")]
|
||||||
|
pub description: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListRequest {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListResponse {
|
||||||
|
#[prost(message, repeated, tag="5")]
|
||||||
|
pub products: ::prost::alloc::vec::Vec<Product>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CreateRequest {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub product: ::core::option::Option<Product>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CreateResponse {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ReadRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub product_id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ReadResponse {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub product: ::core::option::Option<Product>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct UpdateRequest {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub product: ::core::option::Option<Product>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct UpdateResponse {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct DeleteRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub product_id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct DeleteResponse {
|
||||||
|
}
|
||||||
|
/// Encoded file descriptor set for the `products.v1` package
|
||||||
|
pub const FILE_DESCRIPTOR_SET: &[u8] = &[
|
||||||
|
0x0a, 0xe5, 0x14, 0x0a, 0x19, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x76, 0x31,
|
||||||
|
0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b,
|
||||||
|
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f,
|
||||||
|
0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x07, 0x50, 0x72, 0x6f,
|
||||||
|
0x64, 0x75, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
|
||||||
|
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
|
||||||
|
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x0d, 0x0a, 0x0b, 0x4c, 0x69,
|
||||||
|
0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x40, 0x0a, 0x0c, 0x4c, 0x69, 0x73,
|
||||||
|
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x70, 0x72, 0x6f,
|
||||||
|
0x64, 0x75, 0x63, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72,
|
||||||
|
0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63,
|
||||||
|
0x74, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x22, 0x3f, 0x0a, 0x0d, 0x43,
|
||||||
|
0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x07,
|
||||||
|
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
|
||||||
|
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x64,
|
||||||
|
0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0x10, 0x0a, 0x0e,
|
||||||
|
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c,
|
||||||
|
0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a,
|
||||||
|
0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x0c,
|
||||||
|
0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x07,
|
||||||
|
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
|
||||||
|
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x64,
|
||||||
|
0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0x3f, 0x0a, 0x0d,
|
||||||
|
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a,
|
||||||
|
0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
|
||||||
|
0x2e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f,
|
||||||
|
0x64, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x22, 0x10, 0x0a,
|
||||||
|
0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||||
|
0x2e, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x49, 0x64, 0x22,
|
||||||
|
0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
|
0x65, 0x32, 0xee, 0x03, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x65, 0x72,
|
||||||
|
0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x70,
|
||||||
|
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
||||||
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
|
||||||
|
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
|
0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x70,
|
||||||
|
0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x12, 0x5a, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||||
|
0x65, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e,
|
||||||
|
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
|
||||||
|
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61,
|
||||||
|
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93,
|
||||||
|
0x02, 0x11, 0x3a, 0x01, 0x2a, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75,
|
||||||
|
0x63, 0x74, 0x73, 0x12, 0x5e, 0x0a, 0x04, 0x52, 0x65, 0x61, 0x64, 0x12, 0x18, 0x2e, 0x70, 0x72,
|
||||||
|
0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73,
|
||||||
|
0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
|
0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72,
|
||||||
|
0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f,
|
||||||
|
0x69, 0x64, 0x7d, 0x12, 0x67, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x2e,
|
||||||
|
0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61,
|
||||||
|
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x64,
|
||||||
|
0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01,
|
||||||
|
0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2f,
|
||||||
|
0x7b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x2e, 0x69, 0x64, 0x7d, 0x12, 0x64, 0x0a, 0x06,
|
||||||
|
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74,
|
||||||
|
0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
|
0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x2e, 0x76, 0x31,
|
||||||
|
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||||
|
0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x2a, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f,
|
||||||
|
0x64, 0x75, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x69,
|
||||||
|
0x64, 0x7d, 0x4a, 0xab, 0x0c, 0x0a, 0x06, 0x12, 0x04, 0x0a, 0x00, 0x56, 0x01, 0x0a, 0xb0, 0x02,
|
||||||
|
0x0a, 0x01, 0x0c, 0x12, 0x03, 0x0a, 0x00, 0x12, 0x32, 0x48, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72,
|
||||||
|
0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x32, 0x33, 0x20, 0x54, 0x68,
|
||||||
|
0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x75, 0x74, 0x68,
|
||||||
|
0x6f, 0x72, 0x73, 0x0a, 0x20, 0x53, 0x50, 0x44, 0x58, 0x2d, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73,
|
||||||
|
0x65, 0x2d, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x20, 0x4d, 0x49,
|
||||||
|
0x54, 0x0a, 0x32, 0xdb, 0x01, 0x0a, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65,
|
||||||
|
0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x6c,
|
||||||
|
0x6c, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65,
|
||||||
|
0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x70, 0x61, 0x74,
|
||||||
|
0x74, 0x65, 0x72, 0x6e, 0x73, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20,
|
||||||
|
0x62, 0x79, 0x0a, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x43, 0x6c, 0x6f, 0x75, 0x64,
|
||||||
|
0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20,
|
||||||
|
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x76, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66,
|
||||||
|
0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72,
|
||||||
|
0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x2d, 0x20, 0x53, 0x65, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20,
|
||||||
|
0x66, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a,
|
||||||
|
0x2f, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63,
|
||||||
|
0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2f, 0x64,
|
||||||
|
0x65, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x0a, 0x0a,
|
||||||
|
0x0a, 0x08, 0x0a, 0x01, 0x02, 0x12, 0x03, 0x0c, 0x00, 0x14, 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x00,
|
||||||
|
0x12, 0x03, 0x0e, 0x00, 0x26, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x00, 0x12, 0x04, 0x10, 0x00, 0x14,
|
||||||
|
0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x00, 0x01, 0x12, 0x03, 0x10, 0x08, 0x0f, 0x0a, 0x0b, 0x0a,
|
||||||
|
0x04, 0x04, 0x00, 0x02, 0x00, 0x12, 0x03, 0x11, 0x02, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00,
|
||||||
|
0x02, 0x00, 0x05, 0x12, 0x03, 0x11, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00,
|
||||||
|
0x01, 0x12, 0x03, 0x11, 0x09, 0x0b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x03, 0x12,
|
||||||
|
0x03, 0x11, 0x0e, 0x0f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x01, 0x12, 0x03, 0x12, 0x02,
|
||||||
|
0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x05, 0x12, 0x03, 0x12, 0x02, 0x08, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x12, 0x09, 0x0d, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x12, 0x10, 0x11, 0x0a, 0x0b, 0x0a, 0x04, 0x04,
|
||||||
|
0x00, 0x02, 0x02, 0x12, 0x03, 0x13, 0x02, 0x19, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02,
|
||||||
|
0x05, 0x12, 0x03, 0x13, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x01, 0x12,
|
||||||
|
0x03, 0x13, 0x09, 0x14, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x03, 0x12, 0x03, 0x13,
|
||||||
|
0x17, 0x18, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x01, 0x12, 0x03, 0x16, 0x00, 0x16, 0x0a, 0x0a, 0x0a,
|
||||||
|
0x03, 0x04, 0x01, 0x01, 0x12, 0x03, 0x16, 0x08, 0x13, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x02, 0x12,
|
||||||
|
0x04, 0x18, 0x00, 0x1a, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, 0x01, 0x12, 0x03, 0x18, 0x08,
|
||||||
|
0x14, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x00, 0x12, 0x03, 0x19, 0x02, 0x20, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x04, 0x12, 0x03, 0x19, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x02, 0x02, 0x00, 0x06, 0x12, 0x03, 0x19, 0x0b, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02,
|
||||||
|
0x02, 0x00, 0x01, 0x12, 0x03, 0x19, 0x13, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00,
|
||||||
|
0x03, 0x12, 0x03, 0x19, 0x1e, 0x1f, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x03, 0x12, 0x04, 0x1c, 0x00,
|
||||||
|
0x1e, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x03, 0x01, 0x12, 0x03, 0x1c, 0x08, 0x15, 0x0a, 0x0b,
|
||||||
|
0x0a, 0x04, 0x04, 0x03, 0x02, 0x00, 0x12, 0x03, 0x1d, 0x02, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x03, 0x02, 0x00, 0x06, 0x12, 0x03, 0x1d, 0x02, 0x09, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02,
|
||||||
|
0x00, 0x01, 0x12, 0x03, 0x1d, 0x0a, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x03, 0x02, 0x00, 0x03,
|
||||||
|
0x12, 0x03, 0x1d, 0x14, 0x15, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x04, 0x12, 0x03, 0x20, 0x00, 0x19,
|
||||||
|
0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x04, 0x01, 0x12, 0x03, 0x20, 0x08, 0x16, 0x0a, 0x0a, 0x0a, 0x02,
|
||||||
|
0x04, 0x05, 0x12, 0x04, 0x22, 0x00, 0x24, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x05, 0x01, 0x12,
|
||||||
|
0x03, 0x22, 0x08, 0x13, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x05, 0x02, 0x00, 0x12, 0x03, 0x23, 0x02,
|
||||||
|
0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x05, 0x12, 0x03, 0x23, 0x02, 0x08, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x01, 0x12, 0x03, 0x23, 0x09, 0x13, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x05, 0x02, 0x00, 0x03, 0x12, 0x03, 0x23, 0x16, 0x17, 0x0a, 0x0a, 0x0a, 0x02, 0x04,
|
||||||
|
0x06, 0x12, 0x04, 0x26, 0x00, 0x28, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x06, 0x01, 0x12, 0x03,
|
||||||
|
0x26, 0x08, 0x14, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x06, 0x02, 0x00, 0x12, 0x03, 0x27, 0x02, 0x16,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, 0x06, 0x12, 0x03, 0x27, 0x02, 0x09, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, 0x01, 0x12, 0x03, 0x27, 0x0a, 0x11, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x06, 0x02, 0x00, 0x03, 0x12, 0x03, 0x27, 0x14, 0x15, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x07,
|
||||||
|
0x12, 0x04, 0x2a, 0x00, 0x2c, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x07, 0x01, 0x12, 0x03, 0x2a,
|
||||||
|
0x08, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x07, 0x02, 0x00, 0x12, 0x03, 0x2b, 0x02, 0x16, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x00, 0x06, 0x12, 0x03, 0x2b, 0x02, 0x09, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x07, 0x02, 0x00, 0x01, 0x12, 0x03, 0x2b, 0x0a, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x07, 0x02, 0x00, 0x03, 0x12, 0x03, 0x2b, 0x14, 0x15, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x08, 0x12,
|
||||||
|
0x03, 0x2e, 0x00, 0x19, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x08, 0x01, 0x12, 0x03, 0x2e, 0x08, 0x16,
|
||||||
|
0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x09, 0x12, 0x04, 0x30, 0x00, 0x32, 0x01, 0x0a, 0x0a, 0x0a, 0x03,
|
||||||
|
0x04, 0x09, 0x01, 0x12, 0x03, 0x30, 0x08, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x09, 0x02, 0x00,
|
||||||
|
0x12, 0x03, 0x31, 0x02, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x00, 0x05, 0x12, 0x03,
|
||||||
|
0x31, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x00, 0x01, 0x12, 0x03, 0x31, 0x09,
|
||||||
|
0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x09, 0x02, 0x00, 0x03, 0x12, 0x03, 0x31, 0x16, 0x17, 0x0a,
|
||||||
|
0x09, 0x0a, 0x02, 0x04, 0x0a, 0x12, 0x03, 0x34, 0x00, 0x19, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x0a,
|
||||||
|
0x01, 0x12, 0x03, 0x34, 0x08, 0x16, 0x0a, 0x0a, 0x0a, 0x02, 0x06, 0x00, 0x12, 0x04, 0x36, 0x00,
|
||||||
|
0x56, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x06, 0x00, 0x01, 0x12, 0x03, 0x36, 0x08, 0x16, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x04, 0x06, 0x00, 0x02, 0x00, 0x12, 0x04, 0x37, 0x02, 0x3b, 0x03, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x06, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x37, 0x06, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00,
|
||||||
|
0x02, 0x00, 0x02, 0x12, 0x03, 0x37, 0x0b, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00,
|
||||||
|
0x03, 0x12, 0x03, 0x37, 0x21, 0x2d, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x04, 0x12,
|
||||||
|
0x04, 0x38, 0x04, 0x3a, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x00, 0x04, 0xb0, 0xca,
|
||||||
|
0xbc, 0x22, 0x12, 0x04, 0x38, 0x04, 0x3a, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x01,
|
||||||
|
0x12, 0x04, 0x3d, 0x02, 0x42, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x01, 0x12,
|
||||||
|
0x03, 0x3d, 0x06, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x02, 0x12, 0x03, 0x3d,
|
||||||
|
0x0d, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x3d, 0x25, 0x33,
|
||||||
|
0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x04, 0x12, 0x04, 0x3e, 0x04, 0x41, 0x06, 0x0a,
|
||||||
|
0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x01, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x3e, 0x04,
|
||||||
|
0x41, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x02, 0x12, 0x04, 0x44, 0x02, 0x48, 0x03,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x44, 0x06, 0x0a, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x06, 0x00, 0x02, 0x02, 0x02, 0x12, 0x03, 0x44, 0x0b, 0x16, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x06, 0x00, 0x02, 0x02, 0x03, 0x12, 0x03, 0x44, 0x21, 0x2d, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00,
|
||||||
|
0x02, 0x02, 0x04, 0x12, 0x04, 0x45, 0x04, 0x47, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02,
|
||||||
|
0x02, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x45, 0x04, 0x47, 0x06, 0x0a, 0x0c, 0x0a, 0x04,
|
||||||
|
0x06, 0x00, 0x02, 0x03, 0x12, 0x04, 0x4a, 0x02, 0x4f, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00,
|
||||||
|
0x02, 0x03, 0x01, 0x12, 0x03, 0x4a, 0x06, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03,
|
||||||
|
0x02, 0x12, 0x03, 0x4a, 0x0d, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x03, 0x12,
|
||||||
|
0x03, 0x4a, 0x25, 0x33, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x04, 0x12, 0x04, 0x4b,
|
||||||
|
0x04, 0x4e, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x03, 0x04, 0xb0, 0xca, 0xbc, 0x22,
|
||||||
|
0x12, 0x04, 0x4b, 0x04, 0x4e, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x04, 0x12, 0x04,
|
||||||
|
0x51, 0x02, 0x55, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x04, 0x01, 0x12, 0x03, 0x51,
|
||||||
|
0x06, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x04, 0x02, 0x12, 0x03, 0x51, 0x0d, 0x1a,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x04, 0x03, 0x12, 0x03, 0x51, 0x25, 0x33, 0x0a, 0x0d,
|
||||||
|
0x0a, 0x05, 0x06, 0x00, 0x02, 0x04, 0x04, 0x12, 0x04, 0x52, 0x04, 0x54, 0x06, 0x0a, 0x11, 0x0a,
|
||||||
|
0x09, 0x06, 0x00, 0x02, 0x04, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x52, 0x04, 0x54, 0x06,
|
||||||
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
];
|
||||||
|
include!("products.v1.serde.rs");
|
||||||
|
include!("products.v1.tonic.rs");
|
||||||
|
// @@protoc_insertion_point(module)
|
961
src/gen/products.v1.serde.rs
Normal file
961
src/gen/products.v1.serde.rs
Normal file
@ -0,0 +1,961 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
impl serde::Serialize for CreateRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if self.product.is_some() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("products.v1.CreateRequest", len)?;
|
||||||
|
if let Some(v) = self.product.as_ref() {
|
||||||
|
struct_ser.serialize_field("product", v)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for CreateRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"product",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Product,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"product" => Ok(GeneratedField::Product),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = CreateRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.CreateRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<CreateRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut product__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Product => {
|
||||||
|
if product__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("product"));
|
||||||
|
}
|
||||||
|
product__ = map.next_value()?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(CreateRequest {
|
||||||
|
product: product__,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.CreateRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for CreateResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("products.v1.CreateResponse", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for CreateResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = CreateResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.CreateResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<CreateResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(CreateResponse {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.CreateResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for DeleteRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("products.v1.DeleteRequest", len)?;
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
struct_ser.serialize_field("productId", &self.product_id)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for DeleteRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"product_id",
|
||||||
|
"productId",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
ProductId,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"productId" | "product_id" => Ok(GeneratedField::ProductId),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = DeleteRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.DeleteRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<DeleteRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut product_id__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::ProductId => {
|
||||||
|
if product_id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("productId"));
|
||||||
|
}
|
||||||
|
product_id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(DeleteRequest {
|
||||||
|
product_id: product_id__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.DeleteRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for DeleteResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("products.v1.DeleteResponse", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for DeleteResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = DeleteResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.DeleteResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<DeleteResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(DeleteResponse {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.DeleteResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for ListRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("products.v1.ListRequest", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for ListRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = ListRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.ListRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<ListRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(ListRequest {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.ListRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for ListResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.products.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("products.v1.ListResponse", len)?;
|
||||||
|
if !self.products.is_empty() {
|
||||||
|
struct_ser.serialize_field("products", &self.products)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for ListResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"products",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Products,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"products" => Ok(GeneratedField::Products),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = ListResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.ListResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<ListResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut products__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Products => {
|
||||||
|
if products__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("products"));
|
||||||
|
}
|
||||||
|
products__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(ListResponse {
|
||||||
|
products: products__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.ListResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for Product {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
if !self.name.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
if !self.description.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("products.v1.Product", len)?;
|
||||||
|
if !self.id.is_empty() {
|
||||||
|
struct_ser.serialize_field("id", &self.id)?;
|
||||||
|
}
|
||||||
|
if !self.name.is_empty() {
|
||||||
|
struct_ser.serialize_field("name", &self.name)?;
|
||||||
|
}
|
||||||
|
if !self.description.is_empty() {
|
||||||
|
struct_ser.serialize_field("description", &self.description)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for Product {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"description",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Id,
|
||||||
|
Name,
|
||||||
|
Description,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"id" => Ok(GeneratedField::Id),
|
||||||
|
"name" => Ok(GeneratedField::Name),
|
||||||
|
"description" => Ok(GeneratedField::Description),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = Product;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.Product")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<Product, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut id__ = None;
|
||||||
|
let mut name__ = None;
|
||||||
|
let mut description__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Id => {
|
||||||
|
if id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("id"));
|
||||||
|
}
|
||||||
|
id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
GeneratedField::Name => {
|
||||||
|
if name__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("name"));
|
||||||
|
}
|
||||||
|
name__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
GeneratedField::Description => {
|
||||||
|
if description__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("description"));
|
||||||
|
}
|
||||||
|
description__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(Product {
|
||||||
|
id: id__.unwrap_or_default(),
|
||||||
|
name: name__.unwrap_or_default(),
|
||||||
|
description: description__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.Product", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for ReadRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("products.v1.ReadRequest", len)?;
|
||||||
|
if !self.product_id.is_empty() {
|
||||||
|
struct_ser.serialize_field("productId", &self.product_id)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for ReadRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"product_id",
|
||||||
|
"productId",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
ProductId,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"productId" | "product_id" => Ok(GeneratedField::ProductId),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = ReadRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.ReadRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<ReadRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut product_id__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::ProductId => {
|
||||||
|
if product_id__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("productId"));
|
||||||
|
}
|
||||||
|
product_id__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(ReadRequest {
|
||||||
|
product_id: product_id__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.ReadRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for ReadResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if self.product.is_some() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("products.v1.ReadResponse", len)?;
|
||||||
|
if let Some(v) = self.product.as_ref() {
|
||||||
|
struct_ser.serialize_field("product", v)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for ReadResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"product",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Product,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"product" => Ok(GeneratedField::Product),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = ReadResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.ReadResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<ReadResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut product__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Product => {
|
||||||
|
if product__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("product"));
|
||||||
|
}
|
||||||
|
product__ = map.next_value()?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(ReadResponse {
|
||||||
|
product: product__,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.ReadResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for UpdateRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if self.product.is_some() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("products.v1.UpdateRequest", len)?;
|
||||||
|
if let Some(v) = self.product.as_ref() {
|
||||||
|
struct_ser.serialize_field("product", v)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for UpdateRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"product",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Product,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"product" => Ok(GeneratedField::Product),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = UpdateRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.UpdateRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<UpdateRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut product__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Product => {
|
||||||
|
if product__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("product"));
|
||||||
|
}
|
||||||
|
product__ = map.next_value()?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(UpdateRequest {
|
||||||
|
product: product__,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.UpdateRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for UpdateResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("products.v1.UpdateResponse", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for UpdateResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = UpdateResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct products.v1.UpdateResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<UpdateResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(UpdateResponse {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("products.v1.UpdateResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
579
src/gen/products.v1.tonic.rs
Normal file
579
src/gen/products.v1.tonic.rs
Normal file
@ -0,0 +1,579 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
/// Generated client implementations.
|
||||||
|
pub mod product_service_client {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
use tonic::codegen::http::Uri;
|
||||||
|
///
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct ProductServiceClient<T> {
|
||||||
|
inner: tonic::client::Grpc<T>,
|
||||||
|
}
|
||||||
|
impl ProductServiceClient<tonic::transport::Channel> {
|
||||||
|
/// Attempt to create a new client by connecting to a given endpoint.
|
||||||
|
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
|
||||||
|
where
|
||||||
|
D: TryInto<tonic::transport::Endpoint>,
|
||||||
|
D::Error: Into<StdError>,
|
||||||
|
{
|
||||||
|
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
|
||||||
|
Ok(Self::new(conn))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T> ProductServiceClient<T>
|
||||||
|
where
|
||||||
|
T: tonic::client::GrpcService<tonic::body::BoxBody>,
|
||||||
|
T::Error: Into<StdError>,
|
||||||
|
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
|
||||||
|
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
|
||||||
|
{
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::new(inner);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_origin(inner: T, origin: Uri) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::with_origin(inner, origin);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> ProductServiceClient<InterceptedService<T, F>>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
T::ResponseBody: Default,
|
||||||
|
T: tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
Response = http::Response<
|
||||||
|
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
|
||||||
|
>,
|
||||||
|
>,
|
||||||
|
<T as tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
>>::Error: Into<StdError> + Send + Sync,
|
||||||
|
{
|
||||||
|
ProductServiceClient::new(InterceptedService::new(inner, interceptor))
|
||||||
|
}
|
||||||
|
/// Compress requests with the given encoding.
|
||||||
|
///
|
||||||
|
/// This requires the server to support it otherwise it might respond with an
|
||||||
|
/// error.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.send_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Enable decompressing responses.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.accept_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_decoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_encoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn list(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::ListRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/products.v1.ProductService/List",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("products.v1.ProductService", "List"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn create(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::CreateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::CreateResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/products.v1.ProductService/Create",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("products.v1.ProductService", "Create"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn read(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::ReadRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ReadResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/products.v1.ProductService/Read",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("products.v1.ProductService", "Read"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn update(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::UpdateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::UpdateResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/products.v1.ProductService/Update",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("products.v1.ProductService", "Update"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn delete(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::DeleteRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/products.v1.ProductService/Delete",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("products.v1.ProductService", "Delete"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// Generated server implementations.
|
||||||
|
pub mod product_service_server {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
/// Generated trait containing gRPC methods that should be implemented for use with ProductServiceServer.
|
||||||
|
#[async_trait]
|
||||||
|
pub trait ProductService: Send + Sync + 'static {
|
||||||
|
///
|
||||||
|
async fn list(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::ListRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn create(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::CreateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::CreateResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn read(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::ReadRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ReadResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn update(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::UpdateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::UpdateResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn delete(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::DeleteRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status>;
|
||||||
|
}
|
||||||
|
///
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct ProductServiceServer<T: ProductService> {
|
||||||
|
inner: _Inner<T>,
|
||||||
|
accept_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
send_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
max_decoding_message_size: Option<usize>,
|
||||||
|
max_encoding_message_size: Option<usize>,
|
||||||
|
}
|
||||||
|
struct _Inner<T>(Arc<T>);
|
||||||
|
impl<T: ProductService> ProductServiceServer<T> {
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
Self::from_arc(Arc::new(inner))
|
||||||
|
}
|
||||||
|
pub fn from_arc(inner: Arc<T>) -> Self {
|
||||||
|
let inner = _Inner(inner);
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: Default::default(),
|
||||||
|
send_compression_encodings: Default::default(),
|
||||||
|
max_decoding_message_size: None,
|
||||||
|
max_encoding_message_size: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> InterceptedService<Self, F>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
{
|
||||||
|
InterceptedService::new(Self::new(inner), interceptor)
|
||||||
|
}
|
||||||
|
/// Enable decompressing requests with the given encoding.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.accept_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Compress responses with the given encoding, if the client supports it.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.send_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_decoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_encoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T, B> tonic::codegen::Service<http::Request<B>> for ProductServiceServer<T>
|
||||||
|
where
|
||||||
|
T: ProductService,
|
||||||
|
B: Body + Send + 'static,
|
||||||
|
B::Error: Into<StdError> + Send + 'static,
|
||||||
|
{
|
||||||
|
type Response = http::Response<tonic::body::BoxBody>;
|
||||||
|
type Error = std::convert::Infallible;
|
||||||
|
type Future = BoxFuture<Self::Response, Self::Error>;
|
||||||
|
fn poll_ready(
|
||||||
|
&mut self,
|
||||||
|
_cx: &mut Context<'_>,
|
||||||
|
) -> Poll<std::result::Result<(), Self::Error>> {
|
||||||
|
Poll::Ready(Ok(()))
|
||||||
|
}
|
||||||
|
fn call(&mut self, req: http::Request<B>) -> Self::Future {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
match req.uri().path() {
|
||||||
|
"/products.v1.ProductService/List" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct ListSvc<T: ProductService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: ProductService,
|
||||||
|
> tonic::server::UnaryService<super::ListRequest> for ListSvc<T> {
|
||||||
|
type Response = super::ListResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::ListRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).list(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = ListSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/products.v1.ProductService/Create" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct CreateSvc<T: ProductService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: ProductService,
|
||||||
|
> tonic::server::UnaryService<super::CreateRequest>
|
||||||
|
for CreateSvc<T> {
|
||||||
|
type Response = super::CreateResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::CreateRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).create(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = CreateSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/products.v1.ProductService/Read" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct ReadSvc<T: ProductService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: ProductService,
|
||||||
|
> tonic::server::UnaryService<super::ReadRequest> for ReadSvc<T> {
|
||||||
|
type Response = super::ReadResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::ReadRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).read(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = ReadSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/products.v1.ProductService/Update" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct UpdateSvc<T: ProductService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: ProductService,
|
||||||
|
> tonic::server::UnaryService<super::UpdateRequest>
|
||||||
|
for UpdateSvc<T> {
|
||||||
|
type Response = super::UpdateResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::UpdateRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).update(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = UpdateSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/products.v1.ProductService/Delete" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct DeleteSvc<T: ProductService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: ProductService,
|
||||||
|
> tonic::server::UnaryService<super::DeleteRequest>
|
||||||
|
for DeleteSvc<T> {
|
||||||
|
type Response = super::DeleteResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::DeleteRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).delete(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = DeleteSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
Box::pin(async move {
|
||||||
|
Ok(
|
||||||
|
http::Response::builder()
|
||||||
|
.status(200)
|
||||||
|
.header("grpc-status", "12")
|
||||||
|
.header("content-type", "application/grpc")
|
||||||
|
.body(empty_body())
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: ProductService> Clone for ProductServiceServer<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: self.accept_compression_encodings,
|
||||||
|
send_compression_encodings: self.send_compression_encodings,
|
||||||
|
max_decoding_message_size: self.max_decoding_message_size,
|
||||||
|
max_encoding_message_size: self.max_encoding_message_size,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: ProductService> Clone for _Inner<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
Self(Arc::clone(&self.0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(f, "{:?}", self.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: ProductService> tonic::server::NamedService for ProductServiceServer<T> {
|
||||||
|
const NAME: &'static str = "products.v1.ProductService";
|
||||||
|
}
|
||||||
|
}
|
397
src/gen/tokens.v1.rs
Normal file
397
src/gen/tokens.v1.rs
Normal file
@ -0,0 +1,397 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct AuthenticateRequest {
|
||||||
|
/// grant_type = client_credentials, refresh_token, password, authorization_code, license
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub grant_type: ::prost::alloc::string::String,
|
||||||
|
/// required for a handful of workflows
|
||||||
|
/// can also come from the basic auth header
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub client_id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="3")]
|
||||||
|
pub client_secret: ::prost::alloc::string::String,
|
||||||
|
/// grant_type=refresh_token
|
||||||
|
#[prost(string, tag="4")]
|
||||||
|
pub refresh_token: ::prost::alloc::string::String,
|
||||||
|
/// grant_type=password
|
||||||
|
#[prost(string, tag="5")]
|
||||||
|
pub username: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="6")]
|
||||||
|
pub password: ::prost::alloc::string::String,
|
||||||
|
/// grant_type=authorization_code
|
||||||
|
#[prost(string, tag="7")]
|
||||||
|
pub code: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="8")]
|
||||||
|
pub redirect_uri: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="9")]
|
||||||
|
pub code_verifier: ::prost::alloc::string::String,
|
||||||
|
/// grant_type=license
|
||||||
|
#[prost(string, tag="10")]
|
||||||
|
pub license: ::prost::alloc::string::String,
|
||||||
|
// allow for room to add additional grant_type's
|
||||||
|
|
||||||
|
#[prost(string, tag="20")]
|
||||||
|
pub scope: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct AuthenticateResponse {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub access_token: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub token_type: ::prost::alloc::string::String,
|
||||||
|
#[prost(int32, tag="3")]
|
||||||
|
pub expires_in: i32,
|
||||||
|
#[prost(string, tag="4")]
|
||||||
|
pub refresh_token: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="5")]
|
||||||
|
pub scope: ::prost::alloc::string::String,
|
||||||
|
// error = invalid_request, invalid_client, invalid_grant, invalid_scope, unauthorized_client, unsupported_grant_type
|
||||||
|
|
||||||
|
#[prost(string, tag="10")]
|
||||||
|
pub error: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="11")]
|
||||||
|
pub error_description: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="12")]
|
||||||
|
pub error_uri: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct Token {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub id: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub name: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, repeated, tag="3")]
|
||||||
|
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||||
|
/// one of
|
||||||
|
#[prost(bool, tag="4")]
|
||||||
|
pub no_expiry: bool,
|
||||||
|
#[prost(string, tag="5")]
|
||||||
|
pub expires_at: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="6")]
|
||||||
|
pub expires_in: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListRequest {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct ListResponse {
|
||||||
|
#[prost(message, repeated, tag="5")]
|
||||||
|
pub tokens: ::prost::alloc::vec::Vec<Token>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CreateRequest {
|
||||||
|
#[prost(message, optional, tag="1")]
|
||||||
|
pub token: ::core::option::Option<Token>,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CreateResponse {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub token: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct DeleteRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub token_id: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct DeleteResponse {
|
||||||
|
}
|
||||||
|
/// Encoded file descriptor set for the `tokens.v1` package
|
||||||
|
pub const FILE_DESCRIPTOR_SET: &[u8] = &[
|
||||||
|
0x0a, 0x89, 0x23, 0x0a, 0x17, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73,
|
||||||
|
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x74, 0x6f,
|
||||||
|
0x6b, 0x65, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
|
||||||
|
0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x02, 0x0a, 0x13, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e,
|
||||||
|
0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a,
|
||||||
|
0x0a, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x09, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09,
|
||||||
|
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
|
0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69,
|
||||||
|
0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x23,
|
||||||
|
0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
|
||||||
|
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f,
|
||||||
|
0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||||
|
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
||||||
|
0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63,
|
||||||
|
0x6f, 0x64, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
|
||||||
|
0x21, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69, 0x18,
|
||||||
|
0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55,
|
||||||
|
0x72, 0x69, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66,
|
||||||
|
0x69, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x64, 0x65, 0x56,
|
||||||
|
0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e,
|
||||||
|
0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73,
|
||||||
|
0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x92, 0x02, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68,
|
||||||
|
0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
|
0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||||
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f,
|
||||||
|
0x6b, 0x65, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70,
|
||||||
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79,
|
||||||
|
0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e,
|
||||||
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49,
|
||||||
|
0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b,
|
||||||
|
0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73,
|
||||||
|
0x68, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18,
|
||||||
|
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05,
|
||||||
|
0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72,
|
||||||
|
0x6f, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x73, 0x63,
|
||||||
|
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65,
|
||||||
|
0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||||
|
0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x0c, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x55, 0x72, 0x69, 0x22, 0x9e, 0x01, 0x0a,
|
||||||
|
0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63,
|
||||||
|
0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70,
|
||||||
|
0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18,
|
||||||
|
0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x6f, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12,
|
||||||
|
0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x41, 0x74, 0x12, 0x1d,
|
||||||
|
0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x5f, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x49, 0x6e, 0x22, 0x0d, 0x0a,
|
||||||
|
0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x38, 0x0a, 0x0c,
|
||||||
|
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06,
|
||||||
|
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74,
|
||||||
|
0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x06,
|
||||||
|
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x37, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||||
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||||
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2e,
|
||||||
|
0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22,
|
||||||
|
0x26, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
|
0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
|
0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2a, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||||
|
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65,
|
||||||
|
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65,
|
||||||
|
0x6e, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf6, 0x02, 0x0a, 0x0c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53,
|
||||||
|
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x65, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e,
|
||||||
|
0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2e,
|
||||||
|
0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52,
|
||||||
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2e,
|
||||||
|
0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52,
|
||||||
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x3a,
|
||||||
|
0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x4b, 0x0a,
|
||||||
|
0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2e, 0x76,
|
||||||
|
0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
|
||||||
|
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a,
|
||||||
|
0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x54, 0x0a, 0x06, 0x43, 0x72,
|
||||||
|
0x65, 0x61, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2e, 0x76, 0x31,
|
||||||
|
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
|
||||||
|
0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||||
|
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||||
|
0x0f, 0x3a, 0x01, 0x2a, 0x22, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73,
|
||||||
|
0x12, 0x5c, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x18, 0x2e, 0x74, 0x6f, 0x6b,
|
||||||
|
0x65, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x2e, 0x76, 0x31,
|
||||||
|
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||||
|
0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x2a, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x6f, 0x6b,
|
||||||
|
0x65, 0x6e, 0x73, 0x2f, 0x7b, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x4a, 0xc3,
|
||||||
|
0x17, 0x0a, 0x06, 0x12, 0x04, 0x0a, 0x00, 0x74, 0x01, 0x0a, 0xb0, 0x02, 0x0a, 0x01, 0x0c, 0x12,
|
||||||
|
0x03, 0x0a, 0x00, 0x12, 0x32, 0x48, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74,
|
||||||
|
0x20, 0x28, 0x43, 0x29, 0x20, 0x32, 0x30, 0x32, 0x33, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4c, 0x69,
|
||||||
|
0x63, 0x65, 0x6e, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x0a,
|
||||||
|
0x20, 0x53, 0x50, 0x44, 0x58, 0x2d, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2d, 0x49, 0x64,
|
||||||
|
0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x20, 0x4d, 0x49, 0x54, 0x0a, 0x32, 0xdb,
|
||||||
|
0x01, 0x0a, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x61, 0x74, 0x74,
|
||||||
|
0x65, 0x6d, 0x70, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x20,
|
||||||
|
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x20, 0x61, 0x6e,
|
||||||
|
0x64, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e,
|
||||||
|
0x73, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x20,
|
||||||
|
0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x62, 0x61, 0x73,
|
||||||
|
0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x65, 0x78, 0x74, 0x65,
|
||||||
|
0x6e, 0x73, 0x69, 0x76, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x0a,
|
||||||
|
0x20, 0x2d, 0x20, 0x53, 0x65, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20,
|
||||||
|
0x6d, 0x6f, 0x72, 0x65, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6c,
|
||||||
|
0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61,
|
||||||
|
0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2f, 0x64, 0x65, 0x73, 0x69, 0x67,
|
||||||
|
0x6e, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x0a, 0x0a, 0x0a, 0x08, 0x0a, 0x01,
|
||||||
|
0x02, 0x12, 0x03, 0x0c, 0x00, 0x12, 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x00, 0x12, 0x03, 0x0e, 0x00,
|
||||||
|
0x26, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x00, 0x12, 0x04, 0x10, 0x00, 0x2b, 0x01, 0x0a, 0x0a, 0x0a,
|
||||||
|
0x03, 0x04, 0x00, 0x01, 0x12, 0x03, 0x10, 0x08, 0x1b, 0x0a, 0x64, 0x0a, 0x04, 0x04, 0x00, 0x02,
|
||||||
|
0x00, 0x12, 0x03, 0x12, 0x02, 0x18, 0x1a, 0x57, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x74,
|
||||||
|
0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x72, 0x65,
|
||||||
|
0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x2c, 0x20, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73,
|
||||||
|
0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,
|
||||||
|
0x64, 0x2c, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
|
0x5f, 0x63, 0x6f, 0x64, 0x65, 0x2c, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x05, 0x12, 0x03, 0x12, 0x02, 0x08, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x12, 0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x12, 0x16, 0x17, 0x0a, 0x5c, 0x0a, 0x04, 0x04, 0x00, 0x02,
|
||||||
|
0x01, 0x12, 0x03, 0x16, 0x02, 0x17, 0x1a, 0x4f, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
|
||||||
|
0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x66, 0x75, 0x6c, 0x20,
|
||||||
|
0x6f, 0x66, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x0a, 0x20, 0x63, 0x61,
|
||||||
|
0x6e, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d,
|
||||||
|
0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x73, 0x69, 0x63, 0x20, 0x61, 0x75, 0x74, 0x68, 0x20,
|
||||||
|
0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x05,
|
||||||
|
0x12, 0x03, 0x16, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03,
|
||||||
|
0x16, 0x09, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x16, 0x15,
|
||||||
|
0x16, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x02, 0x12, 0x03, 0x17, 0x02, 0x1b, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x00, 0x02, 0x02, 0x05, 0x12, 0x03, 0x17, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x17, 0x09, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00,
|
||||||
|
0x02, 0x02, 0x03, 0x12, 0x03, 0x17, 0x19, 0x1a, 0x0a, 0x27, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x03,
|
||||||
|
0x12, 0x03, 0x1a, 0x02, 0x1b, 0x1a, 0x1a, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79,
|
||||||
|
0x70, 0x65, 0x3d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||||
|
0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x05, 0x12, 0x03, 0x1a, 0x02, 0x08, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x03, 0x01, 0x12, 0x03, 0x1a, 0x09, 0x16, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x00, 0x02, 0x03, 0x03, 0x12, 0x03, 0x1a, 0x19, 0x1a, 0x0a, 0x22, 0x0a, 0x04, 0x04,
|
||||||
|
0x00, 0x02, 0x04, 0x12, 0x03, 0x1d, 0x02, 0x16, 0x1a, 0x15, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74,
|
||||||
|
0x5f, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x0a, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x04, 0x05, 0x12, 0x03, 0x1d, 0x02, 0x08, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x00, 0x02, 0x04, 0x01, 0x12, 0x03, 0x1d, 0x09, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x00, 0x02, 0x04, 0x03, 0x12, 0x03, 0x1d, 0x14, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02,
|
||||||
|
0x05, 0x12, 0x03, 0x1e, 0x02, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x05, 0x05, 0x12,
|
||||||
|
0x03, 0x1e, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x05, 0x01, 0x12, 0x03, 0x1e,
|
||||||
|
0x09, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x05, 0x03, 0x12, 0x03, 0x1e, 0x14, 0x15,
|
||||||
|
0x0a, 0x2c, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x06, 0x12, 0x03, 0x21, 0x02, 0x12, 0x1a, 0x1f, 0x20,
|
||||||
|
0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x61, 0x75, 0x74, 0x68, 0x6f,
|
||||||
|
0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x0a, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x00, 0x02, 0x06, 0x05, 0x12, 0x03, 0x21, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x00, 0x02, 0x06, 0x01, 0x12, 0x03, 0x21, 0x09, 0x0d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00,
|
||||||
|
0x02, 0x06, 0x03, 0x12, 0x03, 0x21, 0x10, 0x11, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x07,
|
||||||
|
0x12, 0x03, 0x22, 0x02, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x07, 0x05, 0x12, 0x03,
|
||||||
|
0x22, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x07, 0x01, 0x12, 0x03, 0x22, 0x09,
|
||||||
|
0x15, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x07, 0x03, 0x12, 0x03, 0x22, 0x18, 0x19, 0x0a,
|
||||||
|
0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x08, 0x12, 0x03, 0x23, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x00, 0x02, 0x08, 0x05, 0x12, 0x03, 0x23, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00,
|
||||||
|
0x02, 0x08, 0x01, 0x12, 0x03, 0x23, 0x09, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x08,
|
||||||
|
0x03, 0x12, 0x03, 0x23, 0x19, 0x1a, 0x0a, 0x21, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x09, 0x12, 0x03,
|
||||||
|
0x26, 0x02, 0x16, 0x1a, 0x14, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65,
|
||||||
|
0x3d, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02,
|
||||||
|
0x09, 0x05, 0x12, 0x03, 0x26, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x09, 0x01,
|
||||||
|
0x12, 0x03, 0x26, 0x09, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x09, 0x03, 0x12, 0x03,
|
||||||
|
0x26, 0x13, 0x15, 0x0a, 0x3c, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x0a, 0x12, 0x03, 0x2a, 0x02, 0x14,
|
||||||
|
0x32, 0x2f, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x6f, 0x6f,
|
||||||
|
0x6d, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x64, 0x64, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f,
|
||||||
|
0x6e, 0x61, 0x6c, 0x20, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x27, 0x73,
|
||||||
|
0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x0a, 0x05, 0x12, 0x03, 0x2a, 0x02, 0x08, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x0a, 0x01, 0x12, 0x03, 0x2a, 0x09, 0x0e, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x00, 0x02, 0x0a, 0x03, 0x12, 0x03, 0x2a, 0x11, 0x13, 0x0a, 0x0a, 0x0a, 0x02, 0x04,
|
||||||
|
0x01, 0x12, 0x04, 0x2d, 0x00, 0x39, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x01, 0x01, 0x12, 0x03,
|
||||||
|
0x2d, 0x08, 0x1c, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x00, 0x12, 0x03, 0x2e, 0x02, 0x1a,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x05, 0x12, 0x03, 0x2e, 0x02, 0x08, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x01, 0x02, 0x00, 0x01, 0x12, 0x03, 0x2e, 0x09, 0x15, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x01, 0x02, 0x00, 0x03, 0x12, 0x03, 0x2e, 0x18, 0x19, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01,
|
||||||
|
0x02, 0x01, 0x12, 0x03, 0x2f, 0x02, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x05,
|
||||||
|
0x12, 0x03, 0x2f, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x01, 0x12, 0x03,
|
||||||
|
0x2f, 0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x01, 0x03, 0x12, 0x03, 0x2f, 0x16,
|
||||||
|
0x17, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x02, 0x12, 0x03, 0x30, 0x02, 0x17, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x01, 0x02, 0x02, 0x05, 0x12, 0x03, 0x30, 0x02, 0x07, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x01, 0x02, 0x02, 0x01, 0x12, 0x03, 0x30, 0x08, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01,
|
||||||
|
0x02, 0x02, 0x03, 0x12, 0x03, 0x30, 0x15, 0x16, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x03,
|
||||||
|
0x12, 0x03, 0x31, 0x02, 0x1b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x03, 0x05, 0x12, 0x03,
|
||||||
|
0x31, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x03, 0x01, 0x12, 0x03, 0x31, 0x09,
|
||||||
|
0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x03, 0x03, 0x12, 0x03, 0x31, 0x19, 0x1a, 0x0a,
|
||||||
|
0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x04, 0x12, 0x03, 0x32, 0x02, 0x13, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x01, 0x02, 0x04, 0x05, 0x12, 0x03, 0x32, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01,
|
||||||
|
0x02, 0x04, 0x01, 0x12, 0x03, 0x32, 0x09, 0x0e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x04,
|
||||||
|
0x03, 0x12, 0x03, 0x32, 0x11, 0x12, 0x0a, 0x81, 0x01, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x05, 0x12,
|
||||||
|
0x03, 0x36, 0x02, 0x14, 0x32, 0x74, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x69,
|
||||||
|
0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2c, 0x20,
|
||||||
|
0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2c, 0x20,
|
||||||
|
0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x2c, 0x20, 0x69,
|
||||||
|
0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2c, 0x20, 0x75, 0x6e,
|
||||||
|
0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e,
|
||||||
|
0x74, 0x2c, 0x20, 0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x67,
|
||||||
|
0x72, 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01,
|
||||||
|
0x02, 0x05, 0x05, 0x12, 0x03, 0x36, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x05,
|
||||||
|
0x01, 0x12, 0x03, 0x36, 0x09, 0x0e, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x05, 0x03, 0x12,
|
||||||
|
0x03, 0x36, 0x11, 0x13, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x01, 0x02, 0x06, 0x12, 0x03, 0x37, 0x02,
|
||||||
|
0x20, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x06, 0x05, 0x12, 0x03, 0x37, 0x02, 0x08, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x06, 0x01, 0x12, 0x03, 0x37, 0x09, 0x1a, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x04, 0x01, 0x02, 0x06, 0x03, 0x12, 0x03, 0x37, 0x1d, 0x1f, 0x0a, 0x0b, 0x0a, 0x04, 0x04,
|
||||||
|
0x01, 0x02, 0x07, 0x12, 0x03, 0x38, 0x02, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x07,
|
||||||
|
0x05, 0x12, 0x03, 0x38, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x07, 0x01, 0x12,
|
||||||
|
0x03, 0x38, 0x09, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x01, 0x02, 0x07, 0x03, 0x12, 0x03, 0x38,
|
||||||
|
0x15, 0x17, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x02, 0x12, 0x04, 0x3b, 0x00, 0x44, 0x01, 0x0a, 0x0a,
|
||||||
|
0x0a, 0x03, 0x04, 0x02, 0x01, 0x12, 0x03, 0x3b, 0x08, 0x0d, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02,
|
||||||
|
0x02, 0x00, 0x12, 0x03, 0x3c, 0x02, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x05,
|
||||||
|
0x12, 0x03, 0x3c, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x01, 0x12, 0x03,
|
||||||
|
0x3c, 0x09, 0x0b, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x00, 0x03, 0x12, 0x03, 0x3c, 0x0e,
|
||||||
|
0x0f, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x01, 0x12, 0x03, 0x3d, 0x02, 0x12, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x02, 0x02, 0x01, 0x05, 0x12, 0x03, 0x3d, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x04, 0x02, 0x02, 0x01, 0x01, 0x12, 0x03, 0x3d, 0x09, 0x0d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02,
|
||||||
|
0x02, 0x01, 0x03, 0x12, 0x03, 0x3d, 0x10, 0x11, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x02,
|
||||||
|
0x12, 0x03, 0x3e, 0x02, 0x1d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x02, 0x04, 0x12, 0x03,
|
||||||
|
0x3e, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x02, 0x05, 0x12, 0x03, 0x3e, 0x0b,
|
||||||
|
0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x02, 0x01, 0x12, 0x03, 0x3e, 0x12, 0x18, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x02, 0x03, 0x12, 0x03, 0x3e, 0x1b, 0x1c, 0x0a, 0x15, 0x0a,
|
||||||
|
0x04, 0x04, 0x02, 0x02, 0x03, 0x12, 0x03, 0x41, 0x02, 0x15, 0x1a, 0x08, 0x20, 0x6f, 0x6e, 0x65,
|
||||||
|
0x20, 0x6f, 0x66, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x03, 0x05, 0x12, 0x03, 0x41,
|
||||||
|
0x02, 0x06, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x03, 0x01, 0x12, 0x03, 0x41, 0x07, 0x10,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x03, 0x03, 0x12, 0x03, 0x41, 0x13, 0x14, 0x0a, 0x0b,
|
||||||
|
0x0a, 0x04, 0x04, 0x02, 0x02, 0x04, 0x12, 0x03, 0x42, 0x02, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04,
|
||||||
|
0x02, 0x02, 0x04, 0x05, 0x12, 0x03, 0x42, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02,
|
||||||
|
0x04, 0x01, 0x12, 0x03, 0x42, 0x09, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x04, 0x03,
|
||||||
|
0x12, 0x03, 0x42, 0x16, 0x17, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x02, 0x02, 0x05, 0x12, 0x03, 0x43,
|
||||||
|
0x02, 0x18, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x05, 0x05, 0x12, 0x03, 0x43, 0x02, 0x08,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x02, 0x02, 0x05, 0x01, 0x12, 0x03, 0x43, 0x09, 0x13, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x04, 0x02, 0x02, 0x05, 0x03, 0x12, 0x03, 0x43, 0x16, 0x17, 0x0a, 0x09, 0x0a, 0x02,
|
||||||
|
0x04, 0x03, 0x12, 0x03, 0x46, 0x00, 0x16, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x03, 0x01, 0x12, 0x03,
|
||||||
|
0x46, 0x08, 0x13, 0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x04, 0x12, 0x04, 0x48, 0x00, 0x4a, 0x01, 0x0a,
|
||||||
|
0x0a, 0x0a, 0x03, 0x04, 0x04, 0x01, 0x12, 0x03, 0x48, 0x08, 0x14, 0x0a, 0x0b, 0x0a, 0x04, 0x04,
|
||||||
|
0x04, 0x02, 0x00, 0x12, 0x03, 0x49, 0x02, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00,
|
||||||
|
0x04, 0x12, 0x03, 0x49, 0x02, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x06, 0x12,
|
||||||
|
0x03, 0x49, 0x0b, 0x10, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x01, 0x12, 0x03, 0x49,
|
||||||
|
0x11, 0x17, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x04, 0x02, 0x00, 0x03, 0x12, 0x03, 0x49, 0x1a, 0x1b,
|
||||||
|
0x0a, 0x0a, 0x0a, 0x02, 0x04, 0x05, 0x12, 0x04, 0x4c, 0x00, 0x4e, 0x01, 0x0a, 0x0a, 0x0a, 0x03,
|
||||||
|
0x04, 0x05, 0x01, 0x12, 0x03, 0x4c, 0x08, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x05, 0x02, 0x00,
|
||||||
|
0x12, 0x03, 0x4d, 0x02, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x06, 0x12, 0x03,
|
||||||
|
0x4d, 0x02, 0x07, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x01, 0x12, 0x03, 0x4d, 0x08,
|
||||||
|
0x0d, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x05, 0x02, 0x00, 0x03, 0x12, 0x03, 0x4d, 0x10, 0x11, 0x0a,
|
||||||
|
0x0a, 0x0a, 0x02, 0x04, 0x06, 0x12, 0x04, 0x50, 0x00, 0x52, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04,
|
||||||
|
0x06, 0x01, 0x12, 0x03, 0x50, 0x08, 0x16, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x06, 0x02, 0x00, 0x12,
|
||||||
|
0x03, 0x51, 0x02, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, 0x05, 0x12, 0x03, 0x51,
|
||||||
|
0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, 0x01, 0x12, 0x03, 0x51, 0x09, 0x0e,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x06, 0x02, 0x00, 0x03, 0x12, 0x03, 0x51, 0x11, 0x12, 0x0a, 0x0a,
|
||||||
|
0x0a, 0x02, 0x04, 0x07, 0x12, 0x04, 0x54, 0x00, 0x56, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x07,
|
||||||
|
0x01, 0x12, 0x03, 0x54, 0x08, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x07, 0x02, 0x00, 0x12, 0x03,
|
||||||
|
0x55, 0x02, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x00, 0x05, 0x12, 0x03, 0x55, 0x02,
|
||||||
|
0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x00, 0x01, 0x12, 0x03, 0x55, 0x09, 0x11, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x07, 0x02, 0x00, 0x03, 0x12, 0x03, 0x55, 0x14, 0x15, 0x0a, 0x09, 0x0a,
|
||||||
|
0x02, 0x04, 0x08, 0x12, 0x03, 0x58, 0x00, 0x19, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x08, 0x01, 0x12,
|
||||||
|
0x03, 0x58, 0x08, 0x16, 0x0a, 0x0a, 0x0a, 0x02, 0x06, 0x00, 0x12, 0x04, 0x5a, 0x00, 0x74, 0x01,
|
||||||
|
0x0a, 0x0a, 0x0a, 0x03, 0x06, 0x00, 0x01, 0x12, 0x03, 0x5a, 0x08, 0x14, 0x0a, 0x0c, 0x0a, 0x04,
|
||||||
|
0x06, 0x00, 0x02, 0x00, 0x12, 0x04, 0x5b, 0x02, 0x60, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00,
|
||||||
|
0x02, 0x00, 0x01, 0x12, 0x03, 0x5b, 0x06, 0x12, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00,
|
||||||
|
0x02, 0x12, 0x03, 0x5b, 0x13, 0x26, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x03, 0x12,
|
||||||
|
0x03, 0x5b, 0x31, 0x45, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x04, 0x12, 0x04, 0x5c,
|
||||||
|
0x04, 0x5f, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x00, 0x04, 0xb0, 0xca, 0xbc, 0x22,
|
||||||
|
0x12, 0x04, 0x5c, 0x04, 0x5f, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x01, 0x12, 0x04,
|
||||||
|
0x62, 0x02, 0x66, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x01, 0x12, 0x03, 0x62,
|
||||||
|
0x06, 0x0a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x02, 0x12, 0x03, 0x62, 0x0b, 0x16,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03, 0x62, 0x21, 0x2d, 0x0a, 0x0d,
|
||||||
|
0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x04, 0x12, 0x04, 0x63, 0x04, 0x65, 0x06, 0x0a, 0x11, 0x0a,
|
||||||
|
0x09, 0x06, 0x00, 0x02, 0x01, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x63, 0x04, 0x65, 0x06,
|
||||||
|
0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x02, 0x12, 0x04, 0x68, 0x02, 0x6d, 0x03, 0x0a, 0x0c,
|
||||||
|
0x0a, 0x05, 0x06, 0x00, 0x02, 0x02, 0x01, 0x12, 0x03, 0x68, 0x06, 0x0c, 0x0a, 0x0c, 0x0a, 0x05,
|
||||||
|
0x06, 0x00, 0x02, 0x02, 0x02, 0x12, 0x03, 0x68, 0x0d, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00,
|
||||||
|
0x02, 0x02, 0x03, 0x12, 0x03, 0x68, 0x25, 0x33, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x02,
|
||||||
|
0x04, 0x12, 0x04, 0x69, 0x04, 0x6c, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x02, 0x04,
|
||||||
|
0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x69, 0x04, 0x6c, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00,
|
||||||
|
0x02, 0x03, 0x12, 0x04, 0x6f, 0x02, 0x73, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03,
|
||||||
|
0x01, 0x12, 0x03, 0x6f, 0x06, 0x0c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x02, 0x12,
|
||||||
|
0x03, 0x6f, 0x0d, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x03, 0x12, 0x03, 0x6f,
|
||||||
|
0x25, 0x33, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x03, 0x04, 0x12, 0x04, 0x70, 0x04, 0x72,
|
||||||
|
0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x03, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04,
|
||||||
|
0x70, 0x04, 0x72, 0x06, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
];
|
||||||
|
include!("tokens.v1.serde.rs");
|
||||||
|
include!("tokens.v1.tonic.rs");
|
||||||
|
// @@protoc_insertion_point(module)
|
1175
src/gen/tokens.v1.serde.rs
Normal file
1175
src/gen/tokens.v1.serde.rs
Normal file
File diff suppressed because it is too large
Load Diff
515
src/gen/tokens.v1.tonic.rs
Normal file
515
src/gen/tokens.v1.tonic.rs
Normal file
@ -0,0 +1,515 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
/// Generated client implementations.
|
||||||
|
pub mod token_service_client {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
use tonic::codegen::http::Uri;
|
||||||
|
///
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct TokenServiceClient<T> {
|
||||||
|
inner: tonic::client::Grpc<T>,
|
||||||
|
}
|
||||||
|
impl TokenServiceClient<tonic::transport::Channel> {
|
||||||
|
/// Attempt to create a new client by connecting to a given endpoint.
|
||||||
|
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
|
||||||
|
where
|
||||||
|
D: TryInto<tonic::transport::Endpoint>,
|
||||||
|
D::Error: Into<StdError>,
|
||||||
|
{
|
||||||
|
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
|
||||||
|
Ok(Self::new(conn))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T> TokenServiceClient<T>
|
||||||
|
where
|
||||||
|
T: tonic::client::GrpcService<tonic::body::BoxBody>,
|
||||||
|
T::Error: Into<StdError>,
|
||||||
|
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
|
||||||
|
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
|
||||||
|
{
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::new(inner);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_origin(inner: T, origin: Uri) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::with_origin(inner, origin);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> TokenServiceClient<InterceptedService<T, F>>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
T::ResponseBody: Default,
|
||||||
|
T: tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
Response = http::Response<
|
||||||
|
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
|
||||||
|
>,
|
||||||
|
>,
|
||||||
|
<T as tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
>>::Error: Into<StdError> + Send + Sync,
|
||||||
|
{
|
||||||
|
TokenServiceClient::new(InterceptedService::new(inner, interceptor))
|
||||||
|
}
|
||||||
|
/// Compress requests with the given encoding.
|
||||||
|
///
|
||||||
|
/// This requires the server to support it otherwise it might respond with an
|
||||||
|
/// error.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.send_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Enable decompressing responses.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.accept_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_decoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_encoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn authenticate(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::AuthenticateRequest>,
|
||||||
|
) -> std::result::Result<
|
||||||
|
tonic::Response<super::AuthenticateResponse>,
|
||||||
|
tonic::Status,
|
||||||
|
> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/tokens.v1.TokenService/Authenticate",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("tokens.v1.TokenService", "Authenticate"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn list(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::ListRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/tokens.v1.TokenService/List",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("tokens.v1.TokenService", "List"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn create(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::CreateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::CreateResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/tokens.v1.TokenService/Create",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("tokens.v1.TokenService", "Create"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn delete(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::DeleteRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/tokens.v1.TokenService/Delete",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("tokens.v1.TokenService", "Delete"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// Generated server implementations.
|
||||||
|
pub mod token_service_server {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
/// Generated trait containing gRPC methods that should be implemented for use with TokenServiceServer.
|
||||||
|
#[async_trait]
|
||||||
|
pub trait TokenService: Send + Sync + 'static {
|
||||||
|
///
|
||||||
|
async fn authenticate(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::AuthenticateRequest>,
|
||||||
|
) -> std::result::Result<
|
||||||
|
tonic::Response<super::AuthenticateResponse>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
///
|
||||||
|
async fn list(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::ListRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn create(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::CreateRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::CreateResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn delete(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::DeleteRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status>;
|
||||||
|
}
|
||||||
|
///
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct TokenServiceServer<T: TokenService> {
|
||||||
|
inner: _Inner<T>,
|
||||||
|
accept_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
send_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
max_decoding_message_size: Option<usize>,
|
||||||
|
max_encoding_message_size: Option<usize>,
|
||||||
|
}
|
||||||
|
struct _Inner<T>(Arc<T>);
|
||||||
|
impl<T: TokenService> TokenServiceServer<T> {
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
Self::from_arc(Arc::new(inner))
|
||||||
|
}
|
||||||
|
pub fn from_arc(inner: Arc<T>) -> Self {
|
||||||
|
let inner = _Inner(inner);
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: Default::default(),
|
||||||
|
send_compression_encodings: Default::default(),
|
||||||
|
max_decoding_message_size: None,
|
||||||
|
max_encoding_message_size: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> InterceptedService<Self, F>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
{
|
||||||
|
InterceptedService::new(Self::new(inner), interceptor)
|
||||||
|
}
|
||||||
|
/// Enable decompressing requests with the given encoding.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.accept_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Compress responses with the given encoding, if the client supports it.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.send_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_decoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_encoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T, B> tonic::codegen::Service<http::Request<B>> for TokenServiceServer<T>
|
||||||
|
where
|
||||||
|
T: TokenService,
|
||||||
|
B: Body + Send + 'static,
|
||||||
|
B::Error: Into<StdError> + Send + 'static,
|
||||||
|
{
|
||||||
|
type Response = http::Response<tonic::body::BoxBody>;
|
||||||
|
type Error = std::convert::Infallible;
|
||||||
|
type Future = BoxFuture<Self::Response, Self::Error>;
|
||||||
|
fn poll_ready(
|
||||||
|
&mut self,
|
||||||
|
_cx: &mut Context<'_>,
|
||||||
|
) -> Poll<std::result::Result<(), Self::Error>> {
|
||||||
|
Poll::Ready(Ok(()))
|
||||||
|
}
|
||||||
|
fn call(&mut self, req: http::Request<B>) -> Self::Future {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
match req.uri().path() {
|
||||||
|
"/tokens.v1.TokenService/Authenticate" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct AuthenticateSvc<T: TokenService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: TokenService,
|
||||||
|
> tonic::server::UnaryService<super::AuthenticateRequest>
|
||||||
|
for AuthenticateSvc<T> {
|
||||||
|
type Response = super::AuthenticateResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::AuthenticateRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move {
|
||||||
|
(*inner).authenticate(request).await
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = AuthenticateSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/tokens.v1.TokenService/List" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct ListSvc<T: TokenService>(pub Arc<T>);
|
||||||
|
impl<T: TokenService> tonic::server::UnaryService<super::ListRequest>
|
||||||
|
for ListSvc<T> {
|
||||||
|
type Response = super::ListResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::ListRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).list(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = ListSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/tokens.v1.TokenService/Create" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct CreateSvc<T: TokenService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: TokenService,
|
||||||
|
> tonic::server::UnaryService<super::CreateRequest>
|
||||||
|
for CreateSvc<T> {
|
||||||
|
type Response = super::CreateResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::CreateRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).create(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = CreateSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/tokens.v1.TokenService/Delete" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct DeleteSvc<T: TokenService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: TokenService,
|
||||||
|
> tonic::server::UnaryService<super::DeleteRequest>
|
||||||
|
for DeleteSvc<T> {
|
||||||
|
type Response = super::DeleteResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::DeleteRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).delete(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = DeleteSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
Box::pin(async move {
|
||||||
|
Ok(
|
||||||
|
http::Response::builder()
|
||||||
|
.status(200)
|
||||||
|
.header("grpc-status", "12")
|
||||||
|
.header("content-type", "application/grpc")
|
||||||
|
.body(empty_body())
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: TokenService> Clone for TokenServiceServer<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: self.accept_compression_encodings,
|
||||||
|
send_compression_encodings: self.send_compression_encodings,
|
||||||
|
max_decoding_message_size: self.max_decoding_message_size,
|
||||||
|
max_encoding_message_size: self.max_encoding_message_size,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: TokenService> Clone for _Inner<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
Self(Arc::clone(&self.0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(f, "{:?}", self.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: TokenService> tonic::server::NamedService for TokenServiceServer<T> {
|
||||||
|
const NAME: &'static str = "tokens.v1.TokenService";
|
||||||
|
}
|
||||||
|
}
|
101
src/gen/users.v1.rs
Normal file
101
src/gen/users.v1.rs
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct SignupRequest {
|
||||||
|
#[prost(string, tag="1")]
|
||||||
|
pub email: ::prost::alloc::string::String,
|
||||||
|
#[prost(string, tag="2")]
|
||||||
|
pub password: ::prost::alloc::string::String,
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct SignupResponse {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CurrentRequest {
|
||||||
|
}
|
||||||
|
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
|
pub struct CurrentResponse {
|
||||||
|
}
|
||||||
|
/// Encoded file descriptor set for the `users.v1` package
|
||||||
|
pub const FILE_DESCRIPTOR_SET: &[u8] = &[
|
||||||
|
0x0a, 0xea, 0x08, 0x0a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65,
|
||||||
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x75, 0x73, 0x65,
|
||||||
|
0x72, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,
|
||||||
|
0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71,
|
||||||
|
0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20,
|
||||||
|
0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
|
||||||
|
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61,
|
||||||
|
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70,
|
||||||
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x75, 0x72, 0x72,
|
||||||
|
0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x43, 0x75,
|
||||||
|
0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbb, 0x01,
|
||||||
|
0x0a, 0x0b, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x51, 0x0a,
|
||||||
|
0x06, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x17, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e,
|
||||||
|
0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x1a, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x69, 0x67, 0x6e,
|
||||||
|
0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93,
|
||||||
|
0x02, 0x0e, 0x3a, 0x01, 0x2a, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73,
|
||||||
|
0x12, 0x59, 0x0a, 0x07, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x2e, 0x75, 0x73,
|
||||||
|
0x65, 0x72, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2e, 0x76, 0x31,
|
||||||
|
0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
|
0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73,
|
||||||
|
0x65, 0x72, 0x73, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4a, 0xe7, 0x05, 0x0a, 0x06,
|
||||||
|
0x12, 0x04, 0x0a, 0x00, 0x28, 0x01, 0x0a, 0xb0, 0x02, 0x0a, 0x01, 0x0c, 0x12, 0x03, 0x0a, 0x00,
|
||||||
|
0x12, 0x32, 0x48, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x43,
|
||||||
|
0x29, 0x20, 0x32, 0x30, 0x32, 0x33, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e,
|
||||||
|
0x73, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x0a, 0x20, 0x53, 0x50,
|
||||||
|
0x44, 0x58, 0x2d, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2d, 0x49, 0x64, 0x65, 0x6e, 0x74,
|
||||||
|
0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x20, 0x4d, 0x49, 0x54, 0x0a, 0x32, 0xdb, 0x01, 0x0a, 0x20,
|
||||||
|
0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70,
|
||||||
|
0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6d,
|
||||||
|
0x6d, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64,
|
||||||
|
0x65, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x20, 0x64,
|
||||||
|
0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x20, 0x47, 0x6f, 0x6f,
|
||||||
|
0x67, 0x6c, 0x65, 0x20, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20,
|
||||||
|
0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
|
||||||
|
0x76, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
|
||||||
|
0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x2d, 0x20,
|
||||||
|
0x53, 0x65, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72,
|
||||||
|
0x65, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64,
|
||||||
|
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x73,
|
||||||
|
0x2f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x70,
|
||||||
|
0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x0a, 0x0a, 0x0a, 0x08, 0x0a, 0x01, 0x02, 0x12, 0x03,
|
||||||
|
0x0c, 0x00, 0x11, 0x0a, 0x09, 0x0a, 0x02, 0x03, 0x00, 0x12, 0x03, 0x0e, 0x00, 0x26, 0x0a, 0x0a,
|
||||||
|
0x0a, 0x02, 0x04, 0x00, 0x12, 0x04, 0x10, 0x00, 0x13, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x00,
|
||||||
|
0x01, 0x12, 0x03, 0x10, 0x08, 0x15, 0x0a, 0x0b, 0x0a, 0x04, 0x04, 0x00, 0x02, 0x00, 0x12, 0x03,
|
||||||
|
0x11, 0x02, 0x13, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x05, 0x12, 0x03, 0x11, 0x02,
|
||||||
|
0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x11, 0x09, 0x0e, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x11, 0x11, 0x12, 0x0a, 0x0b, 0x0a,
|
||||||
|
0x04, 0x04, 0x00, 0x02, 0x01, 0x12, 0x03, 0x12, 0x02, 0x16, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00,
|
||||||
|
0x02, 0x01, 0x05, 0x12, 0x03, 0x12, 0x02, 0x08, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01,
|
||||||
|
0x01, 0x12, 0x03, 0x12, 0x09, 0x11, 0x0a, 0x0c, 0x0a, 0x05, 0x04, 0x00, 0x02, 0x01, 0x03, 0x12,
|
||||||
|
0x03, 0x12, 0x14, 0x15, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x01, 0x12, 0x03, 0x15, 0x00, 0x19, 0x0a,
|
||||||
|
0x0a, 0x0a, 0x03, 0x04, 0x01, 0x01, 0x12, 0x03, 0x15, 0x08, 0x16, 0x0a, 0x09, 0x0a, 0x02, 0x04,
|
||||||
|
0x02, 0x12, 0x03, 0x17, 0x00, 0x19, 0x0a, 0x0a, 0x0a, 0x03, 0x04, 0x02, 0x01, 0x12, 0x03, 0x17,
|
||||||
|
0x08, 0x16, 0x0a, 0x09, 0x0a, 0x02, 0x04, 0x03, 0x12, 0x03, 0x19, 0x00, 0x1a, 0x0a, 0x0a, 0x0a,
|
||||||
|
0x03, 0x04, 0x03, 0x01, 0x12, 0x03, 0x19, 0x08, 0x17, 0x0a, 0x0a, 0x0a, 0x02, 0x06, 0x00, 0x12,
|
||||||
|
0x04, 0x1b, 0x00, 0x28, 0x01, 0x0a, 0x0a, 0x0a, 0x03, 0x06, 0x00, 0x01, 0x12, 0x03, 0x1b, 0x08,
|
||||||
|
0x13, 0x0a, 0x0c, 0x0a, 0x04, 0x06, 0x00, 0x02, 0x00, 0x12, 0x04, 0x1c, 0x02, 0x21, 0x03, 0x0a,
|
||||||
|
0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x00, 0x01, 0x12, 0x03, 0x1c, 0x06, 0x0c, 0x0a, 0x0c, 0x0a,
|
||||||
|
0x05, 0x06, 0x00, 0x02, 0x00, 0x02, 0x12, 0x03, 0x1c, 0x0d, 0x1a, 0x0a, 0x0c, 0x0a, 0x05, 0x06,
|
||||||
|
0x00, 0x02, 0x00, 0x03, 0x12, 0x03, 0x1c, 0x25, 0x33, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02,
|
||||||
|
0x00, 0x04, 0x12, 0x04, 0x1d, 0x04, 0x20, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x00,
|
||||||
|
0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12, 0x04, 0x1d, 0x04, 0x20, 0x06, 0x0a, 0x0c, 0x0a, 0x04, 0x06,
|
||||||
|
0x00, 0x02, 0x01, 0x12, 0x04, 0x23, 0x02, 0x27, 0x03, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02,
|
||||||
|
0x01, 0x01, 0x12, 0x03, 0x23, 0x06, 0x0d, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x02,
|
||||||
|
0x12, 0x03, 0x23, 0x0e, 0x1c, 0x0a, 0x0c, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x03, 0x12, 0x03,
|
||||||
|
0x23, 0x27, 0x36, 0x0a, 0x0d, 0x0a, 0x05, 0x06, 0x00, 0x02, 0x01, 0x04, 0x12, 0x04, 0x24, 0x04,
|
||||||
|
0x26, 0x06, 0x0a, 0x11, 0x0a, 0x09, 0x06, 0x00, 0x02, 0x01, 0x04, 0xb0, 0xca, 0xbc, 0x22, 0x12,
|
||||||
|
0x04, 0x24, 0x04, 0x26, 0x06, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
];
|
||||||
|
include!("users.v1.serde.rs");
|
||||||
|
include!("users.v1.tonic.rs");
|
||||||
|
// @@protoc_insertion_point(module)
|
325
src/gen/users.v1.serde.rs
Normal file
325
src/gen/users.v1.serde.rs
Normal file
@ -0,0 +1,325 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
impl serde::Serialize for CurrentRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("users.v1.CurrentRequest", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for CurrentRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = CurrentRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct users.v1.CurrentRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<CurrentRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(CurrentRequest {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("users.v1.CurrentRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for CurrentResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("users.v1.CurrentResponse", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for CurrentResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = CurrentResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct users.v1.CurrentResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<CurrentResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(CurrentResponse {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("users.v1.CurrentResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for SignupRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let mut len = 0;
|
||||||
|
if !self.email.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
if !self.password.is_empty() {
|
||||||
|
len += 1;
|
||||||
|
}
|
||||||
|
let mut struct_ser = serializer.serialize_struct("users.v1.SignupRequest", len)?;
|
||||||
|
if !self.email.is_empty() {
|
||||||
|
struct_ser.serialize_field("email", &self.email)?;
|
||||||
|
}
|
||||||
|
if !self.password.is_empty() {
|
||||||
|
struct_ser.serialize_field("password", &self.password)?;
|
||||||
|
}
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for SignupRequest {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
"email",
|
||||||
|
"password",
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
Email,
|
||||||
|
Password,
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
match value {
|
||||||
|
"email" => Ok(GeneratedField::Email),
|
||||||
|
"password" => Ok(GeneratedField::Password),
|
||||||
|
_ => Err(serde::de::Error::unknown_field(value, FIELDS)),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = SignupRequest;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct users.v1.SignupRequest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<SignupRequest, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
let mut email__ = None;
|
||||||
|
let mut password__ = None;
|
||||||
|
while let Some(k) = map.next_key()? {
|
||||||
|
match k {
|
||||||
|
GeneratedField::Email => {
|
||||||
|
if email__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("email"));
|
||||||
|
}
|
||||||
|
email__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
GeneratedField::Password => {
|
||||||
|
if password__.is_some() {
|
||||||
|
return Err(serde::de::Error::duplicate_field("password"));
|
||||||
|
}
|
||||||
|
password__ = Some(map.next_value()?);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(SignupRequest {
|
||||||
|
email: email__.unwrap_or_default(),
|
||||||
|
password: password__.unwrap_or_default(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("users.v1.SignupRequest", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl serde::Serialize for SignupResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
|
||||||
|
where
|
||||||
|
S: serde::Serializer,
|
||||||
|
{
|
||||||
|
use serde::ser::SerializeStruct;
|
||||||
|
let len = 0;
|
||||||
|
let struct_ser = serializer.serialize_struct("users.v1.SignupResponse", len)?;
|
||||||
|
struct_ser.end()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for SignupResponse {
|
||||||
|
#[allow(deprecated)]
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
const FIELDS: &[&str] = &[
|
||||||
|
];
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
|
enum GeneratedField {
|
||||||
|
}
|
||||||
|
impl<'de> serde::Deserialize<'de> for GeneratedField {
|
||||||
|
fn deserialize<D>(deserializer: D) -> std::result::Result<GeneratedField, D::Error>
|
||||||
|
where
|
||||||
|
D: serde::Deserializer<'de>,
|
||||||
|
{
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = GeneratedField;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(formatter, "expected one of: {:?}", &FIELDS)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
fn visit_str<E>(self, value: &str) -> std::result::Result<GeneratedField, E>
|
||||||
|
where
|
||||||
|
E: serde::de::Error,
|
||||||
|
{
|
||||||
|
Err(serde::de::Error::unknown_field(value, FIELDS))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_identifier(GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
struct GeneratedVisitor;
|
||||||
|
impl<'de> serde::de::Visitor<'de> for GeneratedVisitor {
|
||||||
|
type Value = SignupResponse;
|
||||||
|
|
||||||
|
fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
formatter.write_str("struct users.v1.SignupResponse")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn visit_map<V>(self, mut map: V) -> std::result::Result<SignupResponse, V::Error>
|
||||||
|
where
|
||||||
|
V: serde::de::MapAccess<'de>,
|
||||||
|
{
|
||||||
|
while map.next_key::<GeneratedField>()?.is_some() {
|
||||||
|
let _ = map.next_value::<serde::de::IgnoredAny>()?;
|
||||||
|
}
|
||||||
|
Ok(SignupResponse {
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deserializer.deserialize_struct("users.v1.SignupResponse", FIELDS, GeneratedVisitor)
|
||||||
|
}
|
||||||
|
}
|
368
src/gen/users.v1.tonic.rs
Normal file
368
src/gen/users.v1.tonic.rs
Normal file
@ -0,0 +1,368 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
// @generated
|
||||||
|
/// Generated client implementations.
|
||||||
|
pub mod user_service_client {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
use tonic::codegen::http::Uri;
|
||||||
|
///
|
||||||
|
#[derive(Debug, Clone)]
|
||||||
|
pub struct UserServiceClient<T> {
|
||||||
|
inner: tonic::client::Grpc<T>,
|
||||||
|
}
|
||||||
|
impl UserServiceClient<tonic::transport::Channel> {
|
||||||
|
/// Attempt to create a new client by connecting to a given endpoint.
|
||||||
|
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
|
||||||
|
where
|
||||||
|
D: TryInto<tonic::transport::Endpoint>,
|
||||||
|
D::Error: Into<StdError>,
|
||||||
|
{
|
||||||
|
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
|
||||||
|
Ok(Self::new(conn))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T> UserServiceClient<T>
|
||||||
|
where
|
||||||
|
T: tonic::client::GrpcService<tonic::body::BoxBody>,
|
||||||
|
T::Error: Into<StdError>,
|
||||||
|
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
|
||||||
|
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
|
||||||
|
{
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::new(inner);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_origin(inner: T, origin: Uri) -> Self {
|
||||||
|
let inner = tonic::client::Grpc::with_origin(inner, origin);
|
||||||
|
Self { inner }
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> UserServiceClient<InterceptedService<T, F>>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
T::ResponseBody: Default,
|
||||||
|
T: tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
Response = http::Response<
|
||||||
|
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
|
||||||
|
>,
|
||||||
|
>,
|
||||||
|
<T as tonic::codegen::Service<
|
||||||
|
http::Request<tonic::body::BoxBody>,
|
||||||
|
>>::Error: Into<StdError> + Send + Sync,
|
||||||
|
{
|
||||||
|
UserServiceClient::new(InterceptedService::new(inner, interceptor))
|
||||||
|
}
|
||||||
|
/// Compress requests with the given encoding.
|
||||||
|
///
|
||||||
|
/// This requires the server to support it otherwise it might respond with an
|
||||||
|
/// error.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.send_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Enable decompressing responses.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.inner = self.inner.accept_compressed(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_decoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.inner = self.inner.max_encoding_message_size(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn signup(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::SignupRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::SignupResponse>, tonic::Status> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/users.v1.UserService/Signup",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("users.v1.UserService", "Signup"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
///
|
||||||
|
pub async fn current(
|
||||||
|
&mut self,
|
||||||
|
request: impl tonic::IntoRequest<super::CurrentRequest>,
|
||||||
|
) -> std::result::Result<
|
||||||
|
tonic::Response<super::CurrentResponse>,
|
||||||
|
tonic::Status,
|
||||||
|
> {
|
||||||
|
self.inner
|
||||||
|
.ready()
|
||||||
|
.await
|
||||||
|
.map_err(|e| {
|
||||||
|
tonic::Status::new(
|
||||||
|
tonic::Code::Unknown,
|
||||||
|
format!("Service was not ready: {}", e.into()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let path = http::uri::PathAndQuery::from_static(
|
||||||
|
"/users.v1.UserService/Current",
|
||||||
|
);
|
||||||
|
let mut req = request.into_request();
|
||||||
|
req.extensions_mut()
|
||||||
|
.insert(GrpcMethod::new("users.v1.UserService", "Current"));
|
||||||
|
self.inner.unary(req, path, codec).await
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// Generated server implementations.
|
||||||
|
pub mod user_service_server {
|
||||||
|
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||||
|
use tonic::codegen::*;
|
||||||
|
/// Generated trait containing gRPC methods that should be implemented for use with UserServiceServer.
|
||||||
|
#[async_trait]
|
||||||
|
pub trait UserService: Send + Sync + 'static {
|
||||||
|
///
|
||||||
|
async fn signup(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::SignupRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::SignupResponse>, tonic::Status>;
|
||||||
|
///
|
||||||
|
async fn current(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<super::CurrentRequest>,
|
||||||
|
) -> std::result::Result<tonic::Response<super::CurrentResponse>, tonic::Status>;
|
||||||
|
}
|
||||||
|
///
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct UserServiceServer<T: UserService> {
|
||||||
|
inner: _Inner<T>,
|
||||||
|
accept_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
send_compression_encodings: EnabledCompressionEncodings,
|
||||||
|
max_decoding_message_size: Option<usize>,
|
||||||
|
max_encoding_message_size: Option<usize>,
|
||||||
|
}
|
||||||
|
struct _Inner<T>(Arc<T>);
|
||||||
|
impl<T: UserService> UserServiceServer<T> {
|
||||||
|
pub fn new(inner: T) -> Self {
|
||||||
|
Self::from_arc(Arc::new(inner))
|
||||||
|
}
|
||||||
|
pub fn from_arc(inner: Arc<T>) -> Self {
|
||||||
|
let inner = _Inner(inner);
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: Default::default(),
|
||||||
|
send_compression_encodings: Default::default(),
|
||||||
|
max_decoding_message_size: None,
|
||||||
|
max_encoding_message_size: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pub fn with_interceptor<F>(
|
||||||
|
inner: T,
|
||||||
|
interceptor: F,
|
||||||
|
) -> InterceptedService<Self, F>
|
||||||
|
where
|
||||||
|
F: tonic::service::Interceptor,
|
||||||
|
{
|
||||||
|
InterceptedService::new(Self::new(inner), interceptor)
|
||||||
|
}
|
||||||
|
/// Enable decompressing requests with the given encoding.
|
||||||
|
#[must_use]
|
||||||
|
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.accept_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Compress responses with the given encoding, if the client supports it.
|
||||||
|
#[must_use]
|
||||||
|
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
|
||||||
|
self.send_compression_encodings.enable(encoding);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of a decoded message.
|
||||||
|
///
|
||||||
|
/// Default: `4MB`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_decoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
/// Limits the maximum size of an encoded message.
|
||||||
|
///
|
||||||
|
/// Default: `usize::MAX`
|
||||||
|
#[must_use]
|
||||||
|
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
|
||||||
|
self.max_encoding_message_size = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T, B> tonic::codegen::Service<http::Request<B>> for UserServiceServer<T>
|
||||||
|
where
|
||||||
|
T: UserService,
|
||||||
|
B: Body + Send + 'static,
|
||||||
|
B::Error: Into<StdError> + Send + 'static,
|
||||||
|
{
|
||||||
|
type Response = http::Response<tonic::body::BoxBody>;
|
||||||
|
type Error = std::convert::Infallible;
|
||||||
|
type Future = BoxFuture<Self::Response, Self::Error>;
|
||||||
|
fn poll_ready(
|
||||||
|
&mut self,
|
||||||
|
_cx: &mut Context<'_>,
|
||||||
|
) -> Poll<std::result::Result<(), Self::Error>> {
|
||||||
|
Poll::Ready(Ok(()))
|
||||||
|
}
|
||||||
|
fn call(&mut self, req: http::Request<B>) -> Self::Future {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
match req.uri().path() {
|
||||||
|
"/users.v1.UserService/Signup" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct SignupSvc<T: UserService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: UserService,
|
||||||
|
> tonic::server::UnaryService<super::SignupRequest>
|
||||||
|
for SignupSvc<T> {
|
||||||
|
type Response = super::SignupResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::SignupRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).signup(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = SignupSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
"/users.v1.UserService/Current" => {
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
struct CurrentSvc<T: UserService>(pub Arc<T>);
|
||||||
|
impl<
|
||||||
|
T: UserService,
|
||||||
|
> tonic::server::UnaryService<super::CurrentRequest>
|
||||||
|
for CurrentSvc<T> {
|
||||||
|
type Response = super::CurrentResponse;
|
||||||
|
type Future = BoxFuture<
|
||||||
|
tonic::Response<Self::Response>,
|
||||||
|
tonic::Status,
|
||||||
|
>;
|
||||||
|
fn call(
|
||||||
|
&mut self,
|
||||||
|
request: tonic::Request<super::CurrentRequest>,
|
||||||
|
) -> Self::Future {
|
||||||
|
let inner = Arc::clone(&self.0);
|
||||||
|
let fut = async move { (*inner).current(request).await };
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let accept_compression_encodings = self.accept_compression_encodings;
|
||||||
|
let send_compression_encodings = self.send_compression_encodings;
|
||||||
|
let max_decoding_message_size = self.max_decoding_message_size;
|
||||||
|
let max_encoding_message_size = self.max_encoding_message_size;
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
let fut = async move {
|
||||||
|
let inner = inner.0;
|
||||||
|
let method = CurrentSvc(inner);
|
||||||
|
let codec = tonic::codec::ProstCodec::default();
|
||||||
|
let mut grpc = tonic::server::Grpc::new(codec)
|
||||||
|
.apply_compression_config(
|
||||||
|
accept_compression_encodings,
|
||||||
|
send_compression_encodings,
|
||||||
|
)
|
||||||
|
.apply_max_message_size_config(
|
||||||
|
max_decoding_message_size,
|
||||||
|
max_encoding_message_size,
|
||||||
|
);
|
||||||
|
let res = grpc.unary(method, req).await;
|
||||||
|
Ok(res)
|
||||||
|
};
|
||||||
|
Box::pin(fut)
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
Box::pin(async move {
|
||||||
|
Ok(
|
||||||
|
http::Response::builder()
|
||||||
|
.status(200)
|
||||||
|
.header("grpc-status", "12")
|
||||||
|
.header("content-type", "application/grpc")
|
||||||
|
.body(empty_body())
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: UserService> Clone for UserServiceServer<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
let inner = self.inner.clone();
|
||||||
|
Self {
|
||||||
|
inner,
|
||||||
|
accept_compression_encodings: self.accept_compression_encodings,
|
||||||
|
send_compression_encodings: self.send_compression_encodings,
|
||||||
|
max_decoding_message_size: self.max_decoding_message_size,
|
||||||
|
max_encoding_message_size: self.max_encoding_message_size,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: UserService> Clone for _Inner<T> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
Self(Arc::clone(&self.0))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(f, "{:?}", self.0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<T: UserService> tonic::server::NamedService for UserServiceServer<T> {
|
||||||
|
const NAME: &'static str = "users.v1.UserService";
|
||||||
|
}
|
||||||
|
}
|
102
src/lib.rs
Normal file
102
src/lib.rs
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
// Copyright (C) 2024 The Licensing Authors
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
pub mod contributors {
|
||||||
|
pub mod v1 {
|
||||||
|
include!("gen/contributors.v1.rs");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub mod licenses {
|
||||||
|
pub mod v1 {
|
||||||
|
include!("gen/licenses.v1.rs");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub mod packages {
|
||||||
|
pub mod v1 {
|
||||||
|
include!("gen/packages.v1.rs");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub mod products {
|
||||||
|
pub mod v1 {
|
||||||
|
include!("gen/products.v1.rs");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub mod tokens {
|
||||||
|
pub mod v1 {
|
||||||
|
include!("gen/tokens.v1.rs");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub mod users {
|
||||||
|
pub mod v1 {
|
||||||
|
include!("gen/users.v1.rs");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
use tonic::codegen::StdError;
|
||||||
|
use contributors::v1::contributor_service_client::ContributorServiceClient;
|
||||||
|
use licenses::v1::license_service_client::LicenseServiceClient;
|
||||||
|
use packages::v1::package_service_client::PackageServiceClient;
|
||||||
|
use products::v1::product_service_client::ProductServiceClient;
|
||||||
|
use tokens::v1::token_service_client::TokenServiceClient;
|
||||||
|
use users::v1::user_service_client::UserServiceClient;
|
||||||
|
|
||||||
|
pub async fn new_client<D>(dst: D) -> Result<Client, Error>
|
||||||
|
where
|
||||||
|
D: TryInto<tonic::transport::Endpoint>,
|
||||||
|
D::Error: Into<StdError>,
|
||||||
|
{
|
||||||
|
let d = dst.borrow();
|
||||||
|
|
||||||
|
return Ok(Client{
|
||||||
|
contributors: ContributorServiceClient::connect(d.clone()).await.unwrap(),
|
||||||
|
licenses: LicenseServiceClient::connect(d.clone()).await.unwrap(),
|
||||||
|
packages: PackageServiceClient::connect(d.clone()).await.unwrap(),
|
||||||
|
products: ProductServiceClient::connect(d.clone()).await.unwrap(),
|
||||||
|
tokens: TokenServiceClient::connect(d.clone()).await.unwrap(),
|
||||||
|
users: UserServiceClient::connect(d.clone()).await.unwrap(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub enum Error {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct Client {
|
||||||
|
contributors: ContributorServiceClient<tonic::transport::Channel>,
|
||||||
|
licenses: LicenseServiceClient<tonic::transport::Channel>,
|
||||||
|
packages: PackageServiceClient<tonic::transport::Channel>,
|
||||||
|
products: ProductServiceClient<tonic::transport::Channel>,
|
||||||
|
tokens: TokenServiceClient<tonic::transport::Channel>,
|
||||||
|
users: UserServiceClient<tonic::transport::Channel>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Client {
|
||||||
|
pub fn contributors(self) -> ContributorServiceClient<tonic::transport::Channel> {
|
||||||
|
return self.contributors
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn licenses(self) -> LicenseServiceClient<tonic::transport::Channel> {
|
||||||
|
return self.licenses
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn packages(self) -> PackageServiceClient<tonic::transport::Channel> {
|
||||||
|
return self.packages
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn products(self) -> ProductServiceClient<tonic::transport::Channel> {
|
||||||
|
return self.products
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn tokens(self) -> TokenServiceClient<tonic::transport::Channel> {
|
||||||
|
return self.tokens
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn users(self) -> UserServiceClient<tonic::transport::Channel> {
|
||||||
|
return self.users
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user