-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest.pb.go
97 lines (82 loc) · 2.25 KB
/
request.pb.go
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
// Code generated by protoc-gen-go.
// source: request.proto
// DO NOT EDIT!
/*
Package gohash is a generated protocol buffer package.
It is generated from these files:
request.proto
response.proto
It has these top-level messages:
Request
Response
*/
package gohash
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type Request_RequestType int32
const (
Request_GET Request_RequestType = 0
Request_SET Request_RequestType = 1
Request_DELETE Request_RequestType = 2
)
var Request_RequestType_name = map[int32]string{
0: "GET",
1: "SET",
2: "DELETE",
}
var Request_RequestType_value = map[string]int32{
"GET": 0,
"SET": 1,
"DELETE": 2,
}
func (x Request_RequestType) Enum() *Request_RequestType {
p := new(Request_RequestType)
*p = x
return p
}
func (x Request_RequestType) String() string {
return proto.EnumName(Request_RequestType_name, int32(x))
}
func (x *Request_RequestType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Request_RequestType_value, data, "Request_RequestType")
if err != nil {
return err
}
*x = Request_RequestType(value)
return nil
}
type Request struct {
Type *Request_RequestType `protobuf:"varint,1,req,name=type,enum=gohash.Request_RequestType" json:"type,omitempty"`
Key *string `protobuf:"bytes,2,req,name=key" json:"key,omitempty"`
Value *string `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Request) Reset() { *m = Request{} }
func (m *Request) String() string { return proto.CompactTextString(m) }
func (*Request) ProtoMessage() {}
func (m *Request) GetType() Request_RequestType {
if m != nil && m.Type != nil {
return *m.Type
}
return Request_GET
}
func (m *Request) GetKey() string {
if m != nil && m.Key != nil {
return *m.Key
}
return ""
}
func (m *Request) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
func init() {
proto.RegisterEnum("gohash.Request_RequestType", Request_RequestType_name, Request_RequestType_value)
}