1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
/// A request to get a single value from the K/V store
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRequest {
    #[prost(string, tag="1")]
    pub key: std::string::String,
}
/// The result of a get request 
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetResponse {
    /// String value of the requested item
    #[prost(string, tag="1")]
    pub value: std::string::String,
    /// Indicates if the requested item existed 
    #[prost(bool, tag="2")]
    pub exists: bool,
}
/// A request to set a value
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetRequest {
    /// Key of the item to set
    #[prost(string, tag="1")]
    pub key: std::string::String,
    /// Value of the item to set
    #[prost(string, tag="2")]
    pub value: std::string::String,
    /// Seconds after which the key will expire, 0 - no expiration
    #[prost(int32, tag="3")]
    pub expires_s: i32,
}
/// A request to delete a key
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelRequest {
    /// Key to delete
    #[prost(string, tag="1")]
    pub key: std::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DelResponse {
    #[prost(string, tag="1")]
    pub key: std::string::String,
}
/// Response to a set request 
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetResponse {
    /// The value that was set
    #[prost(string, tag="1")]
    pub value: std::string::String,
}
/// A request to perform an atomic add operation
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddRequest {
    /// The key of the item
    #[prost(string, tag="1")]
    pub key: std::string::String,
    /// Value to add 
    #[prost(int32, tag="2")]
    pub value: i32,
}
/// Result of an atomic add operation
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddResponse {
    /// New value
    #[prost(int32, tag="1")]
    pub value: i32,
}
/// A request to add an item to the end of a list
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPushRequest {
    /// Key 
    #[prost(string, tag="1")]
    pub key: std::string::String,
    /// Value to add
    #[prost(string, tag="2")]
    pub value: std::string::String,
}
/// A request to delete all occurences of an item from a list
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDelItemRequest {
    /// Key 
    #[prost(string, tag="1")]
    pub key: std::string::String,
    /// Value to remove
    #[prost(string, tag="2")]
    pub value: std::string::String,
}
/// A request to clear a list at a given key 
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListClearRequest {
    /// Key of the list to clear
    #[prost(string, tag="1")]
    pub key: std::string::String,
}
/// A request to retrieve a range of values from a list
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRangeRequest {
    /// Key of the list
    #[prost(string, tag="1")]
    pub key: std::string::String,
    /// Starting value of the range
    #[prost(int32, tag="2")]
    pub start: i32,
    /// Stop value (inclusive) of the range
    #[prost(int32, tag="3")]
    pub stop: i32,
}
/// List of values returned from a range request
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRangeResponse {
    #[prost(string, repeated, tag="1")]
    pub values: ::std::vec::Vec<std::string::String>,
}
/// Return response from non-range list requests like push and clear
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResponse {
    #[prost(int32, tag="1")]
    pub new_count: i32,
}
/// Request to add an item to a set
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetAddRequest {
    #[prost(string, tag="1")]
    pub key: std::string::String,
    #[prost(string, tag="2")]
    pub value: std::string::String,
}
/// Request to remove a specific value from a set
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetRemoveRequest {
    #[prost(string, tag="1")]
    pub key: std::string::String,
    #[prost(string, tag="2")]
    pub value: std::string::String,
}
/// Request to query the contents of a set
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetQueryRequest {
    #[prost(string, tag="1")]
    pub key: std::string::String,
}
/// Response to an operation that requests members of a list (query, intersect, union)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetQueryResponse {
    #[prost(string, repeated, tag="1")]
    pub values: ::std::vec::Vec<std::string::String>,
}
/// Request for the intersection of multiple sets
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetIntersectionRequest {
    #[prost(string, repeated, tag="1")]
    pub keys: ::std::vec::Vec<std::string::String>,
}
/// Request for the union of multiple sets
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetUnionRequest {
    #[prost(string, repeated, tag="1")]
    pub keys: ::std::vec::Vec<std::string::String>,
}
/// Response to a set query, add, or delete
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetOperationResponse {
    #[prost(int32, tag="1")]
    pub new_count: i32,
}
/// Test for the existence of a key
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyExistsQuery {
    #[prost(string, tag="1")]
    pub key: std::string::String,
}