harmos-protocol 0.1.15

Harmos v1 plugin protobuf messages and gRPC client and server.
Documentation
// This file is @generated by prost-build.
/// Request for Certificates.Create.
#[allow(clippy::all)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CertificatesCreateRequest {}
/// Returns the newly persisted TLS certificate after live rotation and pairing revocation.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CertificatesCreateResponse {
    #[prost(string, tag = "1")]
    pub certificate_pem: ::prost::alloc::string::String,
}
/// Request for Listener.Get.
#[allow(clippy::all)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListenerGetRequest {}
/// Returns persisted listener configuration, its conditional revision and the actual attached socket address.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListenerGetResponse {
    #[prost(message, optional, tag = "1")]
    pub value: ::core::option::Option<ListenerValue>,
    /// Opaque conditional listener revision; use the exact bytes for Set rather than deriving or incrementing them.
    #[prost(bytes = "vec", tag = "2")]
    pub revision: ::prost::alloc::vec::Vec<u8>,
    /// Actual attached socket endpoint, which can differ from a configured port-zero address; empty when no listener is attached.
    #[prost(string, tag = "3")]
    pub bound_endpoint: ::prost::alloc::string::String,
}
/// Carries the replacement value and expected revision for Listener.Set.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListenerSetRequest {
    #[prost(message, optional, tag = "1")]
    pub value: ::core::option::Option<ListenerValue>,
    /// Exact revision returned by the corresponding read. A mismatch refuses; read again before retrying with changed input.
    #[prost(bytes = "vec", tag = "2")]
    pub expected_revision: ::prost::alloc::vec::Vec<u8>,
}
/// Returns applied listener configuration, its conditional revision and the actual attached socket address.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListenerSetResponse {
    #[prost(message, optional, tag = "1")]
    pub value: ::core::option::Option<ListenerValue>,
    /// Opaque conditional listener revision; use the exact bytes for Set rather than deriving or incrementing them.
    #[prost(bytes = "vec", tag = "2")]
    pub revision: ::prost::alloc::vec::Vec<u8>,
    /// Actual attached socket endpoint after applying the value; empty when no listener is attached.
    #[prost(string, tag = "3")]
    pub bound_endpoint: ::prost::alloc::string::String,
}
/// Configures TLS listener enablement, socket address and nonempty certificate subject names.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListenerValue {
    #[prost(bool, tag = "1")]
    pub enabled: bool,
    /// Socket address to bind; port zero permits the OS to choose a port.
    #[prost(string, tag = "2")]
    pub endpoint: ::prost::alloc::string::String,
    /// Nonempty certificate names; empty lists and empty entries refuse validation.
    #[prost(string, repeated, tag = "3")]
    pub certificate_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Carries the label for Pairings.Create.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PairingsCreateRequest {
    /// Nonempty client label bounded by the host's configured label_bytes capacity.
    #[prost(string, tag = "1")]
    pub label: ::prost::alloc::string::String,
}
/// Returns the persisted pairing, actual endpoint, certificate pin and one-time bearer secret.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PairingsCreateResponse {
    #[prost(message, optional, tag = "1")]
    pub pairing: ::core::option::Option<Pairing>,
    #[prost(string, tag = "2")]
    pub endpoint: ::prost::alloc::string::String,
    /// TLS certificate to pin when connecting with this pairing; certificate rotation invalidates existing pairings.
    #[prost(string, tag = "3")]
    pub pinned_certificate_pem: ::prost::alloc::string::String,
    /// Bearer secret returned on creation; the host persists only its SHA-256 digest. A new Create does not recover this secret.
    #[prost(string, tag = "4")]
    pub credential: ::prost::alloc::string::String,
}
/// Carries the read boundary for Pairings.List.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PairingsListRequest {
    /// Unset selects the current history boundary; otherwise resend an issued position for this owner. Foreign, expired and unissued positions refuse.
    #[prost(message, optional, tag = "2")]
    pub at: ::core::option::Option<crate::model::Position>,
}
/// Returns pairing metadata without bearer secrets and the issued current boundary.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairingsListResponse {
    #[prost(message, repeated, tag = "1")]
    pub pairings: ::prost::alloc::vec::Vec<Pairing>,
    /// Issued boundary actually selected for this response; retain and resend it unchanged to continue the same read.
    #[prost(message, optional, tag = "2")]
    pub resolved_at: ::core::option::Option<crate::model::Position>,
}
/// Carries the resource name for Pairings.Delete.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PairingsDeleteRequest {
    /// Pairing ID returned by Create/List; deleting an absent identity refuses.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Acknowledges persisted credential revocation.
#[allow(clippy::all)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PairingsDeleteResponse {}
/// Identifies a durable client pairing without disclosing its bearer credential.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Pairing {
    /// Owner-generated pairing identity used by Delete; the bearer credential is returned separately only at creation.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub label: ::prost::alloc::string::String,
}