Documentation ¶
Index ¶
- type API
- func (a *API) AddCustomers(ctx context.Context, req *pb.AddCustomersReq) (resp *pb.AddCustomersResp, err error)
- func (a *API) DeleteCustomers(ctx context.Context, req *pb.DeleteCustomersReq) (resp *pb.DeleteCustomersResp, err error)
- func (a *API) SearchCustomers(req *pb.SearchCustomersReq, stream pb.CRM_SearchCustomersServer) error
- func (a *API) Start() error
- func (a *API) Stop()
- func (a *API) UpdateCustomers(ctx context.Context, req *pb.UpdateCustomersReq) (resp *pb.UpdateCustomersResp, err error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { pb.UnimplementedCRMServer // contains filtered or unexported fields }
API that implements our grpc server API
func (*API) AddCustomers ¶
func (a *API) AddCustomers(ctx context.Context, req *pb.AddCustomersReq) (resp *pb.AddCustomersResp, err error)
AddCustomers adds customers to the CRM
func (*API) DeleteCustomers ¶
func (a *API) DeleteCustomers(ctx context.Context, req *pb.DeleteCustomersReq) (resp *pb.DeleteCustomersResp, err error)
DeleteCustomers deletes customers from the CRM.
func (*API) SearchCustomers ¶
func (a *API) SearchCustomers(req *pb.SearchCustomersReq, stream pb.CRM_SearchCustomersServer) error
SearchCustomers finds customers in the CRM.
func (*API) UpdateCustomers ¶
func (a *API) UpdateCustomers(ctx context.Context, req *pb.UpdateCustomersReq) (resp *pb.UpdateCustomersResp, err error)
UpdateCustomers updates customers on the CRM
type Option ¶
type Option func(a *API)
Option to customize grpc
func WithGRPCOpts ¶
func WithGRPCOpts(opts ...grpc.ServerOption) Option
WithGRPCOpts creates the gRPC server with the options passed.
Click to show internal directories.
Click to hide internal directories.