|
@@ -138,6 +138,46 @@ func (m *StringRepData) GetData() string {
|
|
|
return ""
|
|
|
}
|
|
|
|
|
|
+//标准字符串请求
|
|
|
+type StringReqData struct {
|
|
|
+ Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *StringReqData) Reset() { *m = StringReqData{} }
|
|
|
+func (m *StringReqData) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*StringReqData) ProtoMessage() {}
|
|
|
+func (*StringReqData) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_a0b84a42fa06f626, []int{2}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *StringReqData) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_StringReqData.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *StringReqData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_StringReqData.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *StringReqData) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_StringReqData.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *StringReqData) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_StringReqData.Size(m)
|
|
|
+}
|
|
|
+func (m *StringReqData) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_StringReqData.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_StringReqData proto.InternalMessageInfo
|
|
|
+
|
|
|
+func (m *StringReqData) GetData() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.Data
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
//
|
|
|
type ApplyReqData struct {
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
@@ -151,7 +191,7 @@ func (m *ApplyReqData) Reset() { *m = ApplyReqData{} }
|
|
|
func (m *ApplyReqData) String() string { return proto.CompactTextString(m) }
|
|
|
func (*ApplyReqData) ProtoMessage() {}
|
|
|
func (*ApplyReqData) Descriptor() ([]byte, []int) {
|
|
|
- return fileDescriptor_a0b84a42fa06f626, []int{2}
|
|
|
+ return fileDescriptor_a0b84a42fa06f626, []int{3}
|
|
|
}
|
|
|
|
|
|
func (m *ApplyReqData) XXX_Unmarshal(b []byte) error {
|
|
@@ -198,7 +238,7 @@ func (m *ApplyRepData) Reset() { *m = ApplyRepData{} }
|
|
|
func (m *ApplyRepData) String() string { return proto.CompactTextString(m) }
|
|
|
func (*ApplyRepData) ProtoMessage() {}
|
|
|
func (*ApplyRepData) Descriptor() ([]byte, []int) {
|
|
|
- return fileDescriptor_a0b84a42fa06f626, []int{3}
|
|
|
+ return fileDescriptor_a0b84a42fa06f626, []int{4}
|
|
|
}
|
|
|
|
|
|
func (m *ApplyRepData) XXX_Unmarshal(b []byte) error {
|
|
@@ -236,6 +276,7 @@ func (m *ApplyRepData) GetResourceId() string {
|
|
|
func init() {
|
|
|
proto.RegisterType((*ServiceMeta)(nil), "proto.ServiceMeta")
|
|
|
proto.RegisterType((*StringRepData)(nil), "proto.StringRepData")
|
|
|
+ proto.RegisterType((*StringReqData)(nil), "proto.StringReqData")
|
|
|
proto.RegisterType((*ApplyReqData)(nil), "proto.ApplyReqData")
|
|
|
proto.RegisterType((*ApplyRepData)(nil), "proto.ApplyRepData")
|
|
|
}
|
|
@@ -245,25 +286,25 @@ func init() {
|
|
|
}
|
|
|
|
|
|
var fileDescriptor_a0b84a42fa06f626 = []byte{
|
|
|
- // 278 bytes of a gzipped FileDescriptorProto
|
|
|
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x50, 0x3f, 0x4f, 0xfb, 0x30,
|
|
|
- 0x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x7c, 0x7a, 0xbc, 0x1c, 0x04, 0x71, 0x13, 0xd3, 0x3d, 0x32, 0x98, 0xee, 0x5d, 0xc4, 0x86, 0xa4,
|
|
|
+ 0x21, 0xdc, 0xff, 0x6f, 0xef, 0x3b, 0xb0, 0x6d, 0x73, 0xe2, 0xe9, 0xe5, 0x4f, 0x00, 0x00, 0x00,
|
|
|
+ 0xff, 0xff, 0x80, 0x2d, 0x4a, 0xbc, 0x4d, 0x02, 0x00, 0x00,
|
|
|
}
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
@@ -285,7 +326,7 @@ type ServiceClient interface {
|
|
|
//申请服务
|
|
|
Apply(ctx context.Context, in *ApplyReqData, opts ...grpc.CallOption) (*ApplyRepData, error)
|
|
|
//释放服务
|
|
|
- Release(ctx context.Context, in *ApplyRepData, opts ...grpc.CallOption) (*StringRepData, error)
|
|
|
+ Release(ctx context.Context, in *StringReqData, opts ...grpc.CallOption) (*StringRepData, error)
|
|
|
}
|
|
|
|
|
|
type serviceClient struct {
|
|
@@ -323,7 +364,7 @@ func (c *serviceClient) Apply(ctx context.Context, in *ApplyReqData, opts ...grp
|
|
|
return out, nil
|
|
|
}
|
|
|
|
|
|
-func (c *serviceClient) Release(ctx context.Context, in *ApplyRepData, opts ...grpc.CallOption) (*StringRepData, error) {
|
|
|
+func (c *serviceClient) Release(ctx context.Context, in *StringReqData, opts ...grpc.CallOption) (*StringRepData, error) {
|
|
|
out := new(StringRepData)
|
|
|
err := c.cc.Invoke(ctx, "/proto.Service/Release", in, out, opts...)
|
|
|
if err != nil {
|
|
@@ -341,7 +382,7 @@ type ServiceServer interface {
|
|
|
//申请服务
|
|
|
Apply(context.Context, *ApplyReqData) (*ApplyRepData, error)
|
|
|
//释放服务
|
|
|
- Release(context.Context, *ApplyRepData) (*StringRepData, error)
|
|
|
+ Release(context.Context, *StringReqData) (*StringRepData, error)
|
|
|
}
|
|
|
|
|
|
// UnimplementedServiceServer can be embedded to have forward compatible implementations.
|
|
@@ -357,7 +398,7 @@ func (*UnimplementedServiceServer) Destory(ctx context.Context, req *ServiceMeta
|
|
|
func (*UnimplementedServiceServer) Apply(ctx context.Context, req *ApplyReqData) (*ApplyRepData, error) {
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Apply not implemented")
|
|
|
}
|
|
|
-func (*UnimplementedServiceServer) Release(ctx context.Context, req *ApplyRepData) (*StringRepData, error) {
|
|
|
+func (*UnimplementedServiceServer) Release(ctx context.Context, req *StringReqData) (*StringRepData, error) {
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Release not implemented")
|
|
|
}
|
|
|
|
|
@@ -420,7 +461,7 @@ func _Service_Apply_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|
|
}
|
|
|
|
|
|
func _Service_Release_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
- in := new(ApplyRepData)
|
|
|
+ in := new(StringReqData)
|
|
|
if err := dec(in); err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -432,7 +473,7 @@ func _Service_Release_Handler(srv interface{}, ctx context.Context, dec func(int
|
|
|
FullMethod: "/proto.Service/Release",
|
|
|
}
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
- return srv.(ServiceServer).Release(ctx, req.(*ApplyRepData))
|
|
|
+ return srv.(ServiceServer).Release(ctx, req.(*StringReqData))
|
|
|
}
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
}
|