 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type AccountWithBalance
- func (*AccountWithBalance) Descriptor() ([]byte, []int)
- func (m *AccountWithBalance) GetAddress() string
- func (m *AccountWithBalance) GetBalance() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *AccountWithBalance) GetName() string
- func (m *AccountWithBalance) Marshal() (dAtA []byte, err error)
- func (m *AccountWithBalance) MarshalTo(dAtA []byte) (int, error)
- func (m *AccountWithBalance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AccountWithBalance) ProtoMessage()
- func (m *AccountWithBalance) Reset()
- func (m *AccountWithBalance) Size() (n int)
- func (m *AccountWithBalance) String() string
- func (m *AccountWithBalance) Unmarshal(dAtA []byte) error
- func (m *AccountWithBalance) XXX_DiscardUnknown()
- func (m *AccountWithBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AccountWithBalance) XXX_Merge(src proto.Message)
- func (m *AccountWithBalance) XXX_Size() int
- func (m *AccountWithBalance) XXX_Unmarshal(b []byte) error
 
- type BankKeeper
- type QueryClient
- type QueryModuleAccountsRequest
- func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int)
- func (m *QueryModuleAccountsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryModuleAccountsRequest) ProtoMessage()
- func (m *QueryModuleAccountsRequest) Reset()
- func (m *QueryModuleAccountsRequest) Size() (n int)
- func (m *QueryModuleAccountsRequest) String() string
- func (m *QueryModuleAccountsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown()
- func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryModuleAccountsRequest) XXX_Merge(src proto.Message)
- func (m *QueryModuleAccountsRequest) XXX_Size() int
- func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error
 
- type QueryModuleAccountsResponse
- func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int)
- func (m *QueryModuleAccountsResponse) GetAccounts() []AccountWithBalance
- func (m *QueryModuleAccountsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryModuleAccountsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryModuleAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryModuleAccountsResponse) ProtoMessage()
- func (m *QueryModuleAccountsResponse) Reset()
- func (m *QueryModuleAccountsResponse) Size() (n int)
- func (m *QueryModuleAccountsResponse) String() string
- func (m *QueryModuleAccountsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown()
- func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryModuleAccountsResponse) XXX_Merge(src proto.Message)
- func (m *QueryModuleAccountsResponse) XXX_Size() int
- func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error
 
