#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResponseHeader {
#[prost(uint64, tag = "1")]
pub cluster_id: u64,
#[prost(uint64, tag = "2")]
pub member_id: u64,
#[prost(int64, tag = "3")]
pub revision: i64,
#[prost(uint64, tag = "4")]
pub raft_term: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RangeRequest {
#[prost(bytes, tag = "1")]
pub key: std::vec::Vec<u8>,
#[prost(bytes, tag = "2")]
pub range_end: std::vec::Vec<u8>,
#[prost(int64, tag = "3")]
pub limit: i64,
#[prost(int64, tag = "4")]
pub revision: i64,
#[prost(enumeration = "range_request::SortOrder", tag = "5")]
pub sort_order: i32,
#[prost(enumeration = "range_request::SortTarget", tag = "6")]
pub sort_target: i32,
#[prost(bool, tag = "7")]
pub serializable: bool,
#[prost(bool, tag = "8")]
pub keys_only: bool,
#[prost(bool, tag = "9")]
pub count_only: bool,
#[prost(int64, tag = "10")]
pub min_mod_revision: i64,
#[prost(int64, tag = "11")]
pub max_mod_revision: i64,
#[prost(int64, tag = "12")]
pub min_create_revision: i64,
#[prost(int64, tag = "13")]
pub max_create_revision: i64,
}
pub mod range_request {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SortOrder {
None = 0,
Ascend = 1,
Descend = 2,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SortTarget {
Key = 0,
Version = 1,
Create = 2,
Mod = 3,
Value = 4,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RangeResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(message, repeated, tag = "2")]
pub kvs: ::std::vec::Vec<super::mvccpb::KeyValue>,
#[prost(bool, tag = "3")]
pub more: bool,
#[prost(int64, tag = "4")]
pub count: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutRequest {
#[prost(bytes, tag = "1")]
pub key: std::vec::Vec<u8>,
#[prost(bytes, tag = "2")]
pub value: std::vec::Vec<u8>,
#[prost(int64, tag = "3")]
pub lease: i64,
#[prost(bool, tag = "4")]
pub prev_kv: bool,
#[prost(bool, tag = "5")]
pub ignore_value: bool,
#[prost(bool, tag = "6")]
pub ignore_lease: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PutResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(message, optional, tag = "2")]
pub prev_kv: ::std::option::Option<super::mvccpb::KeyValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRangeRequest {
#[prost(bytes, tag = "1")]
pub key: std::vec::Vec<u8>,
#[prost(bytes, tag = "2")]
pub range_end: std::vec::Vec<u8>,
#[prost(bool, tag = "3")]
pub prev_kv: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRangeResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(int64, tag = "2")]
pub deleted: i64,
#[prost(message, repeated, tag = "3")]
pub prev_kvs: ::std::vec::Vec<super::mvccpb::KeyValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestOp {
#[prost(oneof = "request_op::Request", tags = "1, 2, 3, 4")]
pub request: ::std::option::Option<request_op::Request>,
}
pub mod request_op {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Request {
#[prost(message, tag = "1")]
RequestRange(super::RangeRequest),
#[prost(message, tag = "2")]
RequestPut(super::PutRequest),
#[prost(message, tag = "3")]
RequestDeleteRange(super::DeleteRangeRequest),
#[prost(message, tag = "4")]
RequestTxn(super::TxnRequest),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResponseOp {
#[prost(oneof = "response_op::Response", tags = "1, 2, 3, 4")]
pub response: ::std::option::Option<response_op::Response>,
}
pub mod response_op {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
ResponseRange(super::RangeResponse),
#[prost(message, tag = "2")]
ResponsePut(super::PutResponse),
#[prost(message, tag = "3")]
ResponseDeleteRange(super::DeleteRangeResponse),
#[prost(message, tag = "4")]
ResponseTxn(super::TxnResponse),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Compare {
#[prost(enumeration = "compare::CompareResult", tag = "1")]
pub result: i32,
#[prost(enumeration = "compare::CompareTarget", tag = "2")]
pub target: i32,
#[prost(bytes, tag = "3")]
pub key: std::vec::Vec<u8>,
#[prost(bytes, tag = "64")]
pub range_end: std::vec::Vec<u8>,
#[prost(oneof = "compare::TargetUnion", tags = "4, 5, 6, 7, 8")]
pub target_union: ::std::option::Option<compare::TargetUnion>,
}
pub mod compare {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CompareResult {
Equal = 0,
Greater = 1,
Less = 2,
NotEqual = 3,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CompareTarget {
Version = 0,
Create = 1,
Mod = 2,
Value = 3,
Lease = 4,
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum TargetUnion {
#[prost(int64, tag = "4")]
Version(i64),
#[prost(int64, tag = "5")]
CreateRevision(i64),
#[prost(int64, tag = "6")]
ModRevision(i64),
#[prost(bytes, tag = "7")]
Value(std::vec::Vec<u8>),
#[prost(int64, tag = "8")]
Lease(i64),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxnRequest {
#[prost(message, repeated, tag = "1")]
pub compare: ::std::vec::Vec<Compare>,
#[prost(message, repeated, tag = "2")]
pub success: ::std::vec::Vec<RequestOp>,
#[prost(message, repeated, tag = "3")]
pub failure: ::std::vec::Vec<RequestOp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TxnResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(bool, tag = "2")]
pub succeeded: bool,
#[prost(message, repeated, tag = "3")]
pub responses: ::std::vec::Vec<ResponseOp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactionRequest {
#[prost(int64, tag = "1")]
pub revision: i64,
#[prost(bool, tag = "2")]
pub physical: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactionResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HashRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HashKvRequest {
#[prost(int64, tag = "1")]
pub revision: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HashKvResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(uint32, tag = "2")]
pub hash: u32,
#[prost(int64, tag = "3")]
pub compact_revision: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HashResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(uint32, tag = "2")]
pub hash: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(uint64, tag = "2")]
pub remaining_bytes: u64,
#[prost(bytes, tag = "3")]
pub blob: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WatchRequest {
#[prost(oneof = "watch_request::RequestUnion", tags = "1, 2, 3")]
pub request_union: ::std::option::Option<watch_request::RequestUnion>,
}
pub mod watch_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RequestUnion {
#[prost(message, tag = "1")]
CreateRequest(super::WatchCreateRequest),
#[prost(message, tag = "2")]
CancelRequest(super::WatchCancelRequest),
#[prost(message, tag = "3")]
ProgressRequest(super::WatchProgressRequest),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WatchCreateRequest {
#[prost(bytes, tag = "1")]
pub key: std::vec::Vec<u8>,
#[prost(bytes, tag = "2")]
pub range_end: std::vec::Vec<u8>,
#[prost(int64, tag = "3")]
pub start_revision: i64,
#[prost(bool, tag = "4")]
pub progress_notify: bool,
#[prost(enumeration = "watch_create_request::FilterType", repeated, tag = "5")]
pub filters: ::std::vec::Vec<i32>,
#[prost(bool, tag = "6")]
pub prev_kv: bool,
#[prost(int64, tag = "7")]
pub watch_id: i64,
#[prost(bool, tag = "8")]
pub fragment: bool,
}
pub mod watch_create_request {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FilterType {
Noput = 0,
Nodelete = 1,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WatchCancelRequest {
#[prost(int64, tag = "1")]
pub watch_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WatchProgressRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WatchResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(int64, tag = "2")]
pub watch_id: i64,
#[prost(bool, tag = "3")]
pub created: bool,
#[prost(bool, tag = "4")]
pub canceled: bool,
#[prost(int64, tag = "5")]
pub compact_revision: i64,
#[prost(string, tag = "6")]
pub cancel_reason: std::string::String,
#[prost(bool, tag = "7")]
pub fragment: bool,
#[prost(message, repeated, tag = "11")]
pub events: ::std::vec::Vec<super::mvccpb::Event>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseGrantRequest {
#[prost(int64, tag = "1")]
pub ttl: i64,
#[prost(int64, tag = "2")]
pub id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseGrantResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(int64, tag = "2")]
pub id: i64,
#[prost(int64, tag = "3")]
pub ttl: i64,
#[prost(string, tag = "4")]
pub error: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseRevokeRequest {
#[prost(int64, tag = "1")]
pub id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseRevokeResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseCheckpoint {
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(int64, tag = "2")]
pub remaining_ttl: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseCheckpointRequest {
#[prost(message, repeated, tag = "1")]
pub checkpoints: ::std::vec::Vec<LeaseCheckpoint>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseCheckpointResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseKeepAliveRequest {
#[prost(int64, tag = "1")]
pub id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseKeepAliveResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(int64, tag = "2")]
pub id: i64,
#[prost(int64, tag = "3")]
pub ttl: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseTimeToLiveRequest {
#[prost(int64, tag = "1")]
pub id: i64,
#[prost(bool, tag = "2")]
pub keys: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseTimeToLiveResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(int64, tag = "2")]
pub id: i64,
#[prost(int64, tag = "3")]
pub ttl: i64,
#[prost(int64, tag = "4")]
pub granted_ttl: i64,
#[prost(bytes, repeated, tag = "5")]
pub keys: ::std::vec::Vec<std::vec::Vec<u8>>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseLeasesRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseStatus {
#[prost(int64, tag = "1")]
pub id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LeaseLeasesResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(message, repeated, tag = "2")]
pub leases: ::std::vec::Vec<LeaseStatus>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Member {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(string, tag = "2")]
pub name: std::string::String,
#[prost(string, repeated, tag = "3")]
pub peer_ur_ls: ::std::vec::Vec<std::string::String>,
#[prost(string, repeated, tag = "4")]
pub client_ur_ls: ::std::vec::Vec<std::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemberAddRequest {
#[prost(string, repeated, tag = "1")]
pub peer_ur_ls: ::std::vec::Vec<std::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemberAddResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(message, optional, tag = "2")]
pub member: ::std::option::Option<Member>,
#[prost(message, repeated, tag = "3")]
pub members: ::std::vec::Vec<Member>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemberRemoveRequest {
#[prost(uint64, tag = "1")]
pub id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemberRemoveResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(message, repeated, tag = "2")]
pub members: ::std::vec::Vec<Member>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemberUpdateRequest {
#[prost(uint64, tag = "1")]
pub id: u64,
#[prost(string, repeated, tag = "2")]
pub peer_ur_ls: ::std::vec::Vec<std::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemberUpdateResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(message, repeated, tag = "2")]
pub members: ::std::vec::Vec<Member>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemberListRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemberListResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(message, repeated, tag = "2")]
pub members: ::std::vec::Vec<Member>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DefragmentRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DefragmentResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveLeaderRequest {
#[prost(uint64, tag = "1")]
pub target_id: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MoveLeaderResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlarmRequest {
#[prost(enumeration = "alarm_request::AlarmAction", tag = "1")]
pub action: i32,
#[prost(uint64, tag = "2")]
pub member_id: u64,
#[prost(enumeration = "AlarmType", tag = "3")]
pub alarm: i32,
}
pub mod alarm_request {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AlarmAction {
Get = 0,
Activate = 1,
Deactivate = 2,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlarmMember {
#[prost(uint64, tag = "1")]
pub member_id: u64,
#[prost(enumeration = "AlarmType", tag = "2")]
pub alarm: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AlarmResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(message, repeated, tag = "2")]
pub alarms: ::std::vec::Vec<AlarmMember>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatusRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StatusResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(string, tag = "2")]
pub version: std::string::String,
#[prost(int64, tag = "3")]
pub db_size: i64,
#[prost(uint64, tag = "4")]
pub leader: u64,
#[prost(uint64, tag = "5")]
pub raft_index: u64,
#[prost(uint64, tag = "6")]
pub raft_term: u64,
#[prost(uint64, tag = "7")]
pub raft_applied_index: u64,
#[prost(string, repeated, tag = "8")]
pub errors: ::std::vec::Vec<std::string::String>,
#[prost(int64, tag = "9")]
pub db_size_in_use: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthEnableRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthDisableRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthenticateRequest {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(string, tag = "2")]
pub password: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserAddRequest {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(string, tag = "2")]
pub password: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserGetRequest {
#[prost(string, tag = "1")]
pub name: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserDeleteRequest {
#[prost(string, tag = "1")]
pub name: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserChangePasswordRequest {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(string, tag = "2")]
pub password: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserGrantRoleRequest {
#[prost(string, tag = "1")]
pub user: std::string::String,
#[prost(string, tag = "2")]
pub role: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserRevokeRoleRequest {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(string, tag = "2")]
pub role: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleAddRequest {
#[prost(string, tag = "1")]
pub name: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleGetRequest {
#[prost(string, tag = "1")]
pub role: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserListRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleListRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleDeleteRequest {
#[prost(string, tag = "1")]
pub role: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleGrantPermissionRequest {
#[prost(string, tag = "1")]
pub name: std::string::String,
#[prost(message, optional, tag = "2")]
pub perm: ::std::option::Option<super::authpb::Permission>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleRevokePermissionRequest {
#[prost(string, tag = "1")]
pub role: std::string::String,
#[prost(bytes, tag = "2")]
pub key: std::vec::Vec<u8>,
#[prost(bytes, tag = "3")]
pub range_end: std::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthEnableResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthDisableResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthenticateResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(string, tag = "2")]
pub token: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserAddResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserGetResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(string, repeated, tag = "2")]
pub roles: ::std::vec::Vec<std::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserDeleteResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserChangePasswordResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserGrantRoleResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserRevokeRoleResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleAddResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleGetResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(message, repeated, tag = "2")]
pub perm: ::std::vec::Vec<super::authpb::Permission>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleListResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(string, repeated, tag = "2")]
pub roles: ::std::vec::Vec<std::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthUserListResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
#[prost(string, repeated, tag = "2")]
pub users: ::std::vec::Vec<std::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleDeleteResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleGrantPermissionResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthRoleRevokePermissionResponse {
#[prost(message, optional, tag = "1")]
pub header: ::std::option::Option<ResponseHeader>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AlarmType {
None = 0,
Nospace = 1,
Corrupt = 2,
}
#[doc = r" Generated client implementations."]
pub mod client {
#![allow(unused_variables, dead_code, missing_docs)]
use tonic::codegen::*;
pub struct KvClient<T> {
inner: tonic::client::Grpc<T>,
}
impl KvClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> KvClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
<T::ResponseBody as HttpBody>::Data: Into<bytes::Bytes> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
#[doc = r" Check if the service is ready."]
pub async fn ready(&mut self) -> Result<(), tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})
}
#[doc = " Range gets the keys in the range from the key-value store."]
pub async fn range(
&mut self,
request: impl tonic::IntoRequest<super::RangeRequest>,
) -> Result<tonic::Response<super::RangeResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.KV/Range");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Put puts the given key into the key-value store."]
#[doc = " A put request increments the revision of the key-value store"]
#[doc = " and generates one event in the event history."]
pub async fn put(
&mut self,
request: impl tonic::IntoRequest<super::PutRequest>,
) -> Result<tonic::Response<super::PutResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.KV/Put");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " DeleteRange deletes the given range from the key-value store."]
#[doc = " A delete request increments the revision of the key-value store"]
#[doc = " and generates a delete event in the event history for every deleted key."]
pub async fn delete_range(
&mut self,
request: impl tonic::IntoRequest<super::DeleteRangeRequest>,
) -> Result<tonic::Response<super::DeleteRangeResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.KV/DeleteRange");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Txn processes multiple requests in a single transaction."]
#[doc = " A txn request increments the revision of the key-value store"]
#[doc = " and generates events with the same revision for every completed request."]
#[doc = " It is not allowed to modify the same key several times within one txn."]
pub async fn txn(
&mut self,
request: impl tonic::IntoRequest<super::TxnRequest>,
) -> Result<tonic::Response<super::TxnResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.KV/Txn");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Compact compacts the event history in the etcd key-value store. The key-value"]
#[doc = " store should be periodically compacted or the event history will continue to grow"]
#[doc = " indefinitely."]
pub async fn compact(
&mut self,
request: impl tonic::IntoRequest<super::CompactionRequest>,
) -> Result<tonic::Response<super::CompactionResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.KV/Compact");
self.inner.unary(request.into_request(), path, codec).await
}
}
impl<T: Clone> Clone for KvClient<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
pub struct WatchClient<T> {
inner: tonic::client::Grpc<T>,
}
impl WatchClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> WatchClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
<T::ResponseBody as HttpBody>::Data: Into<bytes::Bytes> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
#[doc = r" Check if the service is ready."]
pub async fn ready(&mut self) -> Result<(), tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})
}
#[doc = " Watch watches for events happening or that have happened. Both input and output"]
#[doc = " are streams; the input stream is for creating and canceling watchers and the output"]
#[doc = " stream sends events. One watch RPC can watch on multiple key ranges, streaming events"]
#[doc = " for several watches at once. The entire event history can be watched starting from the"]
#[doc = " last compaction revision."]
pub async fn watch(
&mut self,
request: impl tonic::IntoStreamingRequest<Message = super::WatchRequest>,
) -> Result<tonic::Response<tonic::codec::Streaming<super::WatchResponse>>, tonic::Status>
{
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Watch/Watch");
self.inner
.streaming(request.into_streaming_request(), path, codec)
.await
}
}
impl<T: Clone> Clone for WatchClient<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
pub struct LeaseClient<T> {
inner: tonic::client::Grpc<T>,
}
impl LeaseClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> LeaseClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
<T::ResponseBody as HttpBody>::Data: Into<bytes::Bytes> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
#[doc = r" Check if the service is ready."]
pub async fn ready(&mut self) -> Result<(), tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})
}
#[doc = " LeaseGrant creates a lease which expires if the server does not receive a keepAlive"]
#[doc = " within a given time to live period. All keys attached to the lease will be expired and"]
#[doc = " deleted if the lease expires. Each expired key generates a delete event in the event history."]
pub async fn lease_grant(
&mut self,
request: impl tonic::IntoRequest<super::LeaseGrantRequest>,
) -> Result<tonic::Response<super::LeaseGrantResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Lease/LeaseGrant");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted."]
pub async fn lease_revoke(
&mut self,
request: impl tonic::IntoRequest<super::LeaseRevokeRequest>,
) -> Result<tonic::Response<super::LeaseRevokeResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Lease/LeaseRevoke");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client"]
#[doc = " to the server and streaming keep alive responses from the server to the client."]
pub async fn lease_keep_alive(
&mut self,
request: impl tonic::IntoStreamingRequest<Message = super::LeaseKeepAliveRequest>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::LeaseKeepAliveResponse>>,
tonic::Status,
> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Lease/LeaseKeepAlive");
self.inner
.streaming(request.into_streaming_request(), path, codec)
.await
}
#[doc = " LeaseTimeToLive retrieves lease information."]
pub async fn lease_time_to_live(
&mut self,
request: impl tonic::IntoRequest<super::LeaseTimeToLiveRequest>,
) -> Result<tonic::Response<super::LeaseTimeToLiveResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Lease/LeaseTimeToLive");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " LeaseLeases lists all existing leases."]
pub async fn lease_leases(
&mut self,
request: impl tonic::IntoRequest<super::LeaseLeasesRequest>,
) -> Result<tonic::Response<super::LeaseLeasesResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Lease/LeaseLeases");
self.inner.unary(request.into_request(), path, codec).await
}
}
impl<T: Clone> Clone for LeaseClient<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
pub struct ClusterClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ClusterClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ClusterClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
<T::ResponseBody as HttpBody>::Data: Into<bytes::Bytes> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
#[doc = r" Check if the service is ready."]
pub async fn ready(&mut self) -> Result<(), tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})
}
#[doc = " MemberAdd adds a member into the cluster."]
pub async fn member_add(
&mut self,
request: impl tonic::IntoRequest<super::MemberAddRequest>,
) -> Result<tonic::Response<super::MemberAddResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Cluster/MemberAdd");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " MemberRemove removes an existing member from the cluster."]
pub async fn member_remove(
&mut self,
request: impl tonic::IntoRequest<super::MemberRemoveRequest>,
) -> Result<tonic::Response<super::MemberRemoveResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Cluster/MemberRemove");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " MemberUpdate updates the member configuration."]
pub async fn member_update(
&mut self,
request: impl tonic::IntoRequest<super::MemberUpdateRequest>,
) -> Result<tonic::Response<super::MemberUpdateResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Cluster/MemberUpdate");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " MemberList lists all the members in the cluster."]
pub async fn member_list(
&mut self,
request: impl tonic::IntoRequest<super::MemberListRequest>,
) -> Result<tonic::Response<super::MemberListResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Cluster/MemberList");
self.inner.unary(request.into_request(), path, codec).await
}
}
impl<T: Clone> Clone for ClusterClient<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
pub struct MaintenanceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl MaintenanceClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> MaintenanceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
<T::ResponseBody as HttpBody>::Data: Into<bytes::Bytes> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
#[doc = r" Check if the service is ready."]
pub async fn ready(&mut self) -> Result<(), tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})
}
#[doc = " Alarm activates, deactivates, and queries alarms regarding cluster health."]
pub async fn alarm(
&mut self,
request: impl tonic::IntoRequest<super::AlarmRequest>,
) -> Result<tonic::Response<super::AlarmResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Maintenance/Alarm");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Status gets the status of the member."]
pub async fn status(
&mut self,
request: impl tonic::IntoRequest<super::StatusRequest>,
) -> Result<tonic::Response<super::StatusResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Maintenance/Status");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Defragment defragments a member's backend database to recover storage space."]
pub async fn defragment(
&mut self,
request: impl tonic::IntoRequest<super::DefragmentRequest>,
) -> Result<tonic::Response<super::DefragmentResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Maintenance/Defragment");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Hash computes the hash of whole backend keyspace,"]
#[doc = " including key, lease, and other buckets in storage."]
#[doc = " This is designed for testing ONLY!"]
#[doc = " Do not rely on this in production with ongoing transactions,"]
#[doc = " since Hash operation does not hold MVCC locks."]
#[doc = " Use \"HashKV\" API instead for \"key\" bucket consistency checks."]
pub async fn hash(
&mut self,
request: impl tonic::IntoRequest<super::HashRequest>,
) -> Result<tonic::Response<super::HashResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Maintenance/Hash");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " HashKV computes the hash of all MVCC keys up to a given revision."]
#[doc = " It only iterates \"key\" bucket in backend storage."]
pub async fn hash_kv(
&mut self,
request: impl tonic::IntoRequest<super::HashKvRequest>,
) -> Result<tonic::Response<super::HashKvResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Maintenance/HashKV");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Snapshot sends a snapshot of the entire backend from a member over a stream to a client."]
pub async fn snapshot(
&mut self,
request: impl tonic::IntoRequest<super::SnapshotRequest>,
) -> Result<tonic::Response<tonic::codec::Streaming<super::SnapshotResponse>>, tonic::Status>
{
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Maintenance/Snapshot");
self.inner
.server_streaming(request.into_request(), path, codec)
.await
}
#[doc = " MoveLeader requests current leader node to transfer its leadership to transferee."]
pub async fn move_leader(
&mut self,
request: impl tonic::IntoRequest<super::MoveLeaderRequest>,
) -> Result<tonic::Response<super::MoveLeaderResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Maintenance/MoveLeader");
self.inner.unary(request.into_request(), path, codec).await
}
}
impl<T: Clone> Clone for MaintenanceClient<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
pub struct AuthClient<T> {
inner: tonic::client::Grpc<T>,
}
impl AuthClient<tonic::transport::Channel> {
#[doc = r" Attempt to create a new client by connecting to a given endpoint."]
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: std::convert::TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> AuthClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + HttpBody + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as HttpBody>::Error: Into<StdError> + Send,
<T::ResponseBody as HttpBody>::Data: Into<bytes::Bytes> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
#[doc = r" Check if the service is ready."]
pub async fn ready(&mut self) -> Result<(), tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})
}
#[doc = " AuthEnable enables authentication."]
pub async fn auth_enable(
&mut self,
request: impl tonic::IntoRequest<super::AuthEnableRequest>,
) -> Result<tonic::Response<super::AuthEnableResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/AuthEnable");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " AuthDisable disables authentication."]
pub async fn auth_disable(
&mut self,
request: impl tonic::IntoRequest<super::AuthDisableRequest>,
) -> Result<tonic::Response<super::AuthDisableResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/AuthDisable");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Authenticate processes an authenticate request."]
pub async fn authenticate(
&mut self,
request: impl tonic::IntoRequest<super::AuthenticateRequest>,
) -> Result<tonic::Response<super::AuthenticateResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/Authenticate");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " UserAdd adds a new user."]
pub async fn user_add(
&mut self,
request: impl tonic::IntoRequest<super::AuthUserAddRequest>,
) -> Result<tonic::Response<super::AuthUserAddResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/UserAdd");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " UserGet gets detailed user information."]
pub async fn user_get(
&mut self,
request: impl tonic::IntoRequest<super::AuthUserGetRequest>,
) -> Result<tonic::Response<super::AuthUserGetResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/UserGet");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " UserList gets a list of all users."]
pub async fn user_list(
&mut self,
request: impl tonic::IntoRequest<super::AuthUserListRequest>,
) -> Result<tonic::Response<super::AuthUserListResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/UserList");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " UserDelete deletes a specified user."]
pub async fn user_delete(
&mut self,
request: impl tonic::IntoRequest<super::AuthUserDeleteRequest>,
) -> Result<tonic::Response<super::AuthUserDeleteResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/UserDelete");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " UserChangePassword changes the password of a specified user."]
pub async fn user_change_password(
&mut self,
request: impl tonic::IntoRequest<super::AuthUserChangePasswordRequest>,
) -> Result<tonic::Response<super::AuthUserChangePasswordResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/UserChangePassword");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " UserGrant grants a role to a specified user."]
pub async fn user_grant_role(
&mut self,
request: impl tonic::IntoRequest<super::AuthUserGrantRoleRequest>,
) -> Result<tonic::Response<super::AuthUserGrantRoleResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/UserGrantRole");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " UserRevokeRole revokes a role of specified user."]
pub async fn user_revoke_role(
&mut self,
request: impl tonic::IntoRequest<super::AuthUserRevokeRoleRequest>,
) -> Result<tonic::Response<super::AuthUserRevokeRoleResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/UserRevokeRole");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " RoleAdd adds a new role."]
pub async fn role_add(
&mut self,
request: impl tonic::IntoRequest<super::AuthRoleAddRequest>,
) -> Result<tonic::Response<super::AuthRoleAddResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/RoleAdd");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " RoleGet gets detailed role information."]
pub async fn role_get(
&mut self,
request: impl tonic::IntoRequest<super::AuthRoleGetRequest>,
) -> Result<tonic::Response<super::AuthRoleGetResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/RoleGet");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " RoleList gets lists of all roles."]
pub async fn role_list(
&mut self,
request: impl tonic::IntoRequest<super::AuthRoleListRequest>,
) -> Result<tonic::Response<super::AuthRoleListResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/RoleList");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " RoleDelete deletes a specified role."]
pub async fn role_delete(
&mut self,
request: impl tonic::IntoRequest<super::AuthRoleDeleteRequest>,
) -> Result<tonic::Response<super::AuthRoleDeleteResponse>, tonic::Status> {
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/RoleDelete");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " RoleGrantPermission grants a permission of a specified key or range to a specified role."]
pub async fn role_grant_permission(
&mut self,
request: impl tonic::IntoRequest<super::AuthRoleGrantPermissionRequest>,
) -> Result<tonic::Response<super::AuthRoleGrantPermissionResponse>, tonic::Status>
{
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/RoleGrantPermission");
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " RoleRevokePermission revokes a key or range permission of a specified role."]
pub async fn role_revoke_permission(
&mut self,
request: impl tonic::IntoRequest<super::AuthRoleRevokePermissionRequest>,
) -> Result<tonic::Response<super::AuthRoleRevokePermissionResponse>, tonic::Status>
{
self.ready().await?;
let codec = tonic::codec::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/etcdserverpb.Auth/RoleRevokePermission");
self.inner.unary(request.into_request(), path, codec).await
}
}
impl<T: Clone> Clone for AuthClient<T> {
fn clone(&self) -> Self {
Self {
inner: self.inner.clone(),
}
}
}
}