Documentation ¶
Overview ¶
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterBloomFilterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBloomFilterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BloomFilterServiceClient) error
- func RegisterBloomFilterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBloomFilterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BloomFilterServiceServer) error
- func RegisterBloomFilterServiceServer(s *grpc.Server, srv BloomFilterServiceServer)
- type BloomFilterServiceClient
- type BloomFilterServiceServer
- type ExistRequest
- func (*ExistRequest) Descriptor() ([]byte, []int)
- func (m *ExistRequest) GetItem() string
- func (*ExistRequest) ProtoMessage()
- func (m *ExistRequest) Reset()
- func (m *ExistRequest) String() string
- func (m *ExistRequest) XXX_DiscardUnknown()
- func (m *ExistRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExistRequest) XXX_Merge(src proto.Message)
- func (m *ExistRequest) XXX_Size() int
- func (m *ExistRequest) XXX_Unmarshal(b []byte) error
- type ExistResponse
- func (*ExistResponse) Descriptor() ([]byte, []int)
- func (m *ExistResponse) GetExist() bool
- func (*ExistResponse) ProtoMessage()
- func (m *ExistResponse) Reset()
- func (m *ExistResponse) String() string
- func (m *ExistResponse) XXX_DiscardUnknown()
- func (m *ExistResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ExistResponse) XXX_Merge(src proto.Message)
- func (m *ExistResponse) XXX_Size() int
- func (m *ExistResponse) XXX_Unmarshal(b []byte) error
- type InsertRequest
- func (*InsertRequest) Descriptor() ([]byte, []int)
- func (m *InsertRequest) GetItem() string
- func (*InsertRequest) ProtoMessage()
- func (m *InsertRequest) Reset()
- func (m *InsertRequest) String() string
- func (m *InsertRequest) XXX_DiscardUnknown()
- func (m *InsertRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InsertRequest) XXX_Merge(src proto.Message)
- func (m *InsertRequest) XXX_Size() int
- func (m *InsertRequest) XXX_Unmarshal(b []byte) error
- type InsertResponse
- func (*InsertResponse) Descriptor() ([]byte, []int)
- func (*InsertResponse) ProtoMessage()
- func (m *InsertResponse) Reset()
- func (m *InsertResponse) String() string
- func (m *InsertResponse) XXX_DiscardUnknown()
- func (m *InsertResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InsertResponse) XXX_Merge(src proto.Message)
- func (m *InsertResponse) XXX_Size() int
- func (m *InsertResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedBloomFilterServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterBloomFilterServiceHandler ¶
func RegisterBloomFilterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBloomFilterServiceHandler registers the http handlers for service BloomFilterService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBloomFilterServiceHandlerClient ¶
func RegisterBloomFilterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BloomFilterServiceClient) error
RegisterBloomFilterServiceHandlerClient registers the http handlers for service BloomFilterService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BloomFilterServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BloomFilterServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BloomFilterServiceClient" to call the correct interceptors.
func RegisterBloomFilterServiceHandlerFromEndpoint ¶
func RegisterBloomFilterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBloomFilterServiceHandlerFromEndpoint is same as RegisterBloomFilterServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBloomFilterServiceHandlerServer ¶
func RegisterBloomFilterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BloomFilterServiceServer) error
RegisterBloomFilterServiceHandlerServer registers the http handlers for service BloomFilterService to "mux". UnaryRPC :call BloomFilterServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterBloomFilterServiceServer ¶
func RegisterBloomFilterServiceServer(s *grpc.Server, srv BloomFilterServiceServer)
Types ¶
type BloomFilterServiceClient ¶
type BloomFilterServiceClient interface { Insert(ctx context.Context, in *InsertRequest, opts ...grpc.CallOption) (*InsertResponse, error) Exist(ctx context.Context, in *ExistRequest, opts ...grpc.CallOption) (*ExistResponse, error) }
BloomFilterServiceClient is the client API for BloomFilterService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBloomFilterServiceClient ¶
func NewBloomFilterServiceClient(cc *grpc.ClientConn) BloomFilterServiceClient
type BloomFilterServiceServer ¶
type BloomFilterServiceServer interface { Insert(context.Context, *InsertRequest) (*InsertResponse, error) Exist(context.Context, *ExistRequest) (*ExistResponse, error) }
BloomFilterServiceServer is the server API for BloomFilterService service.
type ExistRequest ¶
type ExistRequest struct { Item string `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ExistRequest) Descriptor ¶
func (*ExistRequest) Descriptor() ([]byte, []int)
func (*ExistRequest) GetItem ¶
func (m *ExistRequest) GetItem() string
func (*ExistRequest) ProtoMessage ¶
func (*ExistRequest) ProtoMessage()
func (*ExistRequest) Reset ¶
func (m *ExistRequest) Reset()
func (*ExistRequest) String ¶
func (m *ExistRequest) String() string
func (*ExistRequest) XXX_DiscardUnknown ¶
func (m *ExistRequest) XXX_DiscardUnknown()
func (*ExistRequest) XXX_Marshal ¶
func (m *ExistRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExistRequest) XXX_Merge ¶
func (m *ExistRequest) XXX_Merge(src proto.Message)
func (*ExistRequest) XXX_Size ¶
func (m *ExistRequest) XXX_Size() int
func (*ExistRequest) XXX_Unmarshal ¶
func (m *ExistRequest) XXX_Unmarshal(b []byte) error
type ExistResponse ¶
type ExistResponse struct { Exist bool `protobuf:"varint,1,opt,name=exist,proto3" json:"exist,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ExistResponse) Descriptor ¶
func (*ExistResponse) Descriptor() ([]byte, []int)
func (*ExistResponse) GetExist ¶
func (m *ExistResponse) GetExist() bool
func (*ExistResponse) ProtoMessage ¶
func (*ExistResponse) ProtoMessage()
func (*ExistResponse) Reset ¶
func (m *ExistResponse) Reset()
func (*ExistResponse) String ¶
func (m *ExistResponse) String() string
func (*ExistResponse) XXX_DiscardUnknown ¶
func (m *ExistResponse) XXX_DiscardUnknown()
func (*ExistResponse) XXX_Marshal ¶
func (m *ExistResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ExistResponse) XXX_Merge ¶
func (m *ExistResponse) XXX_Merge(src proto.Message)
func (*ExistResponse) XXX_Size ¶
func (m *ExistResponse) XXX_Size() int
func (*ExistResponse) XXX_Unmarshal ¶
func (m *ExistResponse) XXX_Unmarshal(b []byte) error
type InsertRequest ¶
type InsertRequest struct { Item string `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*InsertRequest) Descriptor ¶
func (*InsertRequest) Descriptor() ([]byte, []int)
func (*InsertRequest) GetItem ¶
func (m *InsertRequest) GetItem() string
func (*InsertRequest) ProtoMessage ¶
func (*InsertRequest) ProtoMessage()
func (*InsertRequest) Reset ¶
func (m *InsertRequest) Reset()
func (*InsertRequest) String ¶
func (m *InsertRequest) String() string
func (*InsertRequest) XXX_DiscardUnknown ¶
func (m *InsertRequest) XXX_DiscardUnknown()
func (*InsertRequest) XXX_Marshal ¶
func (m *InsertRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InsertRequest) XXX_Merge ¶
func (m *InsertRequest) XXX_Merge(src proto.Message)
func (*InsertRequest) XXX_Size ¶
func (m *InsertRequest) XXX_Size() int
func (*InsertRequest) XXX_Unmarshal ¶
func (m *InsertRequest) XXX_Unmarshal(b []byte) error
type InsertResponse ¶
type InsertResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*InsertResponse) Descriptor ¶
func (*InsertResponse) Descriptor() ([]byte, []int)
func (*InsertResponse) ProtoMessage ¶
func (*InsertResponse) ProtoMessage()
func (*InsertResponse) Reset ¶
func (m *InsertResponse) Reset()
func (*InsertResponse) String ¶
func (m *InsertResponse) String() string
func (*InsertResponse) XXX_DiscardUnknown ¶
func (m *InsertResponse) XXX_DiscardUnknown()
func (*InsertResponse) XXX_Marshal ¶
func (m *InsertResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InsertResponse) XXX_Merge ¶
func (m *InsertResponse) XXX_Merge(src proto.Message)
func (*InsertResponse) XXX_Size ¶
func (m *InsertResponse) XXX_Size() int
func (*InsertResponse) XXX_Unmarshal ¶
func (m *InsertResponse) XXX_Unmarshal(b []byte) error
type UnimplementedBloomFilterServiceServer ¶
type UnimplementedBloomFilterServiceServer struct { }
UnimplementedBloomFilterServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedBloomFilterServiceServer) Exist ¶
func (*UnimplementedBloomFilterServiceServer) Exist(ctx context.Context, req *ExistRequest) (*ExistResponse, error)
func (*UnimplementedBloomFilterServiceServer) Insert ¶
func (*UnimplementedBloomFilterServiceServer) Insert(ctx context.Context, req *InsertRequest) (*InsertResponse, error)