types

package
v0.1.0-furya.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2023 License: Apache-2.0 Imports: 22 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 = "token"

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

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = 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 (
	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 (
	BalancePrefix = []byte{0x01} // prefix for keys that store balance
)

KVStore keys

Functions

func RegisterCodec

func RegisterCodec(_ *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(_ cdctypes.InterfaceRegistry)

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 BalanceRequest

type BalanceRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

func (*BalanceRequest) Descriptor

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

func (*BalanceRequest) Marshal

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

func (*BalanceRequest) MarshalTo

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

func (*BalanceRequest) MarshalToSizedBuffer

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

func (*BalanceRequest) ProtoMessage

func (*BalanceRequest) ProtoMessage()

func (*BalanceRequest) Reset

func (m *BalanceRequest) Reset()

func (*BalanceRequest) Size

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

func (*BalanceRequest) String

func (m *BalanceRequest) String() string

func (*BalanceRequest) Unmarshal

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

func (*BalanceRequest) XXX_DiscardUnknown

func (m *BalanceRequest) XXX_DiscardUnknown()

func (*BalanceRequest) XXX_Marshal

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

func (*BalanceRequest) XXX_Merge

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

func (*BalanceRequest) XXX_Size

func (m *BalanceRequest) XXX_Size() int

func (*BalanceRequest) XXX_Unmarshal

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

type BalanceResponse

type BalanceResponse struct {
	Balance types.FurProto `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance"`
}

func (*BalanceResponse) Descriptor

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

func (*BalanceResponse) GetBalance

func (m *BalanceResponse) GetBalance() types.FurProto

func (*BalanceResponse) Marshal

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

func (*BalanceResponse) MarshalTo

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

func (*BalanceResponse) MarshalToSizedBuffer

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

func (*BalanceResponse) ProtoMessage

func (*BalanceResponse) ProtoMessage()

func (*BalanceResponse) Reset

func (m *BalanceResponse) Reset()

func (*BalanceResponse) Size

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

func (*BalanceResponse) String

func (m *BalanceResponse) String() string

func (*BalanceResponse) Unmarshal

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

func (*BalanceResponse) XXX_DiscardUnknown

func (m *BalanceResponse) XXX_DiscardUnknown()

func (*BalanceResponse) XXX_Marshal

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

func (*BalanceResponse) XXX_Merge

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

func (*BalanceResponse) XXX_Size

func (m *BalanceResponse) XXX_Size() int

func (*BalanceResponse) XXX_Unmarshal

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

type EventRewardDistribution

type EventRewardDistribution struct {
	Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
	Delta   types.FurProto                                `protobuf:"bytes,2,opt,name=delta,proto3" json:"delta"`
	Reward  types.Coin                                    `protobuf:"bytes,3,opt,name=reward,proto3" json:"reward"`
}

func (*EventRewardDistribution) Descriptor

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

func (*EventRewardDistribution) GetAddress

func (*EventRewardDistribution) GetDelta

func (m *EventRewardDistribution) GetDelta() types.FurProto

func (*EventRewardDistribution) GetReward

func (m *EventRewardDistribution) GetReward() types.Coin

func (*EventRewardDistribution) Marshal

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

func (*EventRewardDistribution) MarshalTo

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

func (*EventRewardDistribution) MarshalToSizedBuffer

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

func (*EventRewardDistribution) ProtoMessage

func (*EventRewardDistribution) ProtoMessage()

func (*EventRewardDistribution) Reset

func (m *EventRewardDistribution) Reset()

func (*EventRewardDistribution) Size

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

func (*EventRewardDistribution) String

func (m *EventRewardDistribution) String() string

func (*EventRewardDistribution) Unmarshal

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

func (*EventRewardDistribution) XXX_DiscardUnknown

func (m *EventRewardDistribution) XXX_DiscardUnknown()

func (*EventRewardDistribution) XXX_Marshal

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

func (*EventRewardDistribution) XXX_Merge

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

func (*EventRewardDistribution) XXX_Size

func (m *EventRewardDistribution) XXX_Size() int

func (*EventRewardDistribution) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Balances map[string]types.FurProto `` /* 147-byte string literal not displayed */
}

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetBalances

func (m *GenesisState) GetBalances() map[string]types.FurProto

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 (m 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 QueryClient

type QueryClient interface {
	Balance(ctx context.Context, in *BalanceRequest, opts ...grpc.CallOption) (*BalanceResponse, 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 QueryServer

type QueryServer interface {
	Balance(context.Context, *BalanceRequest) (*BalanceResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Balance

Jump to

Keyboard shortcuts

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