immediate

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Overview

Package immediate is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMessage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTransactionResponse        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTransactionResponse          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTransactionResponse = fmt.Errorf("proto: unexpected end of group")
)

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

func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMsgHandlerClient

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

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

func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error

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

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

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) Descriptor() ([]byte, []int)

func (*Message) GetClassificationID

func (m *Message) GetClassificationID() *base.ClassificationID

func (*Message) GetExpiresIn

func (m *Message) GetExpiresIn() *base1.Height

func (*Message) GetFrom

func (m *Message) GetFrom() string

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 (m *Message) GetMakerAssetID() *base.AssetID

func (*Message) GetMakerSplit

func (m *Message) GetMakerSplit() string

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 (m *Message) GetTakerAssetID() *base.AssetID

func (*Message) GetTakerID

func (m *Message) GetTakerID() *base.IdentityID

func (*Message) GetTakerSplit

func (m *Message) GetTakerSplit() string

func (*Message) Marshal

func (m *Message) Marshal() (dAtA []byte, err error)

func (*Message) MarshalTo

func (m *Message) MarshalTo(dAtA []byte) (int, error)

func (*Message) MarshalToSizedBuffer

func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error)

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) Reset

func (m *Message) Reset()

func (*Message) Size

func (m *Message) Size() (n int)

func (*Message) String

func (m *Message) String() string

func (*Message) Type

func (message *Message) Type() string

func (*Message) Unmarshal

func (m *Message) Unmarshal(dAtA []byte) error

func (*Message) ValidateBasic

func (message *Message) ValidateBasic() error

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message) XXX_Merge

func (m *Message) XXX_Merge(src proto.Message)

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

func (m *Message) XXX_Unmarshal(b []byte) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL