Documentation ¶
Overview ¶
Package queryproto is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- 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 QueryClient
- type QueryServer
- type UnimplementedQueryServer
- type UserValidatorPreferencesRequest
- func (*UserValidatorPreferencesRequest) Descriptor() ([]byte, []int)
- func (m *UserValidatorPreferencesRequest) Marshal() (dAtA []byte, err error)
- func (m *UserValidatorPreferencesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *UserValidatorPreferencesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UserValidatorPreferencesRequest) ProtoMessage()
- func (m *UserValidatorPreferencesRequest) Reset()
- func (m *UserValidatorPreferencesRequest) Size() (n int)
- func (m *UserValidatorPreferencesRequest) String() string
- func (m *UserValidatorPreferencesRequest) Unmarshal(dAtA []byte) error
- func (m *UserValidatorPreferencesRequest) XXX_DiscardUnknown()
- func (m *UserValidatorPreferencesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserValidatorPreferencesRequest) XXX_Merge(src proto.Message)
- func (m *UserValidatorPreferencesRequest) XXX_Size() int
- func (m *UserValidatorPreferencesRequest) XXX_Unmarshal(b []byte) error
- type UserValidatorPreferencesResponse
- func (*UserValidatorPreferencesResponse) Descriptor() ([]byte, []int)
- func (m *UserValidatorPreferencesResponse) Marshal() (dAtA []byte, err error)
- func (m *UserValidatorPreferencesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *UserValidatorPreferencesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*UserValidatorPreferencesResponse) ProtoMessage()
- func (m *UserValidatorPreferencesResponse) Reset()
- func (m *UserValidatorPreferencesResponse) Size() (n int)
- func (m *UserValidatorPreferencesResponse) String() string
- func (m *UserValidatorPreferencesResponse) Unmarshal(dAtA []byte) error
- func (m *UserValidatorPreferencesResponse) XXX_DiscardUnknown()
- func (m *UserValidatorPreferencesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *UserValidatorPreferencesResponse) XXX_Merge(src proto.Message)
- func (m *UserValidatorPreferencesResponse) XXX_Size() int
- func (m *UserValidatorPreferencesResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type QueryClient ¶
type QueryClient interface { // Returns the list of ValidatorPreferences for the user. UserValidatorPreferences(ctx context.Context, in *UserValidatorPreferencesRequest, opts ...grpc.CallOption) (*UserValidatorPreferencesResponse, 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 { // Returns the list of ValidatorPreferences for the user. UserValidatorPreferences(context.Context, *UserValidatorPreferencesRequest) (*UserValidatorPreferencesResponse, 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) UserValidatorPreferences ¶
func (*UnimplementedQueryServer) UserValidatorPreferences(ctx context.Context, req *UserValidatorPreferencesRequest) (*UserValidatorPreferencesResponse, error)
type UserValidatorPreferencesRequest ¶
type UserValidatorPreferencesRequest struct { // user account address Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` }
Request type for UserValidatorPreferences.
func (*UserValidatorPreferencesRequest) Descriptor ¶
func (*UserValidatorPreferencesRequest) Descriptor() ([]byte, []int)
func (*UserValidatorPreferencesRequest) Marshal ¶
func (m *UserValidatorPreferencesRequest) Marshal() (dAtA []byte, err error)
func (*UserValidatorPreferencesRequest) MarshalTo ¶
func (m *UserValidatorPreferencesRequest) MarshalTo(dAtA []byte) (int, error)
func (*UserValidatorPreferencesRequest) MarshalToSizedBuffer ¶
func (m *UserValidatorPreferencesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*UserValidatorPreferencesRequest) ProtoMessage ¶
func (*UserValidatorPreferencesRequest) ProtoMessage()
func (*UserValidatorPreferencesRequest) Reset ¶
func (m *UserValidatorPreferencesRequest) Reset()
func (*UserValidatorPreferencesRequest) Size ¶
func (m *UserValidatorPreferencesRequest) Size() (n int)
func (*UserValidatorPreferencesRequest) String ¶
func (m *UserValidatorPreferencesRequest) String() string
func (*UserValidatorPreferencesRequest) Unmarshal ¶
func (m *UserValidatorPreferencesRequest) Unmarshal(dAtA []byte) error
func (*UserValidatorPreferencesRequest) XXX_DiscardUnknown ¶
func (m *UserValidatorPreferencesRequest) XXX_DiscardUnknown()
func (*UserValidatorPreferencesRequest) XXX_Marshal ¶
func (m *UserValidatorPreferencesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UserValidatorPreferencesRequest) XXX_Merge ¶
func (m *UserValidatorPreferencesRequest) XXX_Merge(src proto.Message)
func (*UserValidatorPreferencesRequest) XXX_Size ¶
func (m *UserValidatorPreferencesRequest) XXX_Size() int
func (*UserValidatorPreferencesRequest) XXX_Unmarshal ¶
func (m *UserValidatorPreferencesRequest) XXX_Unmarshal(b []byte) error
type UserValidatorPreferencesResponse ¶
type UserValidatorPreferencesResponse struct {
Preferences []types.ValidatorPreference `protobuf:"bytes,1,rep,name=preferences,proto3" json:"preferences"`
}
Response type the QueryUserValidatorPreferences query request
func (*UserValidatorPreferencesResponse) Descriptor ¶
func (*UserValidatorPreferencesResponse) Descriptor() ([]byte, []int)
func (*UserValidatorPreferencesResponse) Marshal ¶
func (m *UserValidatorPreferencesResponse) Marshal() (dAtA []byte, err error)
func (*UserValidatorPreferencesResponse) MarshalTo ¶
func (m *UserValidatorPreferencesResponse) MarshalTo(dAtA []byte) (int, error)
func (*UserValidatorPreferencesResponse) MarshalToSizedBuffer ¶
func (m *UserValidatorPreferencesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*UserValidatorPreferencesResponse) ProtoMessage ¶
func (*UserValidatorPreferencesResponse) ProtoMessage()
func (*UserValidatorPreferencesResponse) Reset ¶
func (m *UserValidatorPreferencesResponse) Reset()
func (*UserValidatorPreferencesResponse) Size ¶
func (m *UserValidatorPreferencesResponse) Size() (n int)
func (*UserValidatorPreferencesResponse) String ¶
func (m *UserValidatorPreferencesResponse) String() string
func (*UserValidatorPreferencesResponse) Unmarshal ¶
func (m *UserValidatorPreferencesResponse) Unmarshal(dAtA []byte) error
func (*UserValidatorPreferencesResponse) XXX_DiscardUnknown ¶
func (m *UserValidatorPreferencesResponse) XXX_DiscardUnknown()
func (*UserValidatorPreferencesResponse) XXX_Marshal ¶
func (m *UserValidatorPreferencesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UserValidatorPreferencesResponse) XXX_Merge ¶
func (m *UserValidatorPreferencesResponse) XXX_Merge(src proto.Message)
func (*UserValidatorPreferencesResponse) XXX_Size ¶
func (m *UserValidatorPreferencesResponse) XXX_Size() int
func (*UserValidatorPreferencesResponse) XXX_Unmarshal ¶
func (m *UserValidatorPreferencesResponse) XXX_Unmarshal(b []byte) error