184 lines
6.2 KiB
Go
184 lines
6.2 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: task.proto
|
|
|
|
/*
|
|
Package task is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
task.proto
|
|
|
|
It has these top-level messages:
|
|
TaskInfo
|
|
TaskList
|
|
*/
|
|
package task
|
|
|
|
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 TaskInfo struct {
|
|
Command commons.TaskEventType `protobuf:"varint,1,opt,name=command,enum=TaskEventType" json:"command,omitempty"`
|
|
TaskId string `protobuf:"bytes,2,opt,name=taskId" json:"taskId,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"`
|
|
}
|
|
|
|
func (m *TaskInfo) Reset() { *m = TaskInfo{} }
|
|
func (m *TaskInfo) String() string { return proto.CompactTextString(m) }
|
|
func (*TaskInfo) ProtoMessage() {}
|
|
func (*TaskInfo) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *TaskInfo) GetCommand() commons.TaskEventType {
|
|
if m != nil {
|
|
return m.Command
|
|
}
|
|
return commons.TaskEventType_TASK_POL_INTERVAL_UPDATE
|
|
}
|
|
|
|
func (m *TaskInfo) GetTaskId() string {
|
|
if m != nil {
|
|
return m.TaskId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *TaskInfo) GetData() map[string]string {
|
|
if m != nil {
|
|
return m.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type TaskList struct {
|
|
TaskList []*TaskInfo `protobuf:"bytes,1,rep,name=taskList" json:"taskList,omitempty"`
|
|
}
|
|
|
|
func (m *TaskList) Reset() { *m = TaskList{} }
|
|
func (m *TaskList) String() string { return proto.CompactTextString(m) }
|
|
func (*TaskList) ProtoMessage() {}
|
|
func (*TaskList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
func (m *TaskList) GetTaskList() []*TaskInfo {
|
|
if m != nil {
|
|
return m.TaskList
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*TaskInfo)(nil), "TaskInfo")
|
|
proto.RegisterType((*TaskList)(nil), "TaskList")
|
|
}
|
|
|
|
// 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 Task service
|
|
|
|
type TaskClient interface {
|
|
RequestTask(ctx context.Context, in *commons.Void, opts ...grpc.CallOption) (*TaskList, error)
|
|
}
|
|
|
|
type taskClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewTaskClient(cc *grpc.ClientConn) TaskClient {
|
|
return &taskClient{cc}
|
|
}
|
|
|
|
func (c *taskClient) RequestTask(ctx context.Context, in *commons.Void, opts ...grpc.CallOption) (*TaskList, error) {
|
|
out := new(TaskList)
|
|
err := grpc.Invoke(ctx, "/Task/requestTask", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for Task service
|
|
|
|
type TaskServer interface {
|
|
RequestTask(context.Context, *commons.Void) (*TaskList, error)
|
|
}
|
|
|
|
func RegisterTaskServer(s *grpc.Server, srv TaskServer) {
|
|
s.RegisterService(&_Task_serviceDesc, srv)
|
|
}
|
|
|
|
func _Task_RequestTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(commons.Void)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(TaskServer).RequestTask(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/Task/RequestTask",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(TaskServer).RequestTask(ctx, req.(*commons.Void))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Task_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "Task",
|
|
HandlerType: (*TaskServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "requestTask",
|
|
Handler: _Task_RequestTask_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "task.proto",
|
|
}
|
|
|
|
func init() { proto.RegisterFile("task.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 271 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0x4f, 0x4b, 0xc3, 0x40,
|
|
0x10, 0xc5, 0xdd, 0xfe, 0xb3, 0x99, 0x42, 0x91, 0x55, 0x24, 0xf4, 0x54, 0x03, 0x62, 0xbc, 0x6c,
|
|
0x30, 0x1e, 0x14, 0xc1, 0x9b, 0x3d, 0x14, 0x3c, 0x85, 0xe2, 0xb5, 0x8c, 0xc9, 0x46, 0x42, 0x92,
|
|
0xdd, 0x98, 0x4c, 0x53, 0xf2, 0xa5, 0xfc, 0x8c, 0xb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