Skip to main content

harmos_protocol/host/
plugins.rs

1// This file is @generated by prost-build.
2/// Selects a plugin entry and optional issued settings boundary.
3#[allow(clippy::all)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct SettingsListRequest {
6    /// Clients select a plugin; plugins omit this or name themselves. Any other plugin name is refused.
7    #[prost(string, optional, tag = "1")]
8    pub name: ::core::option::Option<::prost::alloc::string::String>,
9    /// Unset selects the latest durable settings; otherwise resend an issued cut unchanged.
10    #[prost(message, optional, tag = "2")]
11    pub at: ::core::option::Option<crate::model::ReadCut>,
12}
13/// Returns the plugin's declarations and complete current setting values at one revision.
14#[allow(clippy::all)]
15#[derive(Clone, PartialEq, ::prost::Message)]
16pub struct SettingsListResponse {
17    #[prost(message, repeated, tag = "1")]
18    pub declarations: ::prost::alloc::vec::Vec<crate::model::SettingDeclaration>,
19    #[prost(message, optional, tag = "2")]
20    pub value: ::core::option::Option<crate::model::SettingValues>,
21    /// Opaque settings revision, separate from the plugin entry revision.
22    #[prost(bytes = "vec", tag = "3")]
23    pub revision: ::prost::alloc::vec::Vec<u8>,
24    #[prost(message, optional, tag = "4")]
25    pub resolved_at: ::core::option::Option<crate::model::ReadCut>,
26}
27/// Carries the whole replacement value, expected settings revision and replay identity.
28#[allow(clippy::all)]
29#[derive(Clone, PartialEq, ::prost::Message)]
30pub struct SettingsSetRequest {
31    #[prost(string, tag = "1")]
32    pub name: ::prost::alloc::string::String,
33    /// Complete declared value set; missing, unknown or differently typed values refuse.
34    #[prost(message, optional, tag = "2")]
35    pub value: ::core::option::Option<crate::model::SettingValues>,
36    /// Issued settings revision; conflicts require getting the values again before retrying.
37    #[prost(bytes = "vec", tag = "3")]
38    pub expected_revision: ::prost::alloc::vec::Vec<u8>,
39    /// Nonempty caller-chosen identity retained with the normalized request for replay.
40    #[prost(string, tag = "4")]
41    pub request_id: ::prost::alloc::string::String,
42}
43/// Returns the complete applied value, new settings revision and mutation receipt.
44#[allow(clippy::all)]
45#[derive(Clone, PartialEq, ::prost::Message)]
46pub struct SettingsSetResponse {
47    #[prost(message, optional, tag = "1")]
48    pub value: ::core::option::Option<crate::model::SettingValues>,
49    #[prost(bytes = "vec", tag = "2")]
50    pub revision: ::prost::alloc::vec::Vec<u8>,
51    #[prost(message, optional, tag = "3")]
52    pub receipt: ::core::option::Option<crate::model::Receipt>,
53}
54/// Reads only the trusted calling plugin entry's durable state.
55#[allow(clippy::all)]
56#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
57pub struct StateGetRequest {}
58/// Returns opaque bytes and the revision to compare on the next Put; zero is unwritten.
59#[allow(clippy::all)]
60#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
61pub struct StateGetResponse {
62    #[prost(bytes = "vec", tag = "1")]
63    pub value: ::prost::alloc::vec::Vec<u8>,
64    #[prost(uint64, tag = "2")]
65    pub revision: u64,
66}
67/// Replaces the calling entry's opaque state; empty bytes clear it without resetting the revision.
68#[allow(clippy::all)]
69#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
70pub struct StatePutRequest {
71    #[prost(uint64, tag = "1")]
72    pub expected_revision: u64,
73    #[prost(bytes = "vec", tag = "2")]
74    pub value: ::prost::alloc::vec::Vec<u8>,
75}
76/// Issued only after the replacement is durable in recovery storage.
77#[allow(clippy::all)]
78#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
79pub struct StatePutResponse {
80    #[prost(uint64, tag = "1")]
81    pub revision: u64,
82}