Documentation
¶
Overview ¶
Package omniscience is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterIngesterServer(s *grpc.Server, srv IngesterServer)
- func RegisterSearchHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSearchHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SearchClient) error
- func RegisterSearchHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSearchServer(s *grpc.Server, srv SearchServer)
- type Document
- func (*Document) Descriptor() ([]byte, []int)
- func (m *Document) GetContent() string
- func (m *Document) GetDescription() string
- func (m *Document) GetId() *DocumentId
- func (m *Document) GetLastModified() *timestamp.Timestamp
- func (m *Document) GetService() string
- func (m *Document) GetTitle() string
- func (m *Document) GetUrl() string
- func (*Document) ProtoMessage()
- func (m *Document) Reset()
- func (m *Document) String() string
- func (m *Document) XXX_DiscardUnknown()
- func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Document) XXX_Merge(src proto.Message)
- func (m *Document) XXX_Size() int
- func (m *Document) XXX_Unmarshal(b []byte) error
- type DocumentId
- func (*DocumentId) Descriptor() ([]byte, []int)
- func (m *DocumentId) GetId() string
- func (*DocumentId) ProtoMessage()
- func (m *DocumentId) Reset()
- func (m *DocumentId) String() string
- func (m *DocumentId) XXX_DiscardUnknown()
- func (m *DocumentId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *DocumentId) XXX_Merge(src proto.Message)
- func (m *DocumentId) XXX_Size() int
- func (m *DocumentId) XXX_Unmarshal(b []byte) error
- type IngesterClient
- type IngesterServer
- type Ingester_IngestClient
- type Ingester_IngestServer
- type ListServicesRequest
- func (*ListServicesRequest) Descriptor() ([]byte, []int)
- func (*ListServicesRequest) ProtoMessage()
- func (m *ListServicesRequest) Reset()
- func (m *ListServicesRequest) String() string
- func (m *ListServicesRequest) XXX_DiscardUnknown()
- func (m *ListServicesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ListServicesRequest) XXX_Merge(src proto.Message)
- func (m *ListServicesRequest) XXX_Size() int
- func (m *ListServicesRequest) XXX_Unmarshal(b []byte) error
- type ListServicesResponse
- func (*ListServicesResponse) Descriptor() ([]byte, []int)
- func (m *ListServicesResponse) GetServices() []*Service
- func (*ListServicesResponse) ProtoMessage()
- func (m *ListServicesResponse) Reset()
- func (m *ListServicesResponse) String() string
- func (m *ListServicesResponse) XXX_DiscardUnknown()
- func (m *ListServicesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ListServicesResponse) XXX_Merge(src proto.Message)
- func (m *ListServicesResponse) XXX_Size() int
- func (m *ListServicesResponse) XXX_Unmarshal(b []byte) error
- type SearchClient
- type SearchServer
- type Service
- func (*Service) Descriptor() ([]byte, []int)
- func (m *Service) GetId() string
- func (*Service) ProtoMessage()
- func (m *Service) Reset()
- func (m *Service) String() string
- func (m *Service) XXX_DiscardUnknown()
- func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Service) XXX_Merge(src proto.Message)
- func (m *Service) XXX_Size() int
- func (m *Service) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterIngesterServer ¶
func RegisterIngesterServer(s *grpc.Server, srv IngesterServer)
func RegisterSearchHandler ¶
RegisterSearchHandler registers the http handlers for service Search to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSearchHandlerClient ¶
func RegisterSearchHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SearchClient) error
RegisterSearchHandler registers the http handlers for service Search to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SearchClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SearchClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SearchClient" to call the correct interceptors.
func RegisterSearchHandlerFromEndpoint ¶
func RegisterSearchHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSearchHandlerFromEndpoint is same as RegisterSearchHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSearchServer ¶
func RegisterSearchServer(s *grpc.Server, srv SearchServer)
Types ¶
type Document ¶
type Document struct {
Id *DocumentId `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"`
Content string `protobuf:"bytes,4,opt,name=content" json:"content,omitempty"`
Url string `protobuf:"bytes,5,opt,name=url" json:"url,omitempty"`
Service string `protobuf:"bytes,6,opt,name=service" json:"service,omitempty"`
LastModified *timestamp.Timestamp `protobuf:"bytes,7,opt,name=last_modified,json=lastModified" json:"last_modified,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Document) Descriptor ¶
func (*Document) GetContent ¶
func (*Document) GetDescription ¶
func (*Document) GetId ¶
func (m *Document) GetId() *DocumentId
func (*Document) GetLastModified ¶
func (*Document) GetService ¶
func (*Document) ProtoMessage ¶
func (*Document) ProtoMessage()
func (*Document) XXX_DiscardUnknown ¶
func (m *Document) XXX_DiscardUnknown()
func (*Document) XXX_Marshal ¶
func (*Document) XXX_Unmarshal ¶
type DocumentId ¶
type DocumentId struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*DocumentId) Descriptor ¶
func (*DocumentId) Descriptor() ([]byte, []int)
func (*DocumentId) GetId ¶
func (m *DocumentId) GetId() string
func (*DocumentId) ProtoMessage ¶
func (*DocumentId) ProtoMessage()
func (*DocumentId) Reset ¶
func (m *DocumentId) Reset()
func (*DocumentId) String ¶
func (m *DocumentId) String() string
func (*DocumentId) XXX_DiscardUnknown ¶
func (m *DocumentId) XXX_DiscardUnknown()
func (*DocumentId) XXX_Marshal ¶
func (m *DocumentId) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DocumentId) XXX_Merge ¶
func (dst *DocumentId) XXX_Merge(src proto.Message)
func (*DocumentId) XXX_Size ¶
func (m *DocumentId) XXX_Size() int
func (*DocumentId) XXX_Unmarshal ¶
func (m *DocumentId) XXX_Unmarshal(b []byte) error
type IngesterClient ¶
type IngesterClient interface {
// Ingests documents and indexes and uploads them to persistant storage.
Ingest(ctx context.Context, opts ...grpc.CallOption) (Ingester_IngestClient, error)
}
IngesterClient is the client API for Ingester service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewIngesterClient ¶
func NewIngesterClient(cc *grpc.ClientConn) IngesterClient
type IngesterServer ¶
type IngesterServer interface {
// Ingests documents and indexes and uploads them to persistant storage.
Ingest(Ingester_IngestServer) error
}
IngesterServer is the server API for Ingester service.
type Ingester_IngestClient ¶
type Ingester_IngestServer ¶
type ListServicesRequest ¶
type ListServicesRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ListServicesRequest) Descriptor ¶
func (*ListServicesRequest) Descriptor() ([]byte, []int)
func (*ListServicesRequest) ProtoMessage ¶
func (*ListServicesRequest) ProtoMessage()
func (*ListServicesRequest) Reset ¶
func (m *ListServicesRequest) Reset()
func (*ListServicesRequest) String ¶
func (m *ListServicesRequest) String() string
func (*ListServicesRequest) XXX_DiscardUnknown ¶
func (m *ListServicesRequest) XXX_DiscardUnknown()
func (*ListServicesRequest) XXX_Marshal ¶
func (m *ListServicesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListServicesRequest) XXX_Merge ¶
func (dst *ListServicesRequest) XXX_Merge(src proto.Message)
func (*ListServicesRequest) XXX_Size ¶
func (m *ListServicesRequest) XXX_Size() int
func (*ListServicesRequest) XXX_Unmarshal ¶
func (m *ListServicesRequest) XXX_Unmarshal(b []byte) error
type ListServicesResponse ¶
type ListServicesResponse struct {
Services []*Service `protobuf:"bytes,1,rep,name=services" json:"services,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*ListServicesResponse) Descriptor ¶
func (*ListServicesResponse) Descriptor() ([]byte, []int)
func (*ListServicesResponse) GetServices ¶
func (m *ListServicesResponse) GetServices() []*Service
func (*ListServicesResponse) ProtoMessage ¶
func (*ListServicesResponse) ProtoMessage()
func (*ListServicesResponse) Reset ¶
func (m *ListServicesResponse) Reset()
func (*ListServicesResponse) String ¶
func (m *ListServicesResponse) String() string
func (*ListServicesResponse) XXX_DiscardUnknown ¶
func (m *ListServicesResponse) XXX_DiscardUnknown()
func (*ListServicesResponse) XXX_Marshal ¶
func (m *ListServicesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListServicesResponse) XXX_Merge ¶
func (dst *ListServicesResponse) XXX_Merge(src proto.Message)
func (*ListServicesResponse) XXX_Size ¶
func (m *ListServicesResponse) XXX_Size() int
func (*ListServicesResponse) XXX_Unmarshal ¶
func (m *ListServicesResponse) XXX_Unmarshal(b []byte) error
type SearchClient ¶
type SearchClient interface {
// List all services which have documents available for searching.
ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error)
}
SearchClient is the client API for Search service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSearchClient ¶
func NewSearchClient(cc *grpc.ClientConn) SearchClient
type SearchServer ¶
type SearchServer interface {
// List all services which have documents available for searching.
ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error)
}
SearchServer is the server API for Search service.
type Service ¶
type Service struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Service) Descriptor ¶
func (*Service) ProtoMessage ¶
func (*Service) ProtoMessage()
func (*Service) XXX_DiscardUnknown ¶
func (m *Service) XXX_DiscardUnknown()