Documentation ¶
Overview ¶
Package immediate is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func NewMessage(from sdkTypes.AccAddress, fromID ids.IdentityID, ...) 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) GetClassificationID() *base.ClassificationID
- func (m *Message) GetExpiresIn() *base1.Height
- func (m *Message) GetFrom() string
- func (m *Message) GetFromID() *base.IdentityID
- func (m *Message) GetImmutableMetaProperties() *base2.PropertyList
- func (m *Message) GetImmutableProperties() *base2.PropertyList
- func (m *Message) GetMakerAssetID() *base.AssetID
- func (m *Message) GetMakerSplit() string
- func (m *Message) GetMutableMetaProperties() *base2.PropertyList
- func (m *Message) GetMutableProperties() *base2.PropertyList
- func (message *Message) GetSigners() []sdkTypes.AccAddress
- func (m *Message) GetTakerAssetID() *base.AssetID
- func (m *Message) GetTakerID() *base.IdentityID
- func (m *Message) GetTakerSplit() string
- 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.ClassificationID, constants.TakerID, constants.MakerAssetID, constants.TakerAssetID, constants.ExpiresIn, constants.MakerSplit, constants.TakerSplit, constants.ImmutableMetaProperties, constants.ImmutableProperties, constants.MutableMetaProperties, constants.MutableProperties, )
Functions ¶
func NewMessage ¶
func NewMessage(from sdkTypes.AccAddress, fromID ids.IdentityID, classificationID ids.ClassificationID, takerID ids.IdentityID, makerAssetID ids.AssetID, takerAssetID ids.AssetID, expiresIn typesSchema.Height, makerSplit sdkTypes.Int, takerSplit sdkTypes.Int, immutableMetaProperties lists.PropertyList, immutableProperties lists.PropertyList, mutableMetaProperties lists.PropertyList, mutableProperties lists.PropertyList) 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"` ClassificationID *base.ClassificationID `protobuf:"bytes,3,opt,name=classification_i_d,json=classificationID,proto3" json:"classification_i_d,omitempty"` TakerID *base.IdentityID `protobuf:"bytes,4,opt,name=taker_i_d,json=takerID,proto3" json:"taker_i_d,omitempty"` MakerAssetID *base.AssetID `protobuf:"bytes,5,opt,name=maker_asset_i_d,json=makerAssetID,proto3" json:"maker_asset_i_d,omitempty"` TakerAssetID *base.AssetID `protobuf:"bytes,6,opt,name=taker_asset_i_d,json=takerAssetID,proto3" json:"taker_asset_i_d,omitempty"` ExpiresIn *base1.Height `protobuf:"bytes,7,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` MakerSplit string `protobuf:"bytes,8,opt,name=maker_split,json=makerSplit,proto3" json:"maker_split,omitempty"` TakerSplit string `protobuf:"bytes,9,opt,name=taker_split,json=takerSplit,proto3" json:"taker_split,omitempty"` ImmutableMetaProperties *base2.PropertyList `` /* 133-byte string literal not displayed */ ImmutableProperties *base2.PropertyList `protobuf:"bytes,11,opt,name=immutable_properties,json=immutableProperties,proto3" json:"immutable_properties,omitempty"` MutableMetaProperties *base2.PropertyList `` /* 127-byte string literal not displayed */ MutableProperties *base2.PropertyList `protobuf:"bytes,13,opt,name=mutable_properties,json=mutableProperties,proto3" json:"mutable_properties,omitempty"` }
func (*Message) Descriptor ¶
func (*Message) GetClassificationID ¶
func (m *Message) GetClassificationID() *base.ClassificationID
func (*Message) GetExpiresIn ¶
func (*Message) GetFromID ¶
func (m *Message) GetFromID() *base.IdentityID
func (*Message) GetImmutableMetaProperties ¶
func (m *Message) GetImmutableMetaProperties() *base2.PropertyList
func (*Message) GetImmutableProperties ¶
func (m *Message) GetImmutableProperties() *base2.PropertyList
func (*Message) GetMakerAssetID ¶
func (*Message) GetMakerSplit ¶
func (*Message) GetMutableMetaProperties ¶
func (m *Message) GetMutableMetaProperties() *base2.PropertyList
func (*Message) GetMutableProperties ¶
func (m *Message) GetMutableProperties() *base2.PropertyList
func (*Message) GetSigners ¶
func (message *Message) GetSigners() []sdkTypes.AccAddress
func (*Message) GetTakerAssetID ¶
func (*Message) GetTakerID ¶
func (m *Message) GetTakerID() *base.IdentityID
func (*Message) GetTakerSplit ¶
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)