types

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "delaymsg"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName
)

Module name and store keys

View Source
const (
	// BlockMessageIdsPrefix is the prefix to retrieve all BlockMessageIds for a given block height.
	BlockMessageIdsPrefix = "BlockMsgIds:"

	// DelayedMessageKeyPrefix is the prefix to retrieve all DelayedMessages.
	DelayedMessageKeyPrefix = "Msg:"

	// NextDelayedMessageIdKey is the key to retrieve next delayed message id.
	NextDelayedMessageIdKey = "NextDelayedMessageId"
)

State

View Source
const (
	IdLogKey             = "id"
	MessageContentLogKey = "message_content"
	MessageTypeUrlLogKey = "message_type_url"
)

Log

Variables

View Source
var (
	ErrInvalidLengthBlockMessageIds        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBlockMessageIds          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBlockMessageIds = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthDelayedMessage        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDelayedMessage          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDelayedMessage = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidInput     = errorsmod.Register(ModuleName, 1, "Invalid input")
	ErrMsgIsNil         = errorsmod.Register(ModuleName, 2, "Delayed msg is nil")
	ErrMsgIsUnroutable  = errorsmod.Register(ModuleName, 3, "Message not recognized by router")
	ErrInvalidSigner    = errorsmod.Register(ModuleName, 4, "Invalid signer")
	ErrInvalidAuthority = errorsmod.Register(ModuleName, 5, "Invalid authority")

	ErrInvalidGenesisState = errorsmod.Register(ModuleName, 10, "Invalid genesis state")
)

x/delaymsg module sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer 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 RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type BlockMessageIds

type BlockMessageIds struct {
	// ids stores a list of DelayedMessage ids that should be processed at a given
	// block height.
	Ids []uint32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"`
}

BlockMessageIds stores the id of each message that should be processed at a given block height.

func (*BlockMessageIds) Descriptor

func (*BlockMessageIds) Descriptor() ([]byte, []int)

func (*BlockMessageIds) GetIds

func (m *BlockMessageIds) GetIds() []uint32

func (*BlockMessageIds) Marshal

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

func (*BlockMessageIds) MarshalTo

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

func (*BlockMessageIds) MarshalToSizedBuffer

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

func (*BlockMessageIds) ProtoMessage

func (*BlockMessageIds) ProtoMessage()

func (*BlockMessageIds) Reset

func (m *BlockMessageIds) Reset()

func (*BlockMessageIds) Size

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

func (*BlockMessageIds) String

func (m *BlockMessageIds) String() string

func (*BlockMessageIds) Unmarshal

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

func (*BlockMessageIds) XXX_DiscardUnknown

func (m *BlockMessageIds) XXX_DiscardUnknown()

func (*BlockMessageIds) XXX_Marshal

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

func (*BlockMessageIds) XXX_Merge

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

func (*BlockMessageIds) XXX_Size

func (m *BlockMessageIds) XXX_Size() int

func (*BlockMessageIds) XXX_Unmarshal

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

type DelayMsgKeeper

type DelayMsgKeeper interface {
	// Delayed messages
	SetNextDelayedMessageId(
		ctx sdk.Context,
		nextDelayedMessageId uint32,
	)

	SetDelayedMessage(
		ctx sdk.Context,
		msg *DelayedMessage,
	) (
		err error,
	)
	DelayMessageByBlocks(
		ctx sdk.Context,
		msg sdk.Msg,
		blockDelay uint32,
	) (
		id uint32,
		err error,
	)

	GetMessage(
		ctx sdk.Context,
		id uint32,
	) (
		delayedMessage DelayedMessage,
		found bool,
	)

	GetAllDelayedMessages(ctx sdk.Context) []*DelayedMessage

	DeleteMessage(
		ctx sdk.Context,
		id uint32,
	) (
		err error,
	)

	// Block message ids
	GetBlockMessageIds(
		ctx sdk.Context,
		blockHeight uint32,
	) (
		blockMessageIds BlockMessageIds,
		found bool,
	)

	// HasAuthority returns whether the authority is permitted to send delayed messages.
	HasAuthority(authority string) bool

	Logger(ctx sdk.Context) log.Logger

	Router() lib.MsgRouter
}

type DelayedMessage

