Documentation ¶
Overview ¶
Code generated by ../../../scripts/grpcserver.sh widgets. DO NOT EDIT.
Code generated by ../../../scripts/grpcserver.sh widgets. DO NOT EDIT.
Index ¶
- func Run()
- type GRPCService
- type LoggerInterface
- type Service
- func (s *Service) Connect() error
- func (s *Service) Create(ctx context.Context, r *widgetsAPI.CreateRequest) (*widgetsAPI.Widget, error)
- func (s *Service) Delete(ctx context.Context, r *widgetsAPI.DeleteRequest) (*empty.Empty, error)
- func (s *Service) FindByID(ctx context.Context, r *widgetsAPI.FindRequest) (*widgetsAPI.Widget, error)
- func (s *Service) List(ctx context.Context, r *widgetsAPI.ListRequest) (*widgetsAPI.ListResponse, error)
- func (s *Service) Run() error
- func (s *Service) StartGRPCService() error
- func (s *Service) Update(ctx context.Context, r *widgetsAPI.UpdateRequest) (*widgetsAPI.Widget, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GRPCService ¶
GRPCService represents an incoming connection i.e a server that handles GRPC messages sent from a client.
func (*GRPCService) Stop ¶
func (g *GRPCService) Stop()
type LoggerInterface ¶
type LoggerInterface interface { Open() error Close() Debug() *zerolog.Event Fatal() *zerolog.Event Info() *zerolog.Event }
LoggerInterface corresponds to most interfaces that have an Open/Close interfaces.
type Service ¶
type Service struct { widgetsAPI.UnimplementedWidgetsServer // An interface as we may want to mock it out in tests. Logger LoggerInterface // A concrete implementation of a GRPC service. GRPC GRPCService }
implments the widgetsAPI.WidgetsServer interfacw
func (*Service) Create ¶
func (s *Service) Create( ctx context.Context, r *widgetsAPI.CreateRequest, ) (*widgetsAPI.Widget, error)
func (*Service) Delete ¶
func (s *Service) Delete( ctx context.Context, r *widgetsAPI.DeleteRequest, ) (*empty.Empty, error)
func (*Service) FindByID ¶
func (s *Service) FindByID( ctx context.Context, r *widgetsAPI.FindRequest, ) (*widgetsAPI.Widget, error)
func (*Service) List ¶
func (s *Service) List( ctx context.Context, r *widgetsAPI.ListRequest, ) (*widgetsAPI.ListResponse, error)
func (*Service) StartGRPCService ¶
StartGRPCService initialises the GRPC service structs generated in thee qpis package and starts the GRPC service.
func (*Service) Update ¶
func (s *Service) Update( ctx context.Context, r *widgetsAPI.UpdateRequest, ) (*widgetsAPI.Widget, error)
Click to show internal directories.
Click to hide internal directories.