types

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.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 is the name of the module
	ModuleName = "auxiliary"

	// RouterKey to be used for routing msgs
	RouterKey = ModuleName
)

Variables

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrAuxiliary = sdkerrors.Register(ModuleName, 2, "auxiliary module error")
)

module errors

Functions

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers types and interfaces with the given registry

func RegisterMsgServiceHandler

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

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

func RegisterMsgServiceHandlerClient

func RegisterMsgServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgServiceClient) error

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

func RegisterMsgServiceHandlerFromEndpoint

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

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

func RegisterMsgServiceHandlerServer

func RegisterMsgServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServiceServer) error

RegisterMsgServiceHandlerServer registers the http handlers for service MsgService to "mux". UnaryRPC :call MsgServiceServer 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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgServiceHandlerFromEndpoint instead.

func RegisterMsgServiceServer

func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer)

Types

type BatchRequest

type BatchRequest struct {
	Sender   github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"`
	Messages []types.Any                                   `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages"`
}

func NewBatchRequest

func NewBatchRequest(sender sdk.AccAddress, messages []sdk.Msg) *BatchRequest

NewBatchRequest is the constructor for BatchRequest

func (*BatchRequest) Descriptor

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

func (*BatchRequest) GetMessages

func (m *BatchRequest) GetMessages() []types.Any

func (*BatchRequest) GetSender

func (BatchRequest) GetSigners

func (m BatchRequest) GetSigners() []sdk.AccAddress

GetSigners returns the set of signers for this message

func (*BatchRequest) Marshal

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

func (*BatchRequest) MarshalTo

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

func (*BatchRequest) MarshalToSizedBuffer

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

func (*BatchRequest) ProtoMessage

func (*BatchRequest) ProtoMessage()

func (*BatchRequest) Reset

func (m *BatchRequest) Reset()

func (*BatchRequest) Size

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

func (*BatchRequest) String

func (m *BatchRequest) String() string

func (*BatchRequest) Unmarshal

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

func (BatchRequest) UnpackInterfaces

func (m BatchRequest) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage

func (BatchRequest) UnwrapMessages

func (m BatchRequest) UnwrapMessages() []sdk.Msg

UnwrapMessages unwrap the batch messages

func (BatchRequest) ValidateBasic

func (m BatchRequest) ValidateBasic() error

ValidateBasic executes a stateless message validation

func (*BatchRequest) XXX_DiscardUnknown

func (m *BatchRequest) XXX_DiscardUnknown()

func (*BatchRequest) XXX_Marshal

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

func (*BatchRequest) XXX_Merge

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

func (*BatchRequest) XXX_Size

func (m *BatchRequest) XXX_Size() int

func (*BatchRequest) XXX_Unmarshal

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

type BatchResponse

type BatchResponse struct {
	Responses []BatchResponse_Response `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses"`
}

func (*BatchResponse) Descriptor

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

func (*BatchResponse) GetResponses

func (m *BatchResponse) GetResponses() []BatchResponse_Response

func (*BatchResponse) Marshal

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

func (*BatchResponse) MarshalTo

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

func (*BatchResponse) MarshalToSizedBuffer

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

func (*BatchResponse) ProtoMessage

func (*BatchResponse) ProtoMessage()

func (*BatchResponse) Reset

func (m *BatchResponse) Reset()

func (*BatchResponse) Size

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

func (*BatchResponse) String

func (m *BatchResponse) String() string

func (*BatchResponse) Unmarshal

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

func (*BatchResponse) XXX_DiscardUnknown

func (m *BatchResponse) XXX_DiscardUnknown()

func (*BatchResponse) XXX_Marshal

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

func (*BatchResponse) XXX_Merge

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

func (*BatchResponse) XXX_Size

func (m *BatchResponse) XXX_Size() int

func (*BatchResponse) XXX_Unmarshal

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

type BatchResponse_Response

type BatchResponse_Response struct {
	// Types that are valid to be assigned to Res:
	//	*BatchResponse_Response_Result
	//	*BatchResponse_Response_Err
	Res isBatchResponse_Response_Res `protobuf_oneof:"res"`
}

func (*BatchResponse_Response) Descriptor

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

func (*BatchResponse_Response) GetErr

func (m *BatchResponse_Response) GetErr() string

func (*BatchResponse_Response) GetRes

func (m *BatchResponse_Response) GetRes() isBatchResponse_Response_Res

func (*BatchResponse_Response) GetResult

func (m *BatchResponse_Response) GetResult() *types1.Result

func (*BatchResponse_Response) Marshal

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

func (*BatchResponse_Response) MarshalTo

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

func (*BatchResponse_Response) MarshalToSizedBuffer

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

func (*BatchResponse_Response) ProtoMessage

func (*BatchResponse_Response) ProtoMessage()

func (*BatchResponse_Response) Reset

func (m *BatchResponse_Response) Reset()

func (*BatchResponse_Response) Size

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

func (*BatchResponse_Response) String

func (m *BatchResponse_Response) String() string

func (*BatchResponse_Response) Unmarshal

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

func (*BatchResponse_Response) XXX_DiscardUnknown

func (m *BatchResponse_Response) XXX_DiscardUnknown()

func (*BatchResponse_Response) XXX_Marshal

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

func (*BatchResponse_Response) XXX_Merge

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

func (*BatchResponse_Response) XXX_OneofWrappers

func (*BatchResponse_Response) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*BatchResponse_Response) XXX_Size

func (m *BatchResponse_Response) XXX_Size() int

func (*BatchResponse_Response) XXX_Unmarshal

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

type BatchResponse_Response_Err

type BatchResponse_Response_Err struct {
	Err string `protobuf:"bytes,2,opt,name=err,proto3,oneof" json:"err,omitempty"`
}

func (*BatchResponse_Response_Err) MarshalTo

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

func (*BatchResponse_Response_Err) MarshalToSizedBuffer

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

func (*BatchResponse_Response_Err) Size

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

type BatchResponse_Response_Result

type BatchResponse_Response_Result struct {
	Result *types1.Result `protobuf:"bytes,1,opt,name=result,proto3,oneof" json:"result,omitempty"`
}

func (*BatchResponse_Response_Result) MarshalTo

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

func (*BatchResponse_Response_Result) MarshalToSizedBuffer

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

func (*BatchResponse_Response_Result) Size

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

type BatchedMessageFailed

type BatchedMessageFailed struct {
	Index int32  `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
}

func (*BatchedMessageFailed) Descriptor

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

func (*BatchedMessageFailed) GetError

func (m *BatchedMessageFailed) GetError() string

func (*BatchedMessageFailed) GetIndex

func (m *BatchedMessageFailed) GetIndex() int32

func (*BatchedMessageFailed) Marshal

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

func (*BatchedMessageFailed) MarshalTo

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

func (*BatchedMessageFailed) MarshalToSizedBuffer

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

func (*BatchedMessageFailed) ProtoMessage

func (*BatchedMessageFailed) ProtoMessage()

func (*BatchedMessageFailed) Reset

func (m *BatchedMessageFailed) Reset()

func (*BatchedMessageFailed) Size

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

func (*BatchedMessageFailed) String

func (m *BatchedMessageFailed) String() string

func (*BatchedMessageFailed) Unmarshal

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

func (*BatchedMessageFailed) XXX_DiscardUnknown

func (m *BatchedMessageFailed) XXX_DiscardUnknown()

func (*BatchedMessageFailed) XXX_Marshal

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

func (*BatchedMessageFailed) XXX_Merge

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

func (*BatchedMessageFailed) XXX_MessageName

func (*BatchedMessageFailed) XXX_MessageName() string

func (*BatchedMessageFailed) XXX_Size

func (m *BatchedMessageFailed) XXX_Size() int

func (*BatchedMessageFailed) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
}

GenesisState represents the genesis state

func (*GenesisState) Descriptor

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

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

type MsgServiceClient interface {
	Batch(ctx context.Context, in *BatchRequest, opts ...grpc.CallOption) (*BatchResponse, error)
}

MsgServiceClient is the client API for MsgService service.

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

func NewMsgServiceClient

func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient

type MsgServiceServer

type MsgServiceServer interface {
	Batch(context.Context, *BatchRequest) (*BatchResponse, error)
}

MsgServiceServer is the server API for MsgService service.

type UnimplementedMsgServiceServer

type UnimplementedMsgServiceServer struct {
}

UnimplementedMsgServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServiceServer) Batch

Jump to

Keyboard shortcuts

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