2017-04-12 11:14:09 +00:00
|
|
|
// Code generated by protoc-gen-go.
|
|
|
|
// source: grpc.proto
|
|
|
|
// DO NOT EDIT!
|
|
|
|
|
|
|
|
/*
|
|
|
|
Package grpc is a generated protocol buffer package.
|
|
|
|
|
|
|
|
It is generated from these files:
|
|
|
|
grpc.proto
|
|
|
|
|
|
|
|
It has these top-level messages:
|
2017-04-14 09:30:38 +00:00
|
|
|
Empty
|
|
|
|
Boolean
|
2017-04-12 11:14:09 +00:00
|
|
|
InputArray
|
2017-04-12 11:46:42 +00:00
|
|
|
Init
|
2017-04-12 11:14:09 +00:00
|
|
|
Input
|
2017-04-27 10:42:46 +00:00
|
|
|
InputAdd
|
2017-04-12 11:14:09 +00:00
|
|
|
Output
|
|
|
|
*/
|
|
|
|
package grpc
|
|
|
|
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
|
|
|
|
|
|
|
import (
|
|
|
|
context "golang.org/x/net/context"
|
|
|
|
grpc1 "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 Crawlers int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
Crawlers_HEALTH_ACTIVEDIRECTORY Crawlers = 0
|
|
|
|
Crawlers_HEALTH_DNS Crawlers = 1
|
|
|
|
Crawlers_HEALTH_FTP Crawlers = 2
|
|
|
|
Crawlers_HEALTH_FTPS Crawlers = 3
|
|
|
|
Crawlers_HEALTH_IMAP Crawlers = 4
|
|
|
|
Crawlers_HEALTH_LDAP Crawlers = 5
|
|
|
|
Crawlers_HEALTH_MONGODB Crawlers = 6
|
|
|
|
Crawlers_HEALTH_MSSQL Crawlers = 7
|
|
|
|
Crawlers_HEALTH_MYSQL Crawlers = 8
|
|
|
|
Crawlers_HEALTH_MARIADB Crawlers = 9
|
|
|
|
Crawlers_HEALTH_PGSQL Crawlers = 10
|
|
|
|
Crawlers_HEALTH_NETBIOS Crawlers = 11
|
|
|
|
Crawlers_HEALTH_ORACLE Crawlers = 12
|
|
|
|
Crawlers_HEALTH_POP3 Crawlers = 13
|
|
|
|
Crawlers_HEALTH_REDIS Crawlers = 14
|
|
|
|
Crawlers_HEALTH_RMI Crawlers = 15
|
|
|
|
Crawlers_HEALTH_SMB Crawlers = 16
|
|
|
|
Crawlers_HEALTH_SMTP Crawlers = 17
|
|
|
|
Crawlers_HEALTH_SNMPV2C Crawlers = 18
|
2017-04-13 03:00:28 +00:00
|
|
|
Crawlers_HEALTH_SNMPV3 Crawlers = 19
|
2017-04-12 11:14:09 +00:00
|
|
|
Crawlers_HEALTH_SSH Crawlers = 20
|
|
|
|
Crawlers_HEALTH_TELNET Crawlers = 21
|
|
|
|
Crawlers_HEALTH_WMI Crawlers = 22
|
2017-04-12 11:29:05 +00:00
|
|
|
Crawlers_HEALTH_CASSANDRA Crawlers = 23
|
|
|
|
Crawlers_HEALTH_HTTP Crawlers = 24
|
2017-04-13 03:00:28 +00:00
|
|
|
Crawlers_SQL Crawlers = 25
|
|
|
|
Crawlers_SNMP Crawlers = 26
|
|
|
|
Crawlers_WMI Crawlers = 27
|
|
|
|
Crawlers_JMX Crawlers = 28
|
|
|
|
Crawlers_REDIS Crawlers = 29
|
2017-04-13 03:36:17 +00:00
|
|
|
Crawlers_MONGODB Crawlers = 30
|
2017-04-12 11:14:09 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var Crawlers_name = map[int32]string{
|
|
|
|
0: "HEALTH_ACTIVEDIRECTORY",
|
|
|
|
1: "HEALTH_DNS",
|
|
|
|
2: "HEALTH_FTP",
|
|
|
|
3: "HEALTH_FTPS",
|
|
|
|
4: "HEALTH_IMAP",
|
|
|
|
5: "HEALTH_LDAP",
|
|
|
|
6: "HEALTH_MONGODB",
|
|
|
|
7: "HEALTH_MSSQL",
|
|
|
|
8: "HEALTH_MYSQL",
|
|
|
|
9: "HEALTH_MARIADB",
|
|
|
|
10: "HEALTH_PGSQL",
|
|
|
|
11: "HEALTH_NETBIOS",
|
|
|
|
12: "HEALTH_ORACLE",
|
|
|
|
13: "HEALTH_POP3",
|
|
|
|
14: "HEALTH_REDIS",
|
|
|
|
15: "HEALTH_RMI",
|
|
|
|
16: "HEALTH_SMB",
|
|
|
|
17: "HEALTH_SMTP",
|
|
|
|
18: "HEALTH_SNMPV2C",
|
2017-04-13 03:00:28 +00:00
|
|
|
19: "HEALTH_SNMPV3",
|
2017-04-12 11:14:09 +00:00
|
|
|
20: "HEALTH_SSH",
|
|
|
|
21: "HEALTH_TELNET",
|
|
|
|
22: "HEALTH_WMI",
|
2017-04-12 11:29:05 +00:00
|
|
|
23: "HEALTH_CASSANDRA",
|
|
|
|
24: "HEALTH_HTTP",
|
2017-04-13 03:00:28 +00:00
|
|
|
25: "SQL",
|
|
|
|
26: "SNMP",
|
|
|
|
27: "WMI",
|
|
|
|
28: "JMX",
|
|
|
|
29: "REDIS",
|
2017-04-13 03:36:17 +00:00
|
|
|
30: "MONGODB",
|
2017-04-12 11:14:09 +00:00
|
|
|
}
|
|
|
|
var Crawlers_value = map[string]int32{
|
|
|
|
"HEALTH_ACTIVEDIRECTORY": 0,
|
|
|
|
"HEALTH_DNS": 1,
|
|
|
|
"HEALTH_FTP": 2,
|
|
|
|
"HEALTH_FTPS": 3,
|
|
|
|
"HEALTH_IMAP": 4,
|
|
|
|
"HEALTH_LDAP": 5,
|
|
|
|
"HEALTH_MONGODB": 6,
|
|
|
|
"HEALTH_MSSQL": 7,
|
|
|
|
"HEALTH_MYSQL": 8,
|
|
|
|
"HEALTH_MARIADB": 9,
|
|
|
|
"HEALTH_PGSQL": 10,
|
|
|
|
"HEALTH_NETBIOS": 11,
|
|
|
|
"HEALTH_ORACLE": 12,
|
|
|
|
"HEALTH_POP3": 13,
|
|
|
|
"HEALTH_REDIS": 14,
|
|
|
|
"HEALTH_RMI": 15,
|
|
|
|
"HEALTH_SMB": 16,
|
|
|
|
"HEALTH_SMTP": 17,
|
|
|
|
"HEALTH_SNMPV2C": 18,
|
2017-04-13 03:00:28 +00:00
|
|
|
"HEALTH_SNMPV3": 19,
|
2017-04-12 11:14:09 +00:00
|
|
|
"HEALTH_SSH": 20,
|
|
|
|
"HEALTH_TELNET": 21,
|
|
|
|
"HEALTH_WMI": 22,
|
2017-04-12 11:29:05 +00:00
|
|
|
"HEALTH_CASSANDRA": 23,
|
|
|
|
"HEALTH_HTTP": 24,
|
2017-04-13 03:00:28 +00:00
|
|
|
"SQL": 25,
|
|
|
|
"SNMP": 26,
|
|
|
|
"WMI": 27,
|
|
|
|
"JMX": 28,
|
|
|
|
"REDIS": 29,
|
2017-04-13 03:36:17 +00:00
|
|
|
"MONGODB": 30,
|
2017-04-12 11:14:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x Crawlers) String() string {
|
|
|
|
return proto.EnumName(Crawlers_name, int32(x))
|
|
|
|
}
|
|
|
|
func (Crawlers) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
|
2017-04-14 09:30:38 +00:00
|
|
|
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 Boolean struct {
|
|
|
|
Check bool `protobuf:"varint,1,opt,name=check" json:"check,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Boolean) Reset() { *m = Boolean{} }
|
|
|
|
func (m *Boolean) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Boolean) ProtoMessage() {}
|
|
|
|
func (*Boolean) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
|
|
|
|
func (m *Boolean) GetCheck() bool {
|
|
|
|
if m != nil {
|
|
|
|
return m.Check
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2017-04-12 11:14:09 +00:00
|
|
|
type InputArray struct {
|
2017-04-12 11:46:42 +00:00
|
|
|
In []*Init `protobuf:"bytes,1,rep,name=in" json:"in,omitempty"`
|
2017-04-12 11:14:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InputArray) Reset() { *m = InputArray{} }
|
|
|
|
func (m *InputArray) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*InputArray) ProtoMessage() {}
|
2017-04-14 09:30:38 +00:00
|
|
|
func (*InputArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
2017-04-12 11:14:09 +00:00
|
|
|
|
2017-04-12 11:46:42 +00:00
|
|
|
func (m *InputArray) GetIn() []*Init {
|
2017-04-12 11:14:09 +00:00
|
|
|
if m != nil {
|
|
|
|
return m.In
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-04-12 11:46:42 +00:00
|
|
|
type Init struct {
|
|
|
|
Name Crawlers `protobuf:"varint,1,opt,name=name,enum=Crawlers" json:"name,omitempty"`
|
2017-04-27 10:42:46 +00:00
|
|
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
2017-04-12 11:46:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Init) Reset() { *m = Init{} }
|
|
|
|
func (m *Init) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Init) ProtoMessage() {}
|
2017-04-14 09:30:38 +00:00
|
|
|
func (*Init) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
2017-04-12 11:46:42 +00:00
|
|
|
|
|
|
|
func (m *Init) GetName() Crawlers {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return Crawlers_HEALTH_ACTIVEDIRECTORY
|
|
|
|
}
|
|
|
|
|
2017-04-27 10:42:46 +00:00
|
|
|
func (m *Init) GetData() []byte {
|
2017-04-12 11:46:42 +00:00
|
|
|
if m != nil {
|
2017-04-27 10:42:46 +00:00
|
|
|
return m.Data
|
2017-04-12 11:46:42 +00:00
|
|
|
}
|
2017-04-27 10:42:46 +00:00
|
|
|
return nil
|
2017-04-12 11:46:42 +00:00
|
|
|
}
|
|
|
|
|
2017-04-12 11:14:09 +00:00
|
|
|
type Input struct {
|
|
|
|
Name Crawlers `protobuf:"varint,1,opt,name=name,enum=Crawlers" json:"name,omitempty"`
|
|
|
|
Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Input) Reset() { *m = Input{} }
|
|
|
|
func (m *Input) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Input) ProtoMessage() {}
|
2017-04-14 09:30:38 +00:00
|
|
|
func (*Input) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
|
2017-04-12 11:14:09 +00:00
|
|
|
|
|
|
|
func (m *Input) GetName() Crawlers {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return Crawlers_HEALTH_ACTIVEDIRECTORY
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Input) GetId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2017-04-27 10:42:46 +00:00
|
|
|
type InputAdd struct {
|
|
|
|
Name Crawlers `protobuf:"varint,1,opt,name=name,enum=Crawlers" json:"name,omitempty"`
|
|
|
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InputAdd) Reset() { *m = InputAdd{} }
|
|
|
|
func (m *InputAdd) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*InputAdd) ProtoMessage() {}
|
|
|
|
func (*InputAdd) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
|
|
|
|
|
|
|
|
func (m *InputAdd) GetName() Crawlers {
|
|
|
|
if m != nil {
|
|
|
|
return m.Name
|
|
|
|
}
|
|
|
|
return Crawlers_HEALTH_ACTIVEDIRECTORY
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *InputAdd) GetData() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Data
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2017-04-13 03:00:28 +00:00
|
|
|
// response models
|
2017-04-12 11:14:09 +00:00
|
|
|
type Output struct {
|
|
|
|
StartDate int64 `protobuf:"varint,1,opt,name=startDate" json:"startDate,omitempty"`
|
|
|
|
EndDate int64 `protobuf:"varint,2,opt,name=endDate" json:"endDate,omitempty"`
|
|
|
|
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Output) Reset() { *m = Output{} }
|
|
|
|
func (m *Output) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Output) ProtoMessage() {}
|
2017-04-27 10:42:46 +00:00
|
|
|
func (*Output) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
|
2017-04-12 11:14:09 +00:00
|
|
|
|
|
|
|
func (m *Output) GetStartDate() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.StartDate
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Output) GetEndDate() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.EndDate
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Output) GetData() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Data
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
2017-04-14 09:30:38 +00:00
|
|
|
proto.RegisterType((*Empty)(nil), "Empty")
|
|
|
|
proto.RegisterType((*Boolean)(nil), "Boolean")
|
2017-04-12 11:14:09 +00:00
|
|
|
proto.RegisterType((*InputArray)(nil), "InputArray")
|
2017-04-12 11:46:42 +00:00
|
|
|
proto.RegisterType((*Init)(nil), "Init")
|
2017-04-12 11:14:09 +00:00
|
|
|
proto.RegisterType((*Input)(nil), "Input")
|
2017-04-27 10:42:46 +00:00
|
|
|
proto.RegisterType((*InputAdd)(nil), "InputAdd")
|
2017-04-12 11:14:09 +00:00
|
|
|
proto.RegisterType((*Output)(nil), "Output")
|
|
|
|
proto.RegisterEnum("Crawlers", Crawlers_name, Crawlers_value)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ context.Context
|
|
|
|
var _ grpc1.ClientConn
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
2017-04-13 03:00:28 +00:00
|
|
|
const _ = grpc1.SupportPackageIsVersion4
|
2017-04-12 11:14:09 +00:00
|
|
|
|
|
|
|
// Client API for Config service
|
|
|
|
|
|
|
|
type ConfigClient interface {
|
2017-04-27 10:42:46 +00:00
|
|
|
Add(ctx context.Context, in *InputAdd, opts ...grpc1.CallOption) (*Output, error)
|
2017-04-12 11:14:09 +00:00
|
|
|
Remove(ctx context.Context, in *Input, opts ...grpc1.CallOption) (*Output, error)
|
|
|
|
Init(ctx context.Context, in *InputArray, opts ...grpc1.CallOption) (*Output, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type configClient struct {
|
|
|
|
cc *grpc1.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewConfigClient(cc *grpc1.ClientConn) ConfigClient {
|
|
|
|
return &configClient{cc}
|
|
|
|
}
|
|
|
|
|
2017-04-27 10:42:46 +00:00
|
|
|
func (c *configClient) Add(ctx context.Context, in *InputAdd, opts ...grpc1.CallOption) (*Output, error) {
|
2017-04-12 11:14:09 +00:00
|
|
|
out := new(Output)
|
|
|
|
err := grpc1.Invoke(ctx, "/Config/Add", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *configClient) Remove(ctx context.Context, in *Input, opts ...grpc1.CallOption) (*Output, error) {
|
|
|
|
out := new(Output)
|
|
|
|
err := grpc1.Invoke(ctx, "/Config/Remove", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *configClient) Init(ctx context.Context, in *InputArray, opts ...grpc1.CallOption) (*Output, error) {
|
|
|
|
out := new(Output)
|
|
|
|
err := grpc1.Invoke(ctx, "/Config/Init", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Server API for Config service
|
|
|
|
|
|
|
|
type ConfigServer interface {
|
2017-04-27 10:42:46 +00:00
|
|
|
Add(context.Context, *InputAdd) (*Output, error)
|
2017-04-12 11:14:09 +00:00
|
|
|
Remove(context.Context, *Input) (*Output, error)
|
|
|
|
Init(context.Context, *InputArray) (*Output, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterConfigServer(s *grpc1.Server, srv ConfigServer) {
|
|
|
|
s.RegisterService(&_Config_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Config_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) {
|
2017-04-27 10:42:46 +00:00
|
|
|
in := new(InputAdd)
|
2017-04-12 11:14:09 +00:00
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ConfigServer).Add(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc1.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Config/Add",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
2017-04-27 10:42:46 +00:00
|
|
|
return srv.(ConfigServer).Add(ctx, req.(*InputAdd))
|
2017-04-12 11:14:09 +00:00
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Config_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(Input)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ConfigServer).Remove(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc1.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Config/Remove",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ConfigServer).Remove(ctx, req.(*Input))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Config_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(InputArray)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(ConfigServer).Init(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc1.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Config/Init",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(ConfigServer).Init(ctx, req.(*InputArray))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _Config_serviceDesc = grpc1.ServiceDesc{
|
|
|
|
ServiceName: "Config",
|
|
|
|
HandlerType: (*ConfigServer)(nil),
|
|
|
|
Methods: []grpc1.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Add",
|
|
|
|
Handler: _Config_Add_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "Remove",
|
|
|
|
Handler: _Config_Remove_Handler,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
MethodName: "Init",
|
|
|
|
Handler: _Config_Init_Handler,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Streams: []grpc1.StreamDesc{},
|
|
|
|
Metadata: "grpc.proto",
|
|
|
|
}
|
|
|
|
|
|
|
|
// Client API for Data service
|
|
|
|
|
|
|
|
type DataClient interface {
|
|
|
|
Get(ctx context.Context, in *Input, opts ...grpc1.CallOption) (*Output, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type dataClient struct {
|
|
|
|
cc *grpc1.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewDataClient(cc *grpc1.ClientConn) DataClient {
|
|
|
|
return &dataClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *dataClient) Get(ctx context.Context, in *Input, opts ...grpc1.CallOption) (*Output, error) {
|
|
|
|
out := new(Output)
|
|
|
|
err := grpc1.Invoke(ctx, "/Data/Get", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Server API for Data service
|
|
|
|
|
|
|
|
type DataServer interface {
|
|
|
|
Get(context.Context, *Input) (*Output, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterDataServer(s *grpc1.Server, srv DataServer) {
|
|
|
|
s.RegisterService(&_Data_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Data_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(Input)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(DataServer).Get(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc1.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Data/Get",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(DataServer).Get(ctx, req.(*Input))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _Data_serviceDesc = grpc1.ServiceDesc{
|
|
|
|
ServiceName: "Data",
|
|
|
|
HandlerType: (*DataServer)(nil),
|
|
|
|
Methods: []grpc1.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Get",
|
|
|
|
Handler: _Data_Get_Handler,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Streams: []grpc1.StreamDesc{},
|
|
|
|
Metadata: "grpc.proto",
|
|
|
|
}
|
|
|
|
|
2017-04-14 09:30:38 +00:00
|
|
|
// Client API for Status service
|
|
|
|
|
|
|
|
type StatusClient interface {
|
|
|
|
Status(ctx context.Context, in *Empty, opts ...grpc1.CallOption) (*Boolean, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type statusClient struct {
|
|
|
|
cc *grpc1.ClientConn
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewStatusClient(cc *grpc1.ClientConn) StatusClient {
|
|
|
|
return &statusClient{cc}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *statusClient) Status(ctx context.Context, in *Empty, opts ...grpc1.CallOption) (*Boolean, error) {
|
|
|
|
out := new(Boolean)
|
|
|
|
err := grpc1.Invoke(ctx, "/Status/Status", in, out, c.cc, opts...)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return out, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Server API for Status service
|
|
|
|
|
|
|
|
type StatusServer interface {
|
|
|
|
Status(context.Context, *Empty) (*Boolean, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
func RegisterStatusServer(s *grpc1.Server, srv StatusServer) {
|
|
|
|
s.RegisterService(&_Status_serviceDesc, srv)
|
|
|
|
}
|
|
|
|
|
|
|
|
func _Status_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
in := new(Empty)
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
if interceptor == nil {
|
|
|
|
return srv.(StatusServer).Status(ctx, in)
|
|
|
|
}
|
|
|
|
info := &grpc1.UnaryServerInfo{
|
|
|
|
Server: srv,
|
|
|
|
FullMethod: "/Status/Status",
|
|
|
|
}
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
return srv.(StatusServer).Status(ctx, req.(*Empty))
|
|
|
|
}
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _Status_serviceDesc = grpc1.ServiceDesc{
|
|
|
|
ServiceName: "Status",
|
|
|
|
HandlerType: (*StatusServer)(nil),
|
|
|
|
Methods: []grpc1.MethodDesc{
|
|
|
|
{
|
|
|
|
MethodName: "Status",
|
|
|
|
Handler: _Status_Status_Handler,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Streams: []grpc1.StreamDesc{},
|
|
|
|
Metadata: "grpc.proto",
|
|
|
|
}
|
|
|
|
|
2017-04-12 11:14:09 +00:00
|
|
|
func init() { proto.RegisterFile("grpc.proto", fileDescriptor0) }
|
|
|
|
|
|
|
|
var fileDescriptor0 = []byte{
|
2017-04-27 10:42:46 +00:00
|
|
|
// 576 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x6f, 0xd3, 0x40,
|
|
|
|
0x10, 0x6d, 0x6c, 0xc7, 0x4e, 0x26, 0x6d, 0x3a, 0x1d, 0xda, 0x12, 0xd2, 0x0f, 0x22, 0x23, 0xa1,
|
|
|
|
0x8a, 0x83, 0x0f, 0xa9, 0x84, 0xc4, 0x81, 0x83, 0x63, 0x9b, 0xc6, 0x28, 0x8e, 0xcd, 0xae, 0x55,
|
|
|
|
0xe8, 0x09, 0xb9, 0x8d, 0x29, 0x11, 0xad, 0x13, 0xb9, 0x1b, 0x50, 0xff, 0x05, 0x3f, 0x19, 0xf9,
|
|
|
|
0x23, 0xcd, 0x1e, 0x90, 0x90, 0xb8, 0xcd, 0x7b, 0x6f, 0xf6, 0xbd, 0x5d, 0x7b, 0x77, 0x00, 0x6e,
|
|
|
|
0xf3, 0xe5, 0x8d, 0xb5, 0xcc, 0x17, 0x62, 0x61, 0x1a, 0xd0, 0xf4, 0xee, 0x97, 0xe2, 0xd1, 0x7c,
|
|
|
|
0x09, 0xc6, 0x68, 0xb1, 0xb8, 0x4b, 0x93, 0x8c, 0xf6, 0xa1, 0x79, 0xf3, 0x3d, 0xbd, 0xf9, 0xd1,
|
|
|
|
0x6b, 0x0c, 0x1a, 0x67, 0x2d, 0x56, 0x01, 0xf3, 0x15, 0x80, 0x9f, 0x2d, 0x57, 0xc2, 0xce, 0xf3,
|
|
|
|
0xe4, 0x91, 0x0e, 0x40, 0x99, 0x67, 0xbd, 0xc6, 0x40, 0x3d, 0xeb, 0x0c, 0x9b, 0x96, 0x9f, 0xcd,
|
|
|
|
0x05, 0x53, 0xe6, 0x99, 0xf9,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