This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
/
message.pb.go
129 lines (117 loc) · 3.15 KB
/
message.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
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
// Code generated by protoc-gen-go.
// source: message.proto
// DO NOT EDIT!
package warden
import proto "code.google.com/p/goprotobuf/proto"
import json "encoding/json"
import math "math"
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
var _ = &json.SyntaxError{}
var _ = math.Inf
type Message_Type int32
const (
Message_Error Message_Type = 1
Message_Create Message_Type = 11
Message_Stop Message_Type = 12
Message_Destroy Message_Type = 13
Message_Info Message_Type = 14
Message_Spawn Message_Type = 21
Message_Link Message_Type = 22
Message_Run Message_Type = 23
Message_Stream Message_Type = 24
Message_NetIn Message_Type = 31
Message_NetOut Message_Type = 32
Message_CopyIn Message_Type = 41
Message_CopyOut Message_Type = 42
Message_LimitMemory Message_Type = 51
Message_LimitDisk Message_Type = 52
Message_LimitBandwidth Message_Type = 53
Message_Ping Message_Type = 91
Message_List Message_Type = 92
Message_Echo Message_Type = 93
)
var Message_Type_name = map[int32]string{
1: "Error",
11: "Create",
12: "Stop",
13: "Destroy",
14: "Info",
21: "Spawn",
22: "Link",
23: "Run",
24: "Stream",
31: "NetIn",
32: "NetOut",
41: "CopyIn",
42: "CopyOut",
51: "LimitMemory",
52: "LimitDisk",
53: "LimitBandwidth",
91: "Ping",
92: "List",
93: "Echo",
}
var Message_Type_value = map[string]int32{
"Error": 1,
"Create": 11,
"Stop": 12,
"Destroy": 13,
"Info": 14,
"Spawn": 21,
"Link": 22,
"Run": 23,
"Stream": 24,
"NetIn": 31,
"NetOut": 32,
"CopyIn": 41,
"CopyOut": 42,
"LimitMemory": 51,
"LimitDisk": 52,
"LimitBandwidth": 53,
"Ping": 91,
"List": 92,
"Echo": 93,
}
func (x Message_Type) Enum() *Message_Type {
p := new(Message_Type)
*p = x
return p
}
func (x Message_Type) String() string {
return proto.EnumName(Message_Type_name, int32(x))
}
func (x Message_Type) MarshalJSON() ([]byte, error) {
return json.Marshal(x.String())
}
func (x *Message_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(Message_Type_value, data, "Message_Type")
if err != nil {
return err
}
*x = Message_Type(value)
return nil
}
type Message struct {
Type *Message_Type `protobuf:"varint,1,req,name=type,enum=warden.Message_Type" json:"type,omitempty"`
Payload []byte `protobuf:"bytes,2,req,name=payload" json:"payload,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {}
func (m *Message) GetType() Message_Type {
if m != nil && m.Type != nil {
return *m.Type
}
return 0
}
func (m *Message) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func init() {
proto.RegisterEnum("warden.Message_Type", Message_Type_name, Message_Type_value)
}