-
Notifications
You must be signed in to change notification settings - Fork 1k
/
usage.pb.go
173 lines (151 loc) · 5.73 KB
/
usage.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: cmd/usage/proto/usage.proto
package usage
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type Usage struct {
// service name
Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
// version of service
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// unique service id
Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
// unix timestamp of report
Timestamp uint64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// window of report in seconds
Window uint64 `protobuf:"varint,5,opt,name=window,proto3" json:"window,omitempty"`
// usage metrics
Metrics *Metrics `protobuf:"bytes,6,opt,name=metrics,proto3" json:"metrics,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Usage) Reset() { *m = Usage{} }
func (m *Usage) String() string { return proto.CompactTextString(m) }
func (*Usage) ProtoMessage() {}
func (*Usage) Descriptor() ([]byte, []int) {
return fileDescriptor_d6c20769c80f20f4, []int{0}
}
func (m *Usage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Usage.Unmarshal(m, b)
}
func (m *Usage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Usage.Marshal(b, m, deterministic)
}
func (m *Usage) XXX_Merge(src proto.Message) {
xxx_messageInfo_Usage.Merge(m, src)
}
func (m *Usage) XXX_Size() int {
return xxx_messageInfo_Usage.Size(m)
}
func (m *Usage) XXX_DiscardUnknown() {
xxx_messageInfo_Usage.DiscardUnknown(m)
}
var xxx_messageInfo_Usage proto.InternalMessageInfo
func (m *Usage) GetService() string {
if m != nil {
return m.Service
}
return ""
}
func (m *Usage) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *Usage) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Usage) GetTimestamp() uint64 {
if m != nil {
return m.Timestamp
}
return 0
}
func (m *Usage) GetWindow() uint64 {
if m != nil {
return m.Window
}
return 0
}
func (m *Usage) GetMetrics() *Metrics {
if m != nil {
return m.Metrics
}
return nil
}
type Metrics struct {
// counts such as requests, services, etc
Count map[string]uint64 `protobuf:"bytes,1,rep,name=count,proto3" json:"count,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Metrics) Reset() { *m = Metrics{} }
func (m *Metrics) String() string { return proto.CompactTextString(m) }
func (*Metrics) ProtoMessage() {}
func (*Metrics) Descriptor() ([]byte, []int) {
return fileDescriptor_d6c20769c80f20f4, []int{1}
}
func (m *Metrics) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Metrics.Unmarshal(m, b)
}
func (m *Metrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Metrics.Marshal(b, m, deterministic)
}
func (m *Metrics) XXX_Merge(src proto.Message) {
xxx_messageInfo_Metrics.Merge(m, src)
}
func (m *Metrics) XXX_Size() int {
return xxx_messageInfo_Metrics.Size(m)
}
func (m *Metrics) XXX_DiscardUnknown() {
xxx_messageInfo_Metrics.DiscardUnknown(m)
}
var xxx_messageInfo_Metrics proto.InternalMessageInfo
func (m *Metrics) GetCount() map[string]uint64 {
if m != nil {
return m.Count
}
return nil
}
func init() {
proto.RegisterType((*Usage)(nil), "Usage")
proto.RegisterType((*Metrics)(nil), "Metrics")
proto.RegisterMapType((map[string]uint64)(nil), "Metrics.CountEntry")
}
func init() { proto.RegisterFile("cmd/usage/proto/usage.proto", fileDescriptor_d6c20769c80f20f4) }
var fileDescriptor_d6c20769c80f20f4 = []byte{
// 233 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x90, 0xcd, 0x4a, 0xc4, 0x30,
0x14, 0x85, 0x49, 0x7f, 0x9d, 0x3b, 0x20, 0x12, 0x45, 0x2e, 0xea, 0xa2, 0x74, 0x55, 0x37, 0x1d,
0x18, 0x37, 0x83, 0x5b, 0x71, 0xe9, 0x26, 0xe0, 0x03, 0xd4, 0xf6, 0x22, 0x41, 0x9b, 0x0c, 0x49,
0xda, 0x61, 0x1e, 0xc8, 0xf7, 0x94, 0x26, 0x29, 0xb3, 0x3b, 0xdf, 0x77, 0xee, 0xe6, 0x5c, 0x78,
0xec, 0xc7, 0x61, 0x37, 0xd9, 0xee, 0x9b, 0x76, 0x47, 0xa3, 0x9d, 0x0e, 0xb9, 0xf5, 0xb9, 0xfe,
0x63, 0x90, 0x7f, 0x2e, 0xcc, 0x11, 0x4a, 0x4b, 0x66, 0x96, 0x3d, 0x21, 0xab, 0x58, 0xb3, 0x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