216 lines
7.1 KiB
Go
216 lines
7.1 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: data.proto
|
|
|
|
/*
|
|
Package data is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
data.proto
|
|
|
|
It has these top-level messages:
|
|
CollectedData
|
|
*/
|
|
package data
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import commons "loafle.com/overflow/central_api_gateway/commons"
|
|
|
|
import (
|
|
context "golang.org/x/net/context"
|
|
grpc "google.golang.org/grpc"
|
|
)
|
|
|
|
// 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.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type CollectedData struct {
|
|
AgentId string `protobuf:"bytes,1,opt,name=agentId" json:"agentId,omitempty"`
|
|
SensorId string `protobuf:"bytes,2,opt,name=sensorId" json:"sensorId,omitempty"`
|
|
Data map[string]string `protobuf:"bytes,3,rep,name=data" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
StartDate int64 `protobuf:"varint,4,opt,name=startDate" json:"startDate,omitempty"`
|
|
FinishDate int64 `protobuf:"varint,5,opt,name=finishDate" json:"finishDate,omitempty"`
|
|
}
|
|
|
|
func (m *CollectedData) Reset() { *m = CollectedData{} }
|
|
func (m *CollectedData) String() string { return proto.CompactTextString(m) }
|
|
func (*CollectedData) ProtoMessage() {}
|
|
func (*CollectedData) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *CollectedData) GetAgentId() string {
|
|
if m != nil {
|
|
return m.AgentId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *CollectedData) GetSensorId() string {
|
|
if m != nil {
|
|
return m.SensorId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *CollectedData) GetData() map[string]string {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CollectedData) GetStartDate() int64 {
|
|
if m != nil {
|
|
return m.StartDate
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *CollectedData) GetFinishDate() int64 {
|
|
if m != nil {
|
|
return m.FinishDate
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*CollectedData)(nil), "CollectedData")
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// Client API for Data service
|
|
|
|
type DataClient interface {
|
|
SendMetric(ctx context.Context, in *CollectedData, opts ...grpc.CallOption) (*commons.Void, error)
|
|
SendMeta(ctx context.Context, in *CollectedData, opts ...grpc.CallOption) (*commons.Void, error)
|
|
}
|
|
|
|
type dataClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewDataClient(cc *grpc.ClientConn) DataClient {
|
|
return &dataClient{cc}
|
|
}
|
|
|
|
func (c *dataClient) SendMetric(ctx context.Context, in *CollectedData, opts ...grpc.CallOption) (*commons.Void, error) {
|
|
out := new(commons.Void)
|
|
err := grpc.Invoke(ctx, "/Data/sendMetric", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *dataClient) SendMeta(ctx context.Context, in *CollectedData, opts ...grpc.CallOption) (*commons.Void, error) {
|
|
out := new(commons.Void)
|
|
err := grpc.Invoke(ctx, "/Data/sendMeta", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for Data service
|
|
|
|
type DataServer interface {
|
|
SendMetric(context.Context, *CollectedData) (*commons.Void, error)
|
|
SendMeta(context.Context, *CollectedData) (*commons.Void, error)
|
|
}
|
|
|
|
func RegisterDataServer(s *grpc.Server, srv DataServer) {
|
|
s.RegisterService(&_Data_serviceDesc, srv)
|
|
}
|
|
|
|
func _Data_SendMetric_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CollectedData)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DataServer).SendMetric(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/Data/SendMetric",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DataServer).SendMetric(ctx, req.(*CollectedData))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Data_SendMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CollectedData)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DataServer).SendMeta(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/Data/SendMeta",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DataServer).SendMeta(ctx, req.(*CollectedData))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Data_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "Data",
|
|
HandlerType: (*DataServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "sendMetric",
|
|
Handler: _Data_SendMetric_Handler,
|
|
},
|
|
{
|
|
MethodName: "sendMeta",
|
|
Handler: _Data_SendMeta_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "data.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("data.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 281 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x90, 0x4f, 0x4b, 0x03, 0x31,
|
|
0x10, 0xc5, 0xdd, 0x6e, 0xab, 0x76, 0x44, 0x91, 0xe0, 0x21, 0x2c, 0x22, 0xa5, 0x22, 0xf4, 0x20,
|
|
0xbb, 0x50, 0x0f, 0x8a, 0xe0, 0xc9, 0x7a, 0xe8, 0xc1, 0xcb, 0x1e, 0xbc, 0x96, 0x71, 0x33, 0x5b,
|
|
0x17, 0xb3, 0x49, 0x49, 0xc6, 0x96, 0xfd, 0xca, 0x7e, 0x0a, 0xd9, 0xf4, 0x8f, 0xf6, 0xe0, 0x25,
|
|
0xc9, 0x9b, 0xf7, 0x32, 0xfc, 0x66, 0x00, 0x14, 0x32, 0xa6, 0x0b, 0x67, 0xd9, 0x26, 0x4f, 0xda,
|
|
0x62, 0xa9, 0x29, 0x2d, 0x6c, 0x9d, 0xd9, 0x25, 0xb9, 0x52, 0xdb, 0x55, 0x56, 0x90, 0x61, 0x87,
|
|
0x7a, 0x86, 0x8b, 0x6a, 0x36, 0x47, 0xa6, 0x15, 0x36, 0x59, 0x61, 0xeb, 0xda, 0x1a, 0xbf, 0xbd,
|
|
0xd7, 0xdf, 0x87, 0xdf, 0x11, 0x9c, 0x3e, 0x5b, 0xad, 0xa9, 0x60, 0x52, 0x13, 0x64, 0x14, 0x12,
|
|
0x8e, 0x70, 0x4e, 0x86, 0xa7, 0x4a, 0x46, 0x83, 0x68, 0xd4, 0xcf, 0xb7, 0x52, 0x24, 0x70, 0xec,
|
|
0xc9, 0x78, 0xeb, 0x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