type DelayedMessage struct {
	// The ID of the delayed message.
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The message to be executed.
	Msg *types.Any `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// The block height at which the message should be executed.
	BlockHeight uint32 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}

DelayedMessage is a message that is delayed until a certain block height.

func (*DelayedMessage) Descriptor

func (*DelayedMessage) Descriptor() ([]byte, []int)

func (*DelayedMessage) GetBlockHeight

func (m *DelayedMessage) GetBlockHeight() uint32

func (*DelayedMessage) GetId

func (m *DelayedMessage) GetId() uint32

func (*DelayedMessage) GetMessage

func (dm *DelayedMessage) GetMessage() (sdk.Msg, error)

func (*DelayedMessage) GetMsg

func (m *DelayedMessage) GetMsg() *types.Any

func (*DelayedMessage) Marshal

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

func (*DelayedMessage) MarshalTo

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

func (*DelayedMessage) MarshalToSizedBuffer

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

func (*DelayedMessage) ProtoMessage

func (*DelayedMessage) ProtoMessage()

func (*DelayedMessage) Reset

func (m *DelayedMessage) Reset()

func (*DelayedMessage) Size

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

func (*DelayedMessage) String

func (m *DelayedMessage) String() string

func (*DelayedMessage) Unmarshal

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

func (*DelayedMessage) UnpackInterfaces

func (dm *DelayedMessage) UnpackInterfaces(unpacker codec.AnyUnpacker) error

func (*DelayedMessage) Validate

func (dm *DelayedMessage) Validate() error

func (*DelayedMessage) XXX_DiscardUnknown

func (m *DelayedMessage) XXX_DiscardUnknown()

func (*DelayedMessage) XXX_Marshal

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

func (*DelayedMessage) XXX_Merge

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

func (*DelayedMessage) XXX_Size

func (m *DelayedMessage) XXX_Size() int

func (*DelayedMessage) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// delayed_messages is a list of delayed messages.
	DelayedMessages []*DelayedMessage `protobuf:"bytes,1,rep,name=delayed_messages,json=delayedMessages,proto3" json:"delayed_messages,omitempty"`
	// next_delayed_message_id is the id to be assigned to next delayed message.
	NextDelayedMessageId uint32 `` /* 126-byte string literal not displayed */
}

GenesisState defines the delaymsg module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetDelayedMessages

func (m *GenesisState) GetDelayedMessages() []*DelayedMessage

func (*GenesisState) GetNextDelayedMessageId added in v0.4.0

func (m *GenesisState) GetNextDelayedMessageId() uint32

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// DelayMessage delays the execution of a message for a given number of
	// blocks.
	DelayMessage(ctx context.Context, in *MsgDelayMessage, opts ...grpc.CallOption) (*MsgDelayMessageResponse, 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 MsgDelayMessage

type MsgDelayMessage struct {
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// The message to be delayed.
	Msg *types.Any `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// The number of blocks to delay the message for.
	DelayBlocks uint32 `protobuf:"varint,3,opt,name=delay_blocks,json=delayBlocks,proto3" json:"delay_blocks,omitempty"`
}

MsgDelayMessage is a request type for the DelayMessage method.

func (*MsgDelayMessage) Descriptor

func (*MsgDelayMessage) Descriptor() ([]byte, []int)

func (*MsgDelayMessage) GetAuthority

func (m *MsgDelayMessage) GetAuthority() string

func (*MsgDelayMessage) GetDelayBlocks

func (m *MsgDelayMessage) GetDelayBlocks() uint32

func (*MsgDelayMessage) GetMessage

func (msg *MsgDelayMessage) GetMessage() (sdk.Msg, error)

func (*MsgDelayMessage) GetMsg

func (m *MsgDelayMessage) GetMsg() *types.Any

func (*MsgDelayMessage) GetSigners

func (msg *MsgDelayMessage) GetSigners() []sdk.AccAddress

func (*MsgDelayMessage) Marshal

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

func (*MsgDelayMessage) MarshalTo

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

func (*MsgDelayMessage) MarshalToSizedBuffer

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

func (*MsgDelayMessage) ProtoMessage

func (*MsgDelayMessage) ProtoMessage()

func (*MsgDelayMessage) Reset

func (m *MsgDelayMessage) Reset()

func (*MsgDelayMessage) Size

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

func (*MsgDelayMessage) String

func (m *MsgDelayMessage) String() string

func (*MsgDelayMessage) Unmarshal

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

func (*MsgDelayMessage) UnpackInterfaces

func (msg *MsgDelayMessage) UnpackInterfaces(unpacker codec.AnyUnpacker) error

func (*MsgDelayMessage) ValidateBasic

func (msg *MsgDelayMessage) ValidateBasic() error

ValidateBasic performs basic validation on the message.

func (*MsgDelayMessage) XXX_DiscardUnknown

func (m *MsgDelayMessage) XXX_DiscardUnknown()

func (*MsgDelayMessage) XXX_Marshal

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

func (*MsgDelayMessage) XXX_Merge

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

func (*MsgDelayMessage) XXX_Size

func (m *MsgDelayMessage) XXX_Size() int

func (*MsgDelayMessage) XXX_Unmarshal

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

type MsgDelayMessageResponse

type MsgDelayMessageResponse struct {
	// The id of the created delayed message.
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

MsgDelayMessageResponse is a response type for the DelayMessage method.

func (*MsgDelayMessageResponse) Descriptor

func (*MsgDelayMessageResponse) Descriptor() ([]byte, []int)

func (*MsgDelayMessageResponse) GetId

func (m *MsgDelayMessageResponse) GetId() uint64

func (*MsgDelayMessageResponse) Marshal

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

func (*MsgDelayMessageResponse) MarshalTo

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

func (*MsgDelayMessageResponse) MarshalToSizedBuffer

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

func (*MsgDelayMessageResponse) ProtoMessage

func (*MsgDelayMessageResponse) ProtoMessage()

func (*MsgDelayMessageResponse) Reset

func (m *MsgDelayMessageResponse) Reset()

func (*MsgDelayMessageResponse) Size

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

func (*MsgDelayMessageResponse) String

func (m *MsgDelayMessageResponse) String() string

func (*MsgDelayMessageResponse) Unmarshal

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

func (*MsgDelayMessageResponse) XXX_DiscardUnknown

func (m *MsgDelayMessageResponse) XXX_DiscardUnknown()

func (*MsgDelayMessageResponse) XXX_Marshal

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

func (*MsgDelayMessageResponse) XXX_Merge

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

func (*MsgDelayMessageResponse) XXX_Size

func (m *MsgDelayMessageResponse) XXX_Size() int

func (*MsgDelayMessageResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// DelayMessage delays the execution of a message for a given number of
	// blocks.
	DelayMessage(context.Context, *MsgDelayMessage) (*MsgDelayMessageResponse, error)
}

MsgServer is the server API for Msg service.

type QueryBlockMessageIdsRequest

type QueryBlockMessageIdsRequest struct {
	BlockHeight uint32 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}

QueryBlockMessageIdsRequest is the request type for the BlockMessageIds RPC method.

func (*QueryBlockMessageIdsRequest) Descriptor

func (*QueryBlockMessageIdsRequest) Descriptor() ([]byte, []int)

func (*QueryBlockMessageIdsRequest) GetBlockHeight

func (m *QueryBlockMessageIdsRequest) GetBlockHeight() uint32

func (*QueryBlockMessageIdsRequest) Marshal

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

func (*QueryBlockMessageIdsRequest) MarshalTo

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

func (*QueryBlockMessageIdsRequest) MarshalToSizedBuffer

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

func (*QueryBlockMessageIdsRequest) ProtoMessage

func (*QueryBlockMessageIdsRequest) ProtoMessage()

func (*QueryBlockMessageIdsRequest) Reset

func (m *QueryBlockMessageIdsRequest) Reset()

func (*QueryBlockMessageIdsRequest) Size

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

func (*QueryBlockMessageIdsRequest) String

func (m *QueryBlockMessageIdsRequest) String() string

func (*QueryBlockMessageIdsRequest) Unmarshal

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

func (*QueryBlockMessageIdsRequest) XXX_DiscardUnknown

func (m *QueryBlockMessageIdsRequest) XXX_DiscardUnknown()

func (*QueryBlockMessageIdsRequest) XXX_Marshal

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

func (*QueryBlockMessageIdsRequest) XXX_Merge

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

func (*QueryBlockMessageIdsRequest) XXX_Size

func (m *QueryBlockMessageIdsRequest) XXX_Size() int

func (*QueryBlockMessageIdsRequest) XXX_Unmarshal

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

type QueryBlockMessageIdsResponse

type QueryBlockMessageIdsResponse struct {
	MessageIds []uint32 `protobuf:"varint,1,rep,packed,name=message_ids,json=messageIds,proto3" json:"message_ids,omitempty"`
}

QueryGetBlockMessageIdsResponse is the response type for the BlockMessageIds RPC method.

func (*QueryBlockMessageIdsResponse) Descriptor

func (*QueryBlockMessageIdsResponse) Descriptor() ([]byte, []int)

func (*QueryBlockMessageIdsResponse) GetMessageIds

func (m *QueryBlockMessageIdsResponse) GetMessageIds() []uint32

func (*QueryBlockMessageIdsResponse) Marshal

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

func (*QueryBlockMessageIdsResponse) MarshalTo

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

func (*QueryBlockMessageIdsResponse) MarshalToSizedBuffer

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

func (*QueryBlockMessageIdsResponse) ProtoMessage

func (*QueryBlockMessageIdsResponse) ProtoMessage()

func (*QueryBlockMessageIdsResponse) Reset

func (m *QueryBlockMessageIdsResponse) Reset()

func (*QueryBlockMessageIdsResponse) Size

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

func (*QueryBlockMessageIdsResponse) String

func (*QueryBlockMessageIdsResponse) Unmarshal

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

func (*QueryBlockMessageIdsResponse) XXX_DiscardUnknown

func (m *QueryBlockMessageIdsResponse) XXX_DiscardUnknown()

func (*QueryBlockMessageIdsResponse) XXX_Marshal

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

func (*QueryBlockMessageIdsResponse) XXX_Merge

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

func (*QueryBlockMessageIdsResponse) XXX_Size

func (m *QueryBlockMessageIdsResponse) XXX_Size() int

func (*QueryBlockMessageIdsResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Queries the next DelayedMessage's id.
	NextDelayedMessageId(ctx context.Context, in *QueryNextDelayedMessageIdRequest, opts ...grpc.CallOption) (*QueryNextDelayedMessageIdResponse, error)
	// Queries the DelayedMessage by id.
	Message(ctx context.Context, in *QueryMessageRequest, opts ...grpc.CallOption) (*QueryMessageResponse, error)
	// Queries the DelayedMessages at a given block height.
	BlockMessageIds(ctx context.Context, in *QueryBlockMessageIdsRequest, opts ...grpc.CallOption) (*QueryBlockMessageIdsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryMessageRequest

type QueryMessageRequest struct {
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

QueryMessageRequest is the request type for the Message RPC method.

func (*QueryMessageRequest) Descriptor

func (*QueryMessageRequest) Descriptor() ([]byte, []int)

func (*QueryMessageRequest) GetId

func (m *QueryMessageRequest) GetId() uint32

func (*QueryMessageRequest) Marshal

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

func (*QueryMessageRequest) MarshalTo

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

func (*QueryMessageRequest) MarshalToSizedBuffer

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

func (*QueryMessageRequest) ProtoMessage

func (*QueryMessageRequest) ProtoMessage()

func (*QueryMessageRequest) Reset

func (m *QueryMessageRequest) Reset()

func (*QueryMessageRequest) Size

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

func (*QueryMessageRequest) String

func (m *QueryMessageRequest) String() string

func (*QueryMessageRequest) Unmarshal

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

func (*QueryMessageRequest) XXX_DiscardUnknown

func (m *QueryMessageRequest) XXX_DiscardUnknown()

func (*QueryMessageRequest) XXX_Marshal

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

func (*QueryMessageRequest) XXX_Merge

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

func (*QueryMessageRequest) XXX_Size

func (m *QueryMessageRequest) XXX_Size() int

func (*QueryMessageRequest) XXX_Unmarshal

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

type QueryMessageResponse

type QueryMessageResponse struct {
	Message *DelayedMessage `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}

QueryGetMessageResponse is the response type for the Message RPC method.

func (*QueryMessageResponse) Descriptor

func (*QueryMessageResponse) Descriptor() ([]byte, []int)

func (*QueryMessageResponse) GetMessage

func (m *QueryMessageResponse) GetMessage() *DelayedMessage

func (*QueryMessageResponse) Marshal

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

func (*QueryMessageResponse) MarshalTo

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

func (*QueryMessageResponse) MarshalToSizedBuffer

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

func (*QueryMessageResponse) ProtoMessage

func (*QueryMessageResponse) ProtoMessage()

func (*QueryMessageResponse) Reset

func (m *QueryMessageResponse) Reset()

func (*QueryMessageResponse) Size

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

func (*QueryMessageResponse) String

func (m *QueryMessageResponse) String() string

func (*QueryMessageResponse) Unmarshal

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

func (*QueryMessageResponse) XXX_DiscardUnknown

func (m *QueryMessageResponse) XXX_DiscardUnknown()

func (*QueryMessageResponse) XXX_Marshal

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

func (*QueryMessageResponse) XXX_Merge

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

func (*QueryMessageResponse) XXX_Size

func (m *QueryMessageResponse) XXX_Size() int

func (*QueryMessageResponse) XXX_Unmarshal

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

type QueryNextDelayedMessageIdRequest added in v0.4.0

type QueryNextDelayedMessageIdRequest struct {
}

QueryNextDelayedMessageIdRequest is the request type for the NextDelayedMessageId RPC method.

func (*QueryNextDelayedMessageIdRequest) Descriptor added in v0.4.0

func (*QueryNextDelayedMessageIdRequest) Descriptor() ([]byte, []int)

func (*QueryNextDelayedMessageIdRequest) Marshal added in v0.4.0

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

func (*QueryNextDelayedMessageIdRequest) MarshalTo added in v0.4.0

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

func (*QueryNextDelayedMessageIdRequest) MarshalToSizedBuffer added in v0.4.0

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

func (*QueryNextDelayedMessageIdRequest) ProtoMessage added in v0.4.0

func (*QueryNextDelayedMessageIdRequest) ProtoMessage()

func (*QueryNextDelayedMessageIdRequest) Reset added in v0.4.0

func (*QueryNextDelayedMessageIdRequest) Size added in v0.4.0

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

func (*QueryNextDelayedMessageIdRequest) String added in v0.4.0

func (*QueryNextDelayedMessageIdRequest) Unmarshal added in v0.4.0

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

func (*QueryNextDelayedMessageIdRequest) XXX_DiscardUnknown added in v0.4.0

func (m *QueryNextDelayedMessageIdRequest) XXX_DiscardUnknown()

func (*QueryNextDelayedMessageIdRequest) XXX_Marshal added in v0.4.0

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

func (*QueryNextDelayedMessageIdRequest) XXX_Merge added in v0.4.0

func (*QueryNextDelayedMessageIdRequest) XXX_Size added in v0.4.0

func (m *QueryNextDelayedMessageIdRequest) XXX_Size() int

func (*QueryNextDelayedMessageIdRequest) XXX_Unmarshal added in v0.4.0

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

type QueryNextDelayedMessageIdResponse added in v0.4.0

type QueryNextDelayedMessageIdResponse struct {
	NextDelayedMessageId uint32 `` /* 126-byte string literal not displayed */
}

QueryNextDelayedMessageIdResponse is the response type for the NextDelayedMessageId RPC method.

func (*QueryNextDelayedMessageIdResponse) Descriptor added in v0.4.0

func (*QueryNextDelayedMessageIdResponse) Descriptor() ([]byte, []int)

func (*QueryNextDelayedMessageIdResponse) GetNextDelayedMessageId added in v0.4.0

func (m *QueryNextDelayedMessageIdResponse) GetNextDelayedMessageId() uint32

func (*QueryNextDelayedMessageIdResponse) Marshal added in v0.4.0

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

func (*QueryNextDelayedMessageIdResponse) MarshalTo added in v0.4.0

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

func (*QueryNextDelayedMessageIdResponse) MarshalToSizedBuffer added in v0.4.0

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

func (*QueryNextDelayedMessageIdResponse) ProtoMessage added in v0.4.0

func (*QueryNextDelayedMessageIdResponse) ProtoMessage()

func (*QueryNextDelayedMessageIdResponse) Reset added in v0.4.0

func (*QueryNextDelayedMessageIdResponse) Size added in v0.4.0

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

func (*QueryNextDelayedMessageIdResponse) String added in v0.4.0

func (*QueryNextDelayedMessageIdResponse) Unmarshal added in v0.4.0

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

func (*QueryNextDelayedMessageIdResponse) XXX_DiscardUnknown added in v0.4.0

func (m *QueryNextDelayedMessageIdResponse) XXX_DiscardUnknown()

func (*QueryNextDelayedMessageIdResponse) XXX_Marshal added in v0.4.0

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

func (*QueryNextDelayedMessageIdResponse) XXX_Merge added in v0.4.0

func (*QueryNextDelayedMessageIdResponse) XXX_Size added in v0.4.0

func (m *QueryNextDelayedMessageIdResponse) XXX_Size() int

func (*QueryNextDelayedMessageIdResponse) XXX_Unmarshal added in v0.4.0

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

type QueryServer

type QueryServer interface {
	// Queries the next DelayedMessage's id.
	NextDelayedMessageId(context.Context, *QueryNextDelayedMessageIdRequest) (*QueryNextDelayedMessageIdResponse, error)
	// Queries the DelayedMessage by id.
	Message(context.Context, *QueryMessageRequest) (*QueryMessageResponse, error)
	// Queries the DelayedMessages at a given block height.
	BlockMessageIds(context.Context, *QueryBlockMessageIdsRequest) (*QueryBlockMessageIdsResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) DelayMessage

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) BlockMessageIds

func (*UnimplementedQueryServer) Message

func (*UnimplementedQueryServer) NextDelayedMessageId added in v0.4.0

Jump to

Keyboard shortcuts

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