Skip to main content

harmos_protocol/host/
access.rs

1// This file is @generated by prost-build.
2/// Request for Certificates.Create.
3#[allow(clippy::all)]
4#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5pub struct CertificatesCreateRequest {}
6/// Returns the newly persisted TLS certificate after live rotation and pairing revocation.
7#[allow(clippy::all)]
8#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9pub struct CertificatesCreateResponse {
10    #[prost(string, tag = "1")]
11    pub certificate_pem: ::prost::alloc::string::String,
12}
13/// Request for Listener.Get.
14#[allow(clippy::all)]
15#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
16pub struct ListenerGetRequest {}
17/// Returns persisted listener configuration, its conditional revision and the actual attached socket address.
18#[allow(clippy::all)]
19#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
20pub struct ListenerGetResponse {
21    #[prost(message, optional, tag = "1")]
22    pub value: ::core::option::Option<ListenerValue>,
23    /// Opaque conditional listener revision; use the exact bytes for Set rather than deriving or incrementing them.
24    #[prost(bytes = "vec", tag = "2")]
25    pub revision: ::prost::alloc::vec::Vec<u8>,
26    /// Actual attached socket endpoint, which can differ from a configured port-zero address; empty when no listener is attached.
27    #[prost(string, tag = "3")]
28    pub bound_endpoint: ::prost::alloc::string::String,
29}
30/// Carries the replacement value and expected revision for Listener.Set.
31#[allow(clippy::all)]
32#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
33pub struct ListenerSetRequest {
34    #[prost(message, optional, tag = "1")]
35    pub value: ::core::option::Option<ListenerValue>,
36    /// Exact revision returned by the corresponding read. A mismatch refuses; read again before retrying with changed input.
37    #[prost(bytes = "vec", tag = "2")]
38    pub expected_revision: ::prost::alloc::vec::Vec<u8>,
39}
40/// Returns applied listener configuration, its conditional revision and the actual attached socket address.
41#[allow(clippy::all)]
42#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
43pub struct ListenerSetResponse {
44    #[prost(message, optional, tag = "1")]
45    pub value: ::core::option::Option<ListenerValue>,
46    /// Opaque conditional listener revision; use the exact bytes for Set rather than deriving or incrementing them.
47    #[prost(bytes = "vec", tag = "2")]
48    pub revision: ::prost::alloc::vec::Vec<u8>,
49    /// Actual attached socket endpoint after applying the value; empty when no listener is attached.
50    #[prost(string, tag = "3")]
51    pub bound_endpoint: ::prost::alloc::string::String,
52}
53/// Configures TLS listener enablement, socket address and nonempty certificate subject names.
54#[allow(clippy::all)]
55#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
56pub struct ListenerValue {
57    #[prost(bool, tag = "1")]
58    pub enabled: bool,
59    /// Socket address to bind; port zero permits the OS to choose a port.
60    #[prost(string, tag = "2")]
61    pub endpoint: ::prost::alloc::string::String,
62    /// Nonempty certificate names; empty lists and empty entries refuse validation.
63    #[prost(string, repeated, tag = "3")]
64    pub certificate_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
65}
66/// Carries the label for Pairings.Create.
67#[allow(clippy::all)]
68#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
69pub struct PairingsCreateRequest {
70    /// Nonempty client label bounded by the host's configured label_bytes capacity.
71    #[prost(string, tag = "1")]
72    pub label: ::prost::alloc::string::String,
73}
74/// Returns the persisted pairing, actual endpoint, certificate pin and one-time bearer secret.
75#[allow(clippy::all)]
76#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
77pub struct PairingsCreateResponse {
78    #[prost(message, optional, tag = "1")]
79    pub pairing: ::core::option::Option<Pairing>,
80    #[prost(string, tag = "2")]
81    pub endpoint: ::prost::alloc::string::String,
82    /// TLS certificate to pin when connecting with this pairing; certificate rotation invalidates existing pairings.
83    #[prost(string, tag = "3")]
84    pub pinned_certificate_pem: ::prost::alloc::string::String,
85    /// Bearer secret returned on creation; the host persists only its SHA-256 digest. A new Create does not recover this secret.
86    #[prost(string, tag = "4")]
87    pub credential: ::prost::alloc::string::String,
88}
89/// Carries the read boundary for Pairings.List.
90#[allow(clippy::all)]
91#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
92pub struct PairingsListRequest {
93    /// Unset selects the current history boundary; otherwise resend an issued position for this owner. Foreign, expired and unissued positions refuse.
94    #[prost(message, optional, tag = "2")]
95    pub at: ::core::option::Option<crate::model::Position>,
96}
97/// Returns pairing metadata without bearer secrets and the issued current boundary.
98#[allow(clippy::all)]
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct PairingsListResponse {
101    #[prost(message, repeated, tag = "1")]
102    pub pairings: ::prost::alloc::vec::Vec<Pairing>,
103    /// Issued boundary actually selected for this response; retain and resend it unchanged to continue the same read.
104    #[prost(message, optional, tag = "2")]
105    pub resolved_at: ::core::option::Option<crate::model::Position>,
106}
107/// Carries the resource name for Pairings.Delete.
108#[allow(clippy::all)]
109#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
110pub struct PairingsDeleteRequest {
111    /// Pairing ID returned by Create/List; deleting an absent identity refuses.
112    #[prost(string, tag = "1")]
113    pub name: ::prost::alloc::string::String,
114}
115/// Acknowledges persisted credential revocation.
116#[allow(clippy::all)]
117#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
118pub struct PairingsDeleteResponse {}
119/// Identifies a durable client pairing without disclosing its bearer credential.
120#[allow(clippy::all)]
121#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
122pub struct Pairing {
123    /// Owner-generated pairing identity used by Delete; the bearer credential is returned separately only at creation.
124    #[prost(string, tag = "1")]
125    pub id: ::prost::alloc::string::String,
126    #[prost(string, tag = "2")]
127    pub label: ::prost::alloc::string::String,
128}