Documentation ¶
Index ¶
- Constants
- type Server
- func (s *Server) Create(ctx context.Context, in *pb.Entity) (*pb.CommandResponse, error)
- func (s *Server) Delete(ctx context.Context, in *pb.KeyRequest) (*pb.CommandResponse, error)
- func (s *Server) Get(ctx context.Context, in *pb.KeyRequest) (*pb.Entity, error)
- func (s *Server) Import(stream pb.RPC_ImportServer) error
- func (s *Server) Index(ctx context.Context, in *pb.IndexRequest) (*pb.IndexResponse, error)
- func (s *Server) Patch(ctx context.Context, in *pb.KeyEntityRequest) (*pb.CommandResponse, error)
- func (s *Server) Put(ctx context.Context, in *pb.KeyEntityRequest) (*pb.CommandResponse, error)
Constants ¶
View Source
const KeyPath = "key"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { pb.UnimplementedRPCServer // contains filtered or unexported fields }
func NewServer ¶
func NewServer(repository i.Repository, logger i.Logger) *Server
NewServer creates new gRPC server with repository and logger
func (*Server) Delete ¶
func (s *Server) Delete(ctx context.Context, in *pb.KeyRequest) (*pb.CommandResponse, error)
Delete deletes entity found by key (id)
func (*Server) Import ¶
func (s *Server) Import(stream pb.RPC_ImportServer) error
Import implements RPC_ImportServer
func (*Server) Index ¶
func (s *Server) Index(ctx context.Context, in *pb.IndexRequest) (*pb.IndexResponse, error)
Index returns batch of Entities
func (*Server) Patch ¶
func (s *Server) Patch(ctx context.Context, in *pb.KeyEntityRequest) (*pb.CommandResponse, error)
Patch updates values of existing document with the same id
func (*Server) Put ¶
func (s *Server) Put(ctx context.Context, in *pb.KeyEntityRequest) (*pb.CommandResponse, error)
Put replaces document with the new one with the same id
Click to show internal directories.
Click to hide internal directories.