central_api_gateway/data/data.pb.go
2017-05-20 17:17:34 +09:00

223 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:
Empty
CollectedData
*/
package data
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
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 Empty struct {
}
func (m *Empty) Reset() { *m = Empty{} }
func (m *Empty) String() string { return proto.CompactTextString(m) }
func (*Empty) ProtoMessage() {}
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
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{1} }
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((*Empty)(nil), "Empty")
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) (*Empty, error)
SendMeta(ctx context.Context, in *CollectedData, opts ...grpc.CallOption) (*Empty, 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) (*Empty, error) {
out := new(Empty)
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) (*Empty, error) {
out := new(Empty)
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) (*Empty, error)
SendMeta(context.Context, *CollectedData) (*Empty, 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{
// 244 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x50, 0xc1, 0x4a, 0xc3, 0x40,
0x14, 0x74, 0x9b, 0xa4, 0x35, 0x4f, 0x14, 0x79, 0x78, 0x58, 0x82, 0x48, 0x28, 0x22, 0x39, 0x48,
0x0e, 0xf5, 0xa0, 0x78, 0xb5, 0x3d, 0xf4, 0xe0, 0x25, 0xf8, 0x03, 0xcf, 0xee, 0x53, 0x83, 0x71,
0x53, 0x76, 0x9f, 0x42, 0x7e, 0xd9, 0xaf, 0x90, 0x6c, 0x6b, 0x35, 0x87, 0x5e, 0x96, 0x9d, 0x37,
0xc3, 0x30, 0x33, 0x00, 0x86, 0x84, 0xca, 0xb5, 0x6b, 0xa5, 0x9d, 0x4e, 0x20, 0x59, 0x7c, 0xac,
0xa5, 0x9b, 0x7e, 0x2b, 0x38, 0x7e, 0x68, 0x9b, 0x86,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