#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkloadReference {
#[prost(message, optional, tag = "1")]
pub reference: ::core::option::Option<::prost_types::Any>,
}
impl ::prost::Name for WorkloadReference {
const NAME: &'static str = "WorkloadReference";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.WorkloadReference".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.WorkloadReference".into()
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkloadPidReference {
#[prost(int32, tag = "1")]
pub pid: i32,
}
impl ::prost::Name for WorkloadPidReference {
const NAME: &'static str = "WorkloadPIDReference";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.WorkloadPIDReference".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.WorkloadPIDReference".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct KubernetesObjectType {
#[prost(string, tag = "1")]
pub plural: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub group: ::prost::alloc::string::String,
}
impl ::prost::Name for KubernetesObjectType {
const NAME: &'static str = "KubernetesObjectType";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.KubernetesObjectType".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.KubernetesObjectType".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct KubernetesObjectKey {
#[prost(string, tag = "1")]
pub namespace: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
impl ::prost::Name for KubernetesObjectKey {
const NAME: &'static str = "KubernetesObjectKey";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.KubernetesObjectKey".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.KubernetesObjectKey".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct KubernetesObjectReference {
#[prost(message, optional, tag = "1")]
pub r#type: ::core::option::Option<KubernetesObjectType>,
#[prost(message, optional, tag = "2")]
pub key: ::core::option::Option<KubernetesObjectKey>,
#[prost(string, tag = "3")]
pub uid: ::prost::alloc::string::String,
}
impl ::prost::Name for KubernetesObjectReference {
const NAME: &'static str = "KubernetesObjectReference";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.KubernetesObjectReference".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.KubernetesObjectReference".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeToX509svidRequest {
#[prost(message, optional, tag = "1")]
pub reference: ::core::option::Option<WorkloadReference>,
}
impl ::prost::Name for SubscribeToX509svidRequest {
const NAME: &'static str = "SubscribeToX509SVIDRequest";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.SubscribeToX509SVIDRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.SubscribeToX509SVIDRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeToX509svidResponse {
#[prost(message, repeated, tag = "1")]
pub svids: ::prost::alloc::vec::Vec<X509svid>,
#[prost(bytes = "bytes", repeated, tag = "2")]
pub crl: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
#[prost(map = "string, bytes", tag = "3")]
pub federated_bundles:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::bytes::Bytes>,
}
impl ::prost::Name for SubscribeToX509svidResponse {
const NAME: &'static str = "SubscribeToX509SVIDResponse";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.SubscribeToX509SVIDResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.SubscribeToX509SVIDResponse".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
#[prost(skip_debug)]
pub struct X509svid {
#[prost(string, tag = "1")]
pub spiffe_id: ::prost::alloc::string::String,
#[prost(bytes = "bytes", tag = "2")]
pub x509_svid: ::prost::bytes::Bytes,
#[prost(bytes = "bytes", tag = "3")]
pub x509_svid_key: ::prost::bytes::Bytes,
#[prost(bytes = "bytes", tag = "4")]
pub bundle: ::prost::bytes::Bytes,
#[prost(string, tag = "5")]
pub hint: ::prost::alloc::string::String,
}
impl ::prost::Name for X509svid {
const NAME: &'static str = "X509SVID";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.X509SVID".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.X509SVID".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeToX509BundlesRequest {
#[prost(message, optional, tag = "1")]
pub reference: ::core::option::Option<WorkloadReference>,
}
impl ::prost::Name for SubscribeToX509BundlesRequest {
const NAME: &'static str = "SubscribeToX509BundlesRequest";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.SubscribeToX509BundlesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.SubscribeToX509BundlesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeToX509BundlesResponse {
#[prost(bytes = "bytes", repeated, tag = "1")]
pub crl: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>,
#[prost(map = "string, bytes", tag = "2")]
pub bundles: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::bytes::Bytes>,
}
impl ::prost::Name for SubscribeToX509BundlesResponse {
const NAME: &'static str = "SubscribeToX509BundlesResponse";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.SubscribeToX509BundlesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.SubscribeToX509BundlesResponse".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FetchJwtsvidRequest {
#[prost(message, optional, tag = "1")]
pub reference: ::core::option::Option<WorkloadReference>,
#[prost(string, repeated, tag = "2")]
pub audience: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub spiffe_id: ::prost::alloc::string::String,
}
impl ::prost::Name for FetchJwtsvidRequest {
const NAME: &'static str = "FetchJWTSVIDRequest";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.FetchJWTSVIDRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.FetchJWTSVIDRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchJwtsvidResponse {
#[prost(message, repeated, tag = "1")]
pub svids: ::prost::alloc::vec::Vec<Jwtsvid>,
}
impl ::prost::Name for FetchJwtsvidResponse {
const NAME: &'static str = "FetchJWTSVIDResponse";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.FetchJWTSVIDResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.FetchJWTSVIDResponse".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
#[prost(skip_debug)]
pub struct Jwtsvid {
#[prost(string, tag = "1")]
pub spiffe_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub svid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub hint: ::prost::alloc::string::String,
}
impl ::prost::Name for Jwtsvid {
const NAME: &'static str = "JWTSVID";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.JWTSVID".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.JWTSVID".into()
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeToJwtBundlesRequest {
#[prost(message, optional, tag = "1")]
pub reference: ::core::option::Option<WorkloadReference>,
}
impl ::prost::Name for SubscribeToJwtBundlesRequest {
const NAME: &'static str = "SubscribeToJWTBundlesRequest";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.SubscribeToJWTBundlesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.SubscribeToJWTBundlesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubscribeToJwtBundlesResponse {
#[prost(map = "string, bytes", tag = "1")]
pub bundles: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::bytes::Bytes>,
}
impl ::prost::Name for SubscribeToJwtBundlesResponse {
const NAME: &'static str = "SubscribeToJWTBundlesResponse";
const PACKAGE: &'static str = "spiffe.broker";
fn full_name() -> ::prost::alloc::string::String {
"spiffe.broker.SubscribeToJWTBundlesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"type.googleapis.com/spiffe.broker.SubscribeToJWTBundlesResponse".into()
}
}
pub mod api_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct ApiClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ApiClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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) -> ApiClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::Body>>>::Error:
Into<StdError> + std::marker::Send + std::marker::Sync,
{
ApiClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[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 subscribe_to_x509svid(
&mut self,
request: impl tonic::IntoRequest<super::SubscribeToX509svidRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::SubscribeToX509svidResponse>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic_prost::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/spiffe.broker.API/SubscribeToX509SVID");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("spiffe.broker.API", "SubscribeToX509SVID"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn subscribe_to_x509_bundles(
&mut self,
request: impl tonic::IntoRequest<super::SubscribeToX509BundlesRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::SubscribeToX509BundlesResponse>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic_prost::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/spiffe.broker.API/SubscribeToX509Bundles");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"spiffe.broker.API",
"SubscribeToX509Bundles",
));
self.inner.server_streaming(req, path, codec).await
}
pub async fn fetch_jwtsvid(
&mut self,
request: impl tonic::IntoRequest<super::FetchJwtsvidRequest>,
) -> std::result::Result<tonic::Response<super::FetchJwtsvidResponse>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/spiffe.broker.API/FetchJWTSVID");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("spiffe.broker.API", "FetchJWTSVID"));
self.inner.unary(req, path, codec).await
}
pub async fn subscribe_to_jwt_bundles(
&mut self,
request: impl tonic::IntoRequest<super::SubscribeToJwtBundlesRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::SubscribeToJwtBundlesResponse>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
})?;
let codec = tonic_prost::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/spiffe.broker.API/SubscribeToJWTBundles");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"spiffe.broker.API",
"SubscribeToJWTBundles",
));
self.inner.server_streaming(req, path, codec).await
}
}
}