File: msg.proto

package info (click to toggle)
golang-doozer 0.0~git20130909-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 224 kB
  • ctags: 283
  • sloc: makefile: 11
file content (58 lines) | stat: -rw-r--r-- 1,082 bytes parent folder | download
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
package doozer;

// see doc/proto.md
message Request {
  optional int32 tag = 1;

  enum Verb {
      GET      = 1;
      SET      = 2;
      DEL      = 3;
      REV      = 5;
      WAIT     = 6;
      NOP      = 7;
      WALK     = 9;
      GETDIR   = 14;
      STAT     = 16;
      SELF     = 20;
      ACCESS   = 99;
  }
  optional Verb verb = 2;

  optional string path = 4;
  optional bytes value = 5;
  optional int32 other_tag = 6;

  optional int32 offset = 7;

  optional int64 rev = 9;
}

// see doc/proto.md
message Response {
  optional int32 tag = 1;
  optional int32 flags = 2;

  optional int64 rev = 3;
  optional string path = 5;
  optional bytes value = 6;
  optional int32 len = 8;

  enum Err {
    // don't use value 0
    OTHER        = 127;
    TAG_IN_USE   = 1;
    UNKNOWN_VERB = 2;
    READONLY     = 3;
    TOO_LATE     = 4;
    REV_MISMATCH = 5;
    BAD_PATH     = 6;
    MISSING_ARG  = 7;
    RANGE        = 8;
    NOTDIR       = 20;
    ISDIR        = 21;
    NOENT        = 22;
  }
  optional Err err_code = 100;
  optional string err_detail = 101;
}