Documentation ¶
Overview ¶
Package customer is a generated protocol buffer package.
It is generated from these files:
customer.proto
It has these top-level messages:
CustomerRequest CustomerResponse CustomerFilter
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCustomerServer ¶
func RegisterCustomerServer(s *grpc.Server, srv CustomerServer)
Types ¶
type CustomerClient ¶
type CustomerClient interface { // Get all Customers with filter - A server-to-client streaming RPC. GetCustomers(ctx context.Context, in *CustomerFilter, opts ...grpc.CallOption) (Customer_GetCustomersClient, error) // Create a new Customer - A simple RPC CreateCustomer(ctx context.Context, in *CustomerRequest, opts ...grpc.CallOption) (*CustomerResponse, error) }
func NewCustomerClient ¶
func NewCustomerClient(cc *grpc.ClientConn) CustomerClient
type CustomerFilter ¶
type CustomerFilter struct {
Keyword string `protobuf:"bytes,1,opt,name=keyword" json:"keyword,omitempty"`
}
func (*CustomerFilter) Descriptor ¶
func (*CustomerFilter) Descriptor() ([]byte, []int)
func (*CustomerFilter) ProtoMessage ¶
func (*CustomerFilter) ProtoMessage()
func (*CustomerFilter) Reset ¶
func (m *CustomerFilter) Reset()
func (*CustomerFilter) String ¶
func (m *CustomerFilter) String() string
type CustomerRequest ¶
type CustomerRequest struct { Id int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone" json:"phone,omitempty"` Addresses []*CustomerRequest_Address `protobuf:"bytes,5,rep,name=addresses" json:"addresses,omitempty"` }
Request message for creating a new customer
func (*CustomerRequest) Descriptor ¶
func (*CustomerRequest) Descriptor() ([]byte, []int)
func (*CustomerRequest) GetAddresses ¶
func (m *CustomerRequest) GetAddresses() []*CustomerRequest_Address
func (*CustomerRequest) ProtoMessage ¶
func (*CustomerRequest) ProtoMessage()
func (*CustomerRequest) Reset ¶
func (m *CustomerRequest) Reset()
func (*CustomerRequest) String ¶
func (m *CustomerRequest) String() string
type CustomerRequest_Address ¶
type CustomerRequest_Address struct { Street string `protobuf:"bytes,1,opt,name=street" json:"street,omitempty"` City string `protobuf:"bytes,2,opt,name=city" json:"city,omitempty"` State string `protobuf:"bytes,3,opt,name=state" json:"state,omitempty"` Zip string `protobuf:"bytes,4,opt,name=zip" json:"zip,omitempty"` IsShippingAddress bool `protobuf:"varint,5,opt,name=isShippingAddress" json:"isShippingAddress,omitempty"` }
func (*CustomerRequest_Address) Descriptor ¶
func (*CustomerRequest_Address) Descriptor() ([]byte, []int)
func (*CustomerRequest_Address) ProtoMessage ¶
func (*CustomerRequest_Address) ProtoMessage()
func (*CustomerRequest_Address) Reset ¶
func (m *CustomerRequest_Address) Reset()
func (*CustomerRequest_Address) String ¶
func (m *CustomerRequest_Address) String() string
type CustomerResponse ¶
type CustomerResponse struct { Id int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"` Success bool `protobuf:"varint,2,opt,name=success" json:"success,omitempty"` }
func (*CustomerResponse) Descriptor ¶
func (*CustomerResponse) Descriptor() ([]byte, []int)
func (*CustomerResponse) ProtoMessage ¶
func (*CustomerResponse) ProtoMessage()
func (*CustomerResponse) Reset ¶
func (m *CustomerResponse) Reset()
func (*CustomerResponse) String ¶
func (m *CustomerResponse) String() string
type CustomerServer ¶
type CustomerServer interface { // Get all Customers with filter - A server-to-client streaming RPC. GetCustomers(*CustomerFilter, Customer_GetCustomersServer) error // Create a new Customer - A simple RPC CreateCustomer(context.Context, *CustomerRequest) (*CustomerResponse, error) }
type Customer_GetCustomersClient ¶
type Customer_GetCustomersClient interface { Recv() (*CustomerRequest, error) grpc.ClientStream }
type Customer_GetCustomersServer ¶
type Customer_GetCustomersServer interface { Send(*CustomerRequest) error grpc.ServerStream }
Click to show internal directories.
Click to hide internal directories.