forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log_message.pb.go
150 lines (128 loc) · 4.02 KB
/
log_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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
// Code generated by protoc-gen-gogo.
// source: log_message.proto
// DO NOT EDIT!
package logmessage
import proto "code.google.com/p/gogoprotobuf/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 LogMessage_MessageType int32
const (
LogMessage_OUT LogMessage_MessageType = 1
LogMessage_ERR LogMessage_MessageType = 2
)
var LogMessage_MessageType_name = map[int32]string{
1: "OUT",
2: "ERR",
}
var LogMessage_MessageType_value = map[string]int32{
"OUT": 1,
"ERR": 2,
}
func (x LogMessage_MessageType) Enum() *LogMessage_MessageType {
p := new(LogMessage_MessageType)
*p = x
return p
}
func (x LogMessage_MessageType) String() string {
return proto.EnumName(LogMessage_MessageType_name, int32(x))
}
func (x LogMessage_MessageType) MarshalJSON() ([]byte, error) {
return json.Marshal(x.String())
}
func (x *LogMessage_MessageType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(LogMessage_MessageType_value, data, "LogMessage_MessageType")
if err != nil {
return err
}
*x = LogMessage_MessageType(value)
return nil
}
type LogMessage struct {
Message []byte `protobuf:"bytes,1,req,name=message" json:"message,omitempty"`
MessageType *LogMessage_MessageType `protobuf:"varint,2,req,name=message_type,enum=logmessage.LogMessage_MessageType" json:"message_type,omitempty"`
Timestamp *int64 `protobuf:"zigzag64,3,req,name=timestamp" json:"timestamp,omitempty"`
AppId *string `protobuf:"bytes,4,req,name=app_id" json:"app_id,omitempty"`
SourceId *string `protobuf:"bytes,6,opt,name=source_id" json:"source_id,omitempty"`
DrainUrls []string `protobuf:"bytes,7,rep,name=drain_urls" json:"drain_urls,omitempty"`
SourceName *string `protobuf:"bytes,8,opt,name=source_name" json:"source_name,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *LogMessage) Reset() { *m = LogMessage{} }
func (m *LogMessage) String() string { return proto.CompactTextString(m) }
func (*LogMessage) ProtoMessage() {}
func (m *LogMessage) GetMessage() []byte {
if m != nil {
return m.Message
}
return nil
}
func (m *LogMessage) GetMessageType() LogMessage_MessageType {
if m != nil && m.MessageType != nil {
return *m.MessageType
}
return 0
}
func (m *LogMessage) GetTimestamp() int64 {
if m != nil && m.Timestamp != nil {
return *m.Timestamp
}
return 0
}
func (m *LogMessage) GetAppId() string {
if m != nil && m.AppId != nil {
return *m.AppId
}
return ""
}
func (m *LogMessage) GetSourceId() string {
if m != nil && m.SourceId != nil {
return *m.SourceId
}
return ""
}
func (m *LogMessage) GetDrainUrls() []string {
if m != nil {
return m.DrainUrls
}
return nil
}
func (m *LogMessage) GetSourceName() string {
if m != nil && m.SourceName != nil {
return *m.SourceName
}
return ""
}
type LogEnvelope struct {
RoutingKey *string `protobuf:"bytes,1,req,name=routing_key" json:"routing_key,omitempty"`
Signature []byte `protobuf:"bytes,2,req,name=signature" json:"signature,omitempty"`
LogMessage *LogMessage `protobuf:"bytes,3,req,name=log_message" json:"log_message,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
func (m *LogEnvelope) Reset() { *m = LogEnvelope{} }
func (m *LogEnvelope) String() string { return proto.CompactTextString(m) }
func (*LogEnvelope) ProtoMessage() {}
func (m *LogEnvelope) GetRoutingKey() string {
if m != nil && m.RoutingKey != nil {
return *m.RoutingKey
}
return ""
}
func (m *LogEnvelope) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func (m *LogEnvelope) GetLogMessage() *LogMessage {
if m != nil {
return m.LogMessage
}
return nil
}
func init() {
proto.RegisterEnum("logmessage.LogMessage_MessageType", LogMessage_MessageType_name, LogMessage_MessageType_value)
}