Documentation ¶
Index ¶
- type CallOption
- type Client
- func (c *Client) AddCustomers(ctx context.Context, customers []*pb.Customer, options ...CallOption) ([]string, error)
- func (c *Client) DeleteCustomers(ctx context.Context, ids []string, options ...CallOption) error
- func (c *Client) SearchCustomers(ctx context.Context, filter *pb.SearchCustomersReq, options ...CallOption) (chan Customer, error)
- func (c *Client) UpdateCustomers(ctx context.Context, customers []*pb.Customer, options ...CallOption) error
- type Customer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallOption ¶
type CallOption func(co *callOptions)
CallOption are optional options for an RPC call.
func TraceID ¶
func TraceID(s *string) CallOption
TraceID will cause the RPC call to execute a trace on the service and return "s" to the ID. If s == nil, this will ignore the option. If "s" is not set after the call finishes, then no trace was made.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client to the CRM service.
func (*Client) AddCustomers ¶
func (c *Client) AddCustomers(ctx context.Context, customers []*pb.Customer, options ...CallOption) ([]string, error)
AddCustomers adds customers to the service and returns their unique identities in the same order as being added.
func (*Client) DeleteCustomers ¶
DeleteCustomers deletes pets with the IDs passed. If the ID doesn't exist, the system ignores it.
func (*Client) SearchCustomers ¶
func (c *Client) SearchCustomers(ctx context.Context, filter *pb.SearchCustomersReq, options ...CallOption) (chan Customer, error)
SearchCustomers searches the pet store for pets matching the filter. If the filter contains no entries, then all pets will be returned.
func (*Client) UpdateCustomers ¶
func (c *Client) UpdateCustomers(ctx context.Context, customers []*pb.Customer, options ...CallOption) error
UpdateCustomers updates customers that already exist in the system.