harmos-protocol 0.1.15

Harmos v1 plugin protobuf messages and gRPC client and server.
Documentation
// This file is @generated by prost-build.
/// Selects a plugin entry and optional issued settings boundary.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SettingsListRequest {
    /// Clients select a plugin; plugins omit this or name themselves. Any other plugin name is refused.
    #[prost(string, optional, tag = "1")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    /// Unset selects the latest durable settings; otherwise resend an issued cut unchanged.
    #[prost(message, optional, tag = "2")]
    pub at: ::core::option::Option<crate::model::ReadCut>,
}
/// Returns the plugin's declarations and complete current setting values at one revision.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SettingsListResponse {
    #[prost(message, repeated, tag = "1")]
    pub declarations: ::prost::alloc::vec::Vec<crate::model::SettingDeclaration>,
    #[prost(message, optional, tag = "2")]
    pub value: ::core::option::Option<crate::model::SettingValues>,
    /// Opaque settings revision, separate from the plugin entry revision.
    #[prost(bytes = "vec", tag = "3")]
    pub revision: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "4")]
    pub resolved_at: ::core::option::Option<crate::model::ReadCut>,
}
/// Carries the whole replacement value, expected settings revision and replay identity.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SettingsSetRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Complete declared value set; missing, unknown or differently typed values refuse.
    #[prost(message, optional, tag = "2")]
    pub value: ::core::option::Option<crate::model::SettingValues>,
    /// Issued settings revision; conflicts require getting the values again before retrying.
    #[prost(bytes = "vec", tag = "3")]
    pub expected_revision: ::prost::alloc::vec::Vec<u8>,
    /// Nonempty caller-chosen identity retained with the normalized request for replay.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
}
/// Returns the complete applied value, new settings revision and mutation receipt.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SettingsSetResponse {
    #[prost(message, optional, tag = "1")]
    pub value: ::core::option::Option<crate::model::SettingValues>,
    #[prost(bytes = "vec", tag = "2")]
    pub revision: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "3")]
    pub receipt: ::core::option::Option<crate::model::Receipt>,
}
/// Reads only the trusted calling plugin entry's durable state.
#[allow(clippy::all)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StateGetRequest {}
/// Returns opaque bytes and the revision to compare on the next Put; zero is unwritten.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StateGetResponse {
    #[prost(bytes = "vec", tag = "1")]
    pub value: ::prost::alloc::vec::Vec<u8>,
    #[prost(uint64, tag = "2")]
    pub revision: u64,
}
/// Replaces the calling entry's opaque state; empty bytes clear it without resetting the revision.
#[allow(clippy::all)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StatePutRequest {
    #[prost(uint64, tag = "1")]
    pub expected_revision: u64,
    #[prost(bytes = "vec", tag = "2")]
    pub value: ::prost::alloc::vec::Vec<u8>,
}
/// Issued only after the replacement is durable in recovery storage.
#[allow(clippy::all)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StatePutResponse {
    #[prost(uint64, tag = "1")]
    pub revision: u64,
}