- type QueryServer
- type UnimplementedQueryServer
Constants ¶
const ( ModuleName = "util" RouterKey = ModuleName )
Variables ¶
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ModuleAccounts = []string{ perptypes.ModuleName, perptypes.VaultModuleAccount, perptypes.PerpEFModuleAccount, perptypes.FeePoolModuleAccount, common.TreasuryPoolModuleAccount, }
Functions ¶
func RegisterQueryHandler ¶
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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AccountWithBalance ¶
type AccountWithBalance struct {
	Name    string                                   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Address string                                   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	Balance github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=balance,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"balance"`
}
    func (*AccountWithBalance) Descriptor ¶
func (*AccountWithBalance) Descriptor() ([]byte, []int)
func (*AccountWithBalance) GetAddress ¶
func (m *AccountWithBalance) GetAddress() string
func (*AccountWithBalance) GetBalance ¶
func (m *AccountWithBalance) GetBalance() github_com_cosmos_cosmos_sdk_types.Coins
func (*AccountWithBalance) GetName ¶
func (m *AccountWithBalance) GetName() string
func (*AccountWithBalance) Marshal ¶
func (m *AccountWithBalance) Marshal() (dAtA []byte, err error)
func (*AccountWithBalance) MarshalTo ¶
func (m *AccountWithBalance) MarshalTo(dAtA []byte) (int, error)
func (*AccountWithBalance) MarshalToSizedBuffer ¶
func (m *AccountWithBalance) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AccountWithBalance) ProtoMessage ¶
func (*AccountWithBalance) ProtoMessage()
func (*AccountWithBalance) Reset ¶
func (m *AccountWithBalance) Reset()
func (*AccountWithBalance) Size ¶
func (m *AccountWithBalance) Size() (n int)
func (*AccountWithBalance) String ¶
func (m *AccountWithBalance) String() string
func (*AccountWithBalance) Unmarshal ¶
func (m *AccountWithBalance) Unmarshal(dAtA []byte) error
func (*AccountWithBalance) XXX_DiscardUnknown ¶
func (m *AccountWithBalance) XXX_DiscardUnknown()
func (*AccountWithBalance) XXX_Marshal ¶
func (m *AccountWithBalance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AccountWithBalance) XXX_Merge ¶
func (m *AccountWithBalance) XXX_Merge(src proto.Message)
func (*AccountWithBalance) XXX_Size ¶
func (m *AccountWithBalance) XXX_Size() int
func (*AccountWithBalance) XXX_Unmarshal ¶
func (m *AccountWithBalance) XXX_Unmarshal(b []byte) error
type BankKeeper ¶
BankKeeper defines the expected interface needed to retrieve account balances.
type QueryClient ¶
type QueryClient interface {
	// Queries the reserve assets in a given pool, identified by a token pair.
	ModuleAccounts(ctx context.Context, in *QueryModuleAccountsRequest, opts ...grpc.CallOption) (*QueryModuleAccountsResponse, 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 QueryModuleAccountsRequest ¶
type QueryModuleAccountsRequest struct {
}
    func (*QueryModuleAccountsRequest) Descriptor ¶
func (*QueryModuleAccountsRequest) Descriptor() ([]byte, []int)
func (*QueryModuleAccountsRequest) Marshal ¶
func (m *QueryModuleAccountsRequest) Marshal() (dAtA []byte, err error)
func (*QueryModuleAccountsRequest) MarshalTo ¶
func (m *QueryModuleAccountsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryModuleAccountsRequest) MarshalToSizedBuffer ¶
func (m *QueryModuleAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryModuleAccountsRequest) ProtoMessage ¶
func (*QueryModuleAccountsRequest) ProtoMessage()
func (*QueryModuleAccountsRequest) Reset ¶
func (m *QueryModuleAccountsRequest) Reset()
func (*QueryModuleAccountsRequest) Size ¶
func (m *QueryModuleAccountsRequest) Size() (n int)
func (*QueryModuleAccountsRequest) String ¶
func (m *QueryModuleAccountsRequest) String() string
func (*QueryModuleAccountsRequest) Unmarshal ¶
func (m *QueryModuleAccountsRequest) Unmarshal(dAtA []byte) error
func (*QueryModuleAccountsRequest) XXX_DiscardUnknown ¶
func (m *QueryModuleAccountsRequest) XXX_DiscardUnknown()
func (*QueryModuleAccountsRequest) XXX_Marshal ¶
func (m *QueryModuleAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryModuleAccountsRequest) XXX_Merge ¶
func (m *QueryModuleAccountsRequest) XXX_Merge(src proto.Message)
func (*QueryModuleAccountsRequest) XXX_Size ¶
func (m *QueryModuleAccountsRequest) XXX_Size() int
func (*QueryModuleAccountsRequest) XXX_Unmarshal ¶
func (m *QueryModuleAccountsRequest) XXX_Unmarshal(b []byte) error
type QueryModuleAccountsResponse ¶
type QueryModuleAccountsResponse struct {
	Accounts []AccountWithBalance `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts"`
}
    func (*QueryModuleAccountsResponse) Descriptor ¶
func (*QueryModuleAccountsResponse) Descriptor() ([]byte, []int)
func (*QueryModuleAccountsResponse) GetAccounts ¶
func (m *QueryModuleAccountsResponse) GetAccounts() []AccountWithBalance
func (*QueryModuleAccountsResponse) Marshal ¶
func (m *QueryModuleAccountsResponse) Marshal() (dAtA []byte, err error)
func (*QueryModuleAccountsResponse) MarshalTo ¶
func (m *QueryModuleAccountsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryModuleAccountsResponse) MarshalToSizedBuffer ¶
func (m *QueryModuleAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryModuleAccountsResponse) ProtoMessage ¶
func (*QueryModuleAccountsResponse) ProtoMessage()
func (*QueryModuleAccountsResponse) Reset ¶
func (m *QueryModuleAccountsResponse) Reset()
func (*QueryModuleAccountsResponse) Size ¶
func (m *QueryModuleAccountsResponse) Size() (n int)
func (*QueryModuleAccountsResponse) String ¶
func (m *QueryModuleAccountsResponse) String() string
func (*QueryModuleAccountsResponse) Unmarshal ¶
func (m *QueryModuleAccountsResponse) Unmarshal(dAtA []byte) error
func (*QueryModuleAccountsResponse) XXX_DiscardUnknown ¶
func (m *QueryModuleAccountsResponse) XXX_DiscardUnknown()
func (*QueryModuleAccountsResponse) XXX_Marshal ¶
func (m *QueryModuleAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryModuleAccountsResponse) XXX_Merge ¶
func (m *QueryModuleAccountsResponse) XXX_Merge(src proto.Message)
func (*QueryModuleAccountsResponse) XXX_Size ¶
func (m *QueryModuleAccountsResponse) XXX_Size() int
func (*QueryModuleAccountsResponse) XXX_Unmarshal ¶
func (m *QueryModuleAccountsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface {
	// Queries the reserve assets in a given pool, identified by a token pair.
	ModuleAccounts(context.Context, *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, 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) ModuleAccounts ¶
func (*UnimplementedQueryServer) ModuleAccounts(ctx context.Context, req *QueryModuleAccountsRequest) (*QueryModuleAccountsResponse, error)