Commit 661f48a6 authored by linj's avatar linj Committed by linj

add service

parent e3dff3a2
syntax = "proto3";
import "common.proto";
package types;
message Unfreeze {
......@@ -77,11 +79,13 @@ message ReceiptUnfreeze {
}
// query
message QueryUnfreezeWithdraw {
string unfreezeID = 1;
}
message ReplyQueryUnfreezeWithdraw {
string unfreezeID = 1;
int64 availableAmount = 2;
}
// TODO 类型应该大写还是小写
service unfreeze {
rpc GetUnfreezeWithdraw(ReqString) returns (ReplyQueryUnfreezeWithdraw) {}
rpc QueryUnfreeze(ReqString) returns (Unfreeze) {}
}
\ No newline at end of file
......@@ -16,7 +16,6 @@ It has these top-level messages:
UnfreezeWithdraw
UnfreezeTerminate
ReceiptUnfreeze
QueryUnfreezeWithdraw
ReplyQueryUnfreezeWithdraw
*/
package types
......@@ -24,6 +23,12 @@ package types
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import types1 "gitlab.33.cn/chain33/chain33/types"
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
......@@ -676,22 +681,6 @@ func (m *ReceiptUnfreeze) GetCurrent() *Unfreeze {
}
// query
type QueryUnfreezeWithdraw struct {
UnfreezeID string `protobuf:"bytes,1,opt,name=unfreezeID" json:"unfreezeID,omitempty"`
}
func (m *QueryUnfreezeWithdraw) Reset() { *m = QueryUnfreezeWithdraw{} }
func (m *QueryUnfreezeWithdraw) String() string { return proto.CompactTextString(m) }
func (*QueryUnfreezeWithdraw) ProtoMessage() {}
func (*QueryUnfreezeWithdraw) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *QueryUnfreezeWithdraw) GetUnfreezeID() string {
if m != nil {
return m.UnfreezeID
}
return ""
}
type ReplyQueryUnfreezeWithdraw struct {
UnfreezeID string `protobuf:"bytes,1,opt,name=unfreezeID" json:"unfreezeID,omitempty"`
AvailableAmount int64 `protobuf:"varint,2,opt,name=availableAmount" json:"availableAmount,omitempty"`
......@@ -700,7 +689,7 @@ type ReplyQueryUnfreezeWithdraw struct {
func (m *ReplyQueryUnfreezeWithdraw) Reset() { *m = ReplyQueryUnfreezeWithdraw{} }
func (m *ReplyQueryUnfreezeWithdraw) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryUnfreezeWithdraw) ProtoMessage() {}
func (*ReplyQueryUnfreezeWithdraw) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (*ReplyQueryUnfreezeWithdraw) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *ReplyQueryUnfreezeWithdraw) GetUnfreezeID() string {
if m != nil {
......@@ -725,47 +714,154 @@ func init() {
proto.RegisterType((*UnfreezeWithdraw)(nil), "types.UnfreezeWithdraw")
proto.RegisterType((*UnfreezeTerminate)(nil), "types.UnfreezeTerminate")
proto.RegisterType((*ReceiptUnfreeze)(nil), "types.ReceiptUnfreeze")
proto.RegisterType((*QueryUnfreezeWithdraw)(nil), "types.QueryUnfreezeWithdraw")
proto.RegisterType((*ReplyQueryUnfreezeWithdraw)(nil), "types.ReplyQueryUnfreezeWithdraw")
}
// 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 Unfreeze service
type UnfreezeClient interface {
GetUnfreezeWithdraw(ctx context.Context, in *types1.ReqString, opts ...grpc.CallOption) (*ReplyQueryUnfreezeWithdraw, error)
QueryUnfreeze(ctx context.Context, in *types1.ReqString, opts ...grpc.CallOption) (*Unfreeze, error)
}
type unfreezeClient struct {
cc *grpc.ClientConn
}
func NewUnfreezeClient(cc *grpc.ClientConn) UnfreezeClient {
return &unfreezeClient{cc}
}
func (c *unfreezeClient) GetUnfreezeWithdraw(ctx context.Context, in *types1.ReqString, opts ...grpc.CallOption) (*ReplyQueryUnfreezeWithdraw, error) {
out := new(ReplyQueryUnfreezeWithdraw)
err := grpc.Invoke(ctx, "/types.unfreeze/GetUnfreezeWithdraw", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *unfreezeClient) QueryUnfreeze(ctx context.Context, in *types1.ReqString, opts ...grpc.CallOption) (*Unfreeze, error) {
out := new(Unfreeze)
err := grpc.Invoke(ctx, "/types.unfreeze/QueryUnfreeze", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Unfreeze service
type UnfreezeServer interface {
GetUnfreezeWithdraw(context.Context, *types1.ReqString) (*ReplyQueryUnfreezeWithdraw, error)
QueryUnfreeze(context.Context, *types1.ReqString) (*Unfreeze, error)
}
func RegisterUnfreezeServer(s *grpc.Server, srv UnfreezeServer) {
s.RegisterService(&_Unfreeze_serviceDesc, srv)
}
func _Unfreeze_GetUnfreezeWithdraw_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(types1.ReqString)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UnfreezeServer).GetUnfreezeWithdraw(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/types.unfreeze/GetUnfreezeWithdraw",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UnfreezeServer).GetUnfreezeWithdraw(ctx, req.(*types1.ReqString))
}
return interceptor(ctx, in, info, handler)
}
func _Unfreeze_QueryUnfreeze_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(types1.ReqString)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UnfreezeServer).QueryUnfreeze(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/types.unfreeze/QueryUnfreeze",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UnfreezeServer).QueryUnfreeze(ctx, req.(*types1.ReqString))
}
return interceptor(ctx, in, info, handler)
}
var _Unfreeze_serviceDesc = grpc.ServiceDesc{
ServiceName: "types.unfreeze",
HandlerType: (*UnfreezeServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetUnfreezeWithdraw",
Handler: _Unfreeze_GetUnfreezeWithdraw_Handler,
},
{
MethodName: "QueryUnfreeze",
Handler: _Unfreeze_QueryUnfreeze_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "unfreeze.proto",
}
func init() { proto.RegisterFile("unfreeze.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 559 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x5f, 0x8f, 0xd2, 0x4e,
0x14, 0xa5, 0x74, 0x0b, 0xf4, 0x92, 0x1f, 0xec, 0x6f, 0xe2, 0x6a, 0x63, 0x8c, 0x21, 0xd5, 0x07,
0x7c, 0x41, 0xc3, 0xc6, 0x68, 0xe2, 0x83, 0x61, 0x57, 0x0d, 0x26, 0xc6, 0x3f, 0x15, 0xe3, 0xf3,
0x50, 0x2e, 0x32, 0x49, 0x3b, 0xd3, 0x4c, 0xa7, 0xec, 0xd6, 0xaf, 0xe2, 0xe7, 0xf1, 0xc9, 0x2f,
0x65, 0x3a, 0xfd, 0x03, 0x14, 0x57, 0x22, 0x8f, 0x73, 0xce, 0x3d, 0xe7, 0xde, 0xe9, 0x3d, 0x1d,
0xe8, 0x25, 0x7c, 0x29, 0x11, 0xbf, 0xe3, 0x28, 0x92, 0x42, 0x09, 0x62, 0xa9, 0x34, 0xc2, 0xd8,
0xfd, 0x61, 0x42, 0xe7, 0x4b, 0xc1, 0x90, 0xfb, 0x00, 0x65, 0xd5, 0xdb, 0x57, 0x8e, 0x31, 0x30,
0x86, 0xb6, 0xb7, 0x85, 0x90, 0x7b, 0x60, 0xc7, 0x8a, 0x4a, 0x35, 0x63, 0x21, 0x3a, 0xcd, 0x81,
0x31, 0x34, 0xbd, 0x0d, 0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0x25, 0x16, 0xff, 0xc7, 0x1f, 0xea, 0x4a, 0xde, 0x7d, 0x06, 0x67, 0x9f,
0x12, 0x94, 0xe9, 0x3f, 0x5f, 0x68, 0x09, 0x77, 0x3d, 0x8c, 0x82, 0xf4, 0x28, 0x35, 0x19, 0x42,
0x9f, 0xae, 0x29, 0x0b, 0xe8, 0x3c, 0xc0, 0xc9, 0xf6, 0x9f, 0x5c, 0x87, 0xe7, 0x2d, 0xfd, 0x76,
0x9f, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x7b, 0x83, 0xa7, 0xcd, 0x05, 0x00, 0x00,
// 607 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcb, 0x6e, 0xd3, 0x40,
0x14, 0x8d, 0x93, 0x26, 0xb1, 0x6f, 0x68, 0x5a, 0x86, 0x97, 0x55, 0x21, 0x14, 0x0c, 0x8b, 0xb0,
0x29, 0x28, 0x05, 0x09, 0x89, 0x05, 0x6a, 0xcb, 0x23, 0x48, 0x15, 0x8f, 0x69, 0x11, 0xeb, 0x89,
0x7b, 0xd3, 0x8e, 0x64, 0xcf, 0x98, 0xf1, 0xb8, 0xad, 0xf9, 0x08, 0x7e, 0x80, 0xef, 0x61, 0xc5,
0x4f, 0x21, 0x8f, 0x1f, 0x49, 0x9c, 0x96, 0x88, 0x2e, 0xe7, 0x9c, 0x7b, 0xce, 0xbd, 0x93, 0x7b,
0x3c, 0x81, 0x7e, 0x22, 0xa6, 0x0a, 0xf1, 0x07, 0x6e, 0x47, 0x4a, 0x6a, 0x49, 0xda, 0x3a, 0x8d,
0x30, 0xde, 0xba, 0xe1, 0xcb, 0x30, 0x94, 0x22, 0x07, 0xbd, 0x5f, 0x2d, 0xb0, 0xbf, 0x16, 0x75,
0xe4, 0x01, 0x40, 0xa9, 0xf9, 0xf0, 0xc6, 0xb5, 0x06, 0xd6, 0xd0, 0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 0x57, 0x8f, 0x60, 0x2d,
0x52, 0x78, 0x56, 0x84, 0x6f, 0xa3, 0x96, 0x08, 0x6a, 0x48, 0xf2, 0x04, 0xba, 0x7e, 0xa2, 0x14,
0x16, 0xdf, 0xc7, 0x25, 0x75, 0x25, 0xef, 0x4d, 0x61, 0x8b, 0x62, 0x14, 0xa4, 0x5f, 0x12, 0x54,
0xe9, 0xff, 0xde, 0x8a, 0x0c, 0x61, 0x83, 0x9d, 0x31, 0x1e, 0xb0, 0x49, 0x80, 0xbb, 0xf3, 0x1f,
0x64, 0x1d, 0x1e, 0xfd, 0xb4, 0xc0, 0x2e, 0x85, 0xe4, 0x00, 0x6e, 0xbd, 0x47, 0xbd, 0xd4, 0xad,
0xdc, 0x21, 0xc5, 0xef, 0x87, 0x5a, 0x71, 0x71, 0xb2, 0xf5, 0xb0, 0x42, 0xae, 0x1a, 0xd1, 0x6b,
0x90, 0xe7, 0xb0, 0xbe, 0x40, 0x5d, 0xe2, 0x53, 0xbf, 0xbf, 0xd7, 0x98, 0x74, 0xcc, 0x9f, 0xc1,
0xce, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, 0x46, 0xd7, 0x7c, 0x33, 0x06, 0x00, 0x00,
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment