syntax = "proto3";

package net_pb;

enum OptionType {
  Cmd = 0;
  BatchCmd = 1;
  Bytes = 2;
  SizeOfDisk = 4;
  Len = 5;
  Flush = 6;
  None = 7;
}

enum KeyValueType {
  Get = 0;
  // Set不允许设置为0，否则空值时会导致`CommandPackage::get_vec_bytes`解析中断
  Set = 1;
  Remove = 2;
}

message CommandOption {
  OptionType type = 1;
  bytes bytes = 2;
  // 仅作为数值指令的结果表示
  uint64 value = 3;
}

message KeyValue {
  bytes key = 1;
  bytes value = 2;
  KeyValueType type = 3;
}