Documentation ¶
Overview ¶
Package renumerate is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func NewMessage(from sdkTypes.AccAddress, fromID ids.IdentityID, assetID ids.AssetID) sdkTypes.Msg
- func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error
- func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetAssetID() *base.AssetID
- func (m *Message) GetFrom() string
- func (m *Message) GetFromID() *base.IdentityID
- func (message *Message) GetSigners() []sdkTypes.AccAddress
- func (m *Message) Marshal() (dAtA []byte, err error)
- func (m *Message) MarshalTo(dAtA []byte) (int, error)
- func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Message) ProtoMessage()
- func (message *Message) RegisterInterface(interfaceRegistry types.InterfaceRegistry)
- func (*Message) RegisterLegacyAminoCodec(legacyAmino *codec.LegacyAmino)
- func (m *Message) Reset()
- func (m *Message) Size() (n int)
- func (m *Message) String() string
- func (message *Message) Type() string
- func (m *Message) Unmarshal(dAtA []byte) error
- func (message *Message) ValidateBasic() error
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type TransactionResponse
- func (*TransactionResponse) Descriptor() ([]byte, []int)
- func (*TransactionResponse) GetResult() *sdkTypes.Result
- func (m *TransactionResponse) Marshal() (dAtA []byte, err error)
- func (m *TransactionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *TransactionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TransactionResponse) ProtoMessage()
- func (m *TransactionResponse) Reset()
- func (m *TransactionResponse) Size() (n int)
- func (m *TransactionResponse) String() string
- func (m *TransactionResponse) Unmarshal(dAtA []byte) error
- func (m *TransactionResponse) XXX_DiscardUnknown()
- func (m *TransactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TransactionResponse) XXX_Merge(src proto.Message)
- func (m *TransactionResponse) XXX_Size() int
- func (m *TransactionResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTransactionResponse = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTransactionResponse = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTransactionResponse = fmt.Errorf("proto: unexpected end of group") )
var Transaction = baseHelpers.NewTransaction( name.GetPackageName(dummy{}), "", "", requestPrototype, messagePrototype, keeperPrototype, func(server grpc.Server, keeper helpers.TransactionKeeper) { RegisterMsgServer(server, keeper.(transactionKeeper)) }, func(clientCtx client.Context, mux *runtime.ServeMux) error { return RegisterMsgHandlerClient(context.Background(), mux, NewMsgClient(clientCtx)) }, constants.FromIdentityID, constants.AssetID, )
Functions ¶
func NewMessage ¶
func NewMessage(from sdkTypes.AccAddress, fromID ids.IdentityID, assetID ids.AssetID) sdkTypes.Msg
func RegisterMsgHandler ¶
RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMsgHandlerClient ¶
RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.
func RegisterMsgHandlerFromEndpoint ¶
func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMsgHandlerServer ¶
RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.
func RegisterMsgServer ¶
Types ¶
type Message ¶
type Message struct { From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` FromID *base.IdentityID `protobuf:"bytes,2,opt,name=from_i_d,json=fromID,proto3" json:"from_i_d,omitempty"` AssetID *base.AssetID `protobuf:"bytes,3,opt,name=asset_i_d,json=assetID,proto3" json:"asset_i_d,omitempty"` }
func (*Message) Descriptor ¶
func (*Message) GetAssetID ¶
func (*Message) GetFromID ¶
func (m *Message) GetFromID() *base.IdentityID
func (*Message) GetSigners ¶
func (message *Message) GetSigners() []sdkTypes.AccAddress
func (*Message) MarshalToSizedBuffer ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) RegisterInterface ¶
func (message *Message) RegisterInterface(interfaceRegistry types.InterfaceRegistry)
func (*Message) RegisterLegacyAminoCodec ¶
func (*Message) RegisterLegacyAminoCodec(legacyAmino *codec.LegacyAmino)
func (*Message) ValidateBasic ¶
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_Unmarshal ¶
type MsgClient ¶
type MsgClient interface {
Handle(ctx context.Context, in *Message, opts ...grpc.CallOption) (*TransactionResponse, error)
}
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgServer ¶
type MsgServer interface {
Handle(context.Context, *Message) (*TransactionResponse, error)
}
MsgServer is the server API for Msg service.
type TransactionResponse ¶
type TransactionResponse struct { }
func (*TransactionResponse) Descriptor ¶
func (*TransactionResponse) Descriptor() ([]byte, []int)
func (*TransactionResponse) GetResult ¶
func (*TransactionResponse) GetResult() *sdkTypes.Result
func (*TransactionResponse) Marshal ¶
func (m *TransactionResponse) Marshal() (dAtA []byte, err error)
func (*TransactionResponse) MarshalTo ¶
func (m *TransactionResponse) MarshalTo(dAtA []byte) (int, error)
func (*TransactionResponse) MarshalToSizedBuffer ¶
func (m *TransactionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TransactionResponse) ProtoMessage ¶
func (*TransactionResponse) ProtoMessage()
func (*TransactionResponse) Reset ¶
func (m *TransactionResponse) Reset()
func (*TransactionResponse) Size ¶
func (m *TransactionResponse) Size() (n int)
func (*TransactionResponse) String ¶
func (m *TransactionResponse) String() string
func (*TransactionResponse) Unmarshal ¶
func (m *TransactionResponse) Unmarshal(dAtA []byte) error
func (*TransactionResponse) XXX_DiscardUnknown ¶
func (m *TransactionResponse) XXX_DiscardUnknown()
func (*TransactionResponse) XXX_Marshal ¶
func (m *TransactionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TransactionResponse) XXX_Merge ¶
func (m *TransactionResponse) XXX_Merge(src proto.Message)
func (*TransactionResponse) XXX_Size ¶
func (m *TransactionResponse) XXX_Size() int
func (*TransactionResponse) XXX_Unmarshal ¶
func (m *TransactionResponse) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Handle ¶
func (*UnimplementedMsgServer) Handle(ctx context.Context, req *Message) (*TransactionResponse, error)