|
|
@ -9,10 +9,8 @@ It is generated from these files: |
|
|
|
supplier.proto |
|
|
|
|
|
|
|
It has these top-level messages: |
|
|
|
GetRequest |
|
|
|
GetUuidRequest |
|
|
|
GetResponse |
|
|
|
BoolResponse |
|
|
|
Request |
|
|
|
Response |
|
|
|
*/ |
|
|
|
package supplierrpc |
|
|
|
|
|
|
@ -30,96 +28,79 @@ import protorpc "github.com/chai2010/protorpc" |
|
|
|
var _ = proto.Marshal |
|
|
|
var _ = math.Inf |
|
|
|
|
|
|
|
// 使用key查询
|
|
|
|
type GetRequest struct { |
|
|
|
Dbname *string `protobuf:"bytes,1,opt,name=dbname" json:"dbname,omitempty"` |
|
|
|
Id *string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` |
|
|
|
// 配置信息请求结构
|
|
|
|
type Request struct { |
|
|
|
Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` |
|
|
|
Time *string `protobuf:"bytes,2,opt,name=time" json:"time,omitempty"` |
|
|
|
Sign *string `protobuf:"bytes,3,opt,name=sign" json:"sign,omitempty"` |
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
} |
|
|
|
|
|
|
|
func (m *GetRequest) Reset() { *m = GetRequest{} } |
|
|
|
func (m *GetRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
func (*GetRequest) ProtoMessage() {} |
|
|
|
func (m *Request) Reset() { *m = Request{} } |
|
|
|
func (m *Request) String() string { return proto.CompactTextString(m) } |
|
|
|
func (*Request) ProtoMessage() {} |
|
|
|
|
|
|
|
func (m *GetRequest) GetDbname() string { |
|
|
|
if m != nil && m.Dbname != nil { |
|
|
|
return *m.Dbname |
|
|
|
func (m *Request) GetData() string { |
|
|
|
if m != nil && m.Data != nil { |
|
|
|
return *m.Data |
|
|
|
} |
|
|
|
return "" |
|
|
|
} |
|
|
|
|
|
|
|
func (m *GetRequest) GetId() string { |
|
|
|
if m != nil && m.Id != nil { |
|
|
|
return *m.Id |
|
|
|
func (m *Request) GetTime() string { |
|
|
|
if m != nil && m.Time != nil { |
|
|
|
return *m.Time |
|
|
|
} |
|
|
|
return "" |
|
|
|
} |
|
|
|
|
|
|
|
type GetUuidRequest struct { |
|
|
|
Dbname *string `protobuf:"bytes,1,opt,name=dbname" json:"dbname,omitempty"` |
|
|
|
Uuid *string `protobuf:"bytes,2,opt,name=uuid" json:"uuid,omitempty"` |
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
} |
|
|
|
|
|
|
|
func (m *GetUuidRequest) Reset() { *m = GetUuidRequest{} } |
|
|
|
func (m *GetUuidRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
func (*GetUuidRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
func (m *GetUuidRequest) GetDbname() string { |
|
|
|
if m != nil && m.Dbname != nil { |
|
|
|
return *m.Dbname |
|
|
|
} |
|
|
|
return "" |
|
|
|
} |
|
|
|
|
|
|
|
func (m *GetUuidRequest) GetUuid() string { |
|
|
|
if m != nil && m.Uuid != nil { |
|
|
|
return *m.Uuid |
|
|
|
func (m *Request) GetSign() string { |
|
|
|
if m != nil && m.Sign != nil { |
|
|
|
return *m.Sign |
|
|
|
} |
|
|
|
return "" |
|
|
|
} |
|
|
|
|
|
|
|
// 使用key查询响应结构
|
|
|
|
type GetResponse struct { |
|
|
|
Value []byte `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` |
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
// 配置信息响应结构
|
|
|
|
type Response struct { |
|
|
|
Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` |
|
|
|
Time *string `protobuf:"bytes,2,opt,name=time" json:"time,omitempty"` |
|
|
|
Sign *string `protobuf:"bytes,3,opt,name=sign" json:"sign,omitempty"` |
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
} |
|
|
|
|
|
|
|
func (m *GetResponse) Reset() { *m = GetResponse{} } |
|
|
|
func (m *GetResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
func (*GetResponse) ProtoMessage() {} |
|
|
|
func (m *Response) Reset() { *m = Response{} } |
|
|
|
func (m *Response) String() string { return proto.CompactTextString(m) } |
|
|
|
func (*Response) ProtoMessage() {} |
|
|
|
|
|
|
|
func (m *GetResponse) GetValue() []byte { |
|
|
|
if m != nil { |
|
|
|
return m.Value |
|
|
|
func (m *Response) GetData() string { |
|
|
|
if m != nil && m.Data != nil { |
|
|
|
return *m.Data |
|
|
|
} |
|
|
|
return nil |
|
|
|
return "" |
|
|
|
} |
|
|
|
|
|
|
|
// 使用key查询响应结构
|
|
|
|
type BoolResponse struct { |
|
|
|
Value *bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"` |
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
func (m *Response) GetTime() string { |
|
|
|
if m != nil && m.Time != nil { |
|
|
|
return *m.Time |
|
|
|
} |
|
|
|
return "" |
|
|
|
} |
|
|
|
|
|
|
|
func (m *BoolResponse) Reset() { *m = BoolResponse{} } |
|
|
|
func (m *BoolResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
func (*BoolResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
func (m *BoolResponse) GetValue() bool { |
|
|
|
if m != nil && m.Value != nil { |
|
|
|
return *m.Value |
|
|
|
func (m *Response) GetSign() string { |
|
|
|
if m != nil && m.Sign != nil { |
|
|
|
return *m.Sign |
|
|
|
} |
|
|
|
return false |
|
|
|
return "" |
|
|
|
} |
|
|
|
|
|
|
|
func init() { |
|
|
|
} |
|
|
|
|
|
|
|
type SupplierService interface { |
|
|
|
Get(in *GetRequest, out *GetResponse) error |
|
|
|
GetByUuid(in *GetUuidRequest, out *GetResponse) error |
|
|
|
IsOpen(in *GetRequest, out *BoolResponse) error |
|
|
|
Get(in *Request, out *Response) error |
|
|
|
GetByUuid(in *Request, out *Response) error |
|
|
|
IsOpen(in *Request, out *Response) error |
|
|
|
} |
|
|
|
|
|
|
|
// AcceptSupplierServiceClient accepts connections on the listener and serves requests
|
|
|
@ -191,13 +172,13 @@ func NewSupplierServiceClient(conn io.ReadWriteCloser) (*SupplierServiceClient, |
|
|
|
return &SupplierServiceClient{c}, c |
|
|
|
} |
|
|
|
|
|
|
|
func (c *SupplierServiceClient) Get(in *GetRequest, out *GetResponse) error { |
|
|
|
func (c *SupplierServiceClient) Get(in *Request, out *Response) error { |
|
|
|
return c.Call("SupplierService.Get", in, out) |
|
|
|
} |
|
|
|
func (c *SupplierServiceClient) GetByUuid(in *GetUuidRequest, out *GetResponse) error { |
|
|
|
func (c *SupplierServiceClient) GetByUuid(in *Request, out *Response) error { |
|
|
|
return c.Call("SupplierService.GetByUuid", in, out) |
|
|
|
} |
|
|
|
func (c *SupplierServiceClient) IsOpen(in *GetRequest, out *BoolResponse) error { |
|
|
|
func (c *SupplierServiceClient) IsOpen(in *Request, out *Response) error { |
|
|
|
return c.Call("SupplierService.IsOpen", in, out) |
|
|
|
} |
|
|
|
|
|
|
|