Documentation ¶
Index ¶
- Variables
- func RegisterCustomerServer(s *grpc.Server, srv CustomerServer)
- type CustomerClient
- type CustomerFilter
- type CustomerRequest
- func (*CustomerRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CustomerRequest) GetAddresses() []*CustomerRequest_Address
- func (x *CustomerRequest) GetEmail() string
- func (x *CustomerRequest) GetFirstName() string
- func (x *CustomerRequest) GetId() int32
- func (x *CustomerRequest) GetLastName() string
- func (x *CustomerRequest) GetPhone() string
- func (*CustomerRequest) ProtoMessage()
- func (x *CustomerRequest) ProtoReflect() protoreflect.Message
- func (x *CustomerRequest) Reset()
- func (x *CustomerRequest) String() string
- type CustomerRequest_Address
- func (*CustomerRequest_Address) Descriptor() ([]byte, []int)deprecated
- func (x *CustomerRequest_Address) GetCity() string
- func (x *CustomerRequest_Address) GetIsShippingAddress() bool
- func (x *CustomerRequest_Address) GetState() string
- func (x *CustomerRequest_Address) GetStreet() string
- func (x *CustomerRequest_Address) GetZip() string
- func (*CustomerRequest_Address) ProtoMessage()
- func (x *CustomerRequest_Address) ProtoReflect() protoreflect.Message
- func (x *CustomerRequest_Address) Reset()
- func (x *CustomerRequest_Address) String() string
- type CustomerResponse
- func (*CustomerResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CustomerResponse) GetId() int32
- func (x *CustomerResponse) GetSuccess() bool
- func (*CustomerResponse) ProtoMessage()
- func (x *CustomerResponse) ProtoReflect() protoreflect.Message
- func (x *CustomerResponse) Reset()
- func (x *CustomerResponse) String() string
- type CustomerServer
- type Customer_GetCustomersClient
- type Customer_GetCustomersServer
- type UnimplementedCustomerServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_customer_proto protoreflect.FileDescriptor
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) }
CustomerClient is the client API for Customer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewCustomerClient ¶
func NewCustomerClient(cc grpc.ClientConnInterface) CustomerClient
type CustomerFilter ¶
type CustomerFilter struct { Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` // contains filtered or unexported fields }
func (*CustomerFilter) Descriptor
deprecated
func (*CustomerFilter) Descriptor() ([]byte, []int)
Deprecated: Use CustomerFilter.ProtoReflect.Descriptor instead.
func (*CustomerFilter) GetKeyword ¶
func (x *CustomerFilter) GetKeyword() string
func (*CustomerFilter) ProtoMessage ¶
func (*CustomerFilter) ProtoMessage()
func (*CustomerFilter) ProtoReflect ¶
func (x *CustomerFilter) ProtoReflect() protoreflect.Message
func (*CustomerFilter) Reset ¶
func (x *CustomerFilter) Reset()
func (*CustomerFilter) String ¶
func (x *CustomerFilter) String() string
type CustomerRequest ¶
type CustomerRequest struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Unique ID number for a Customer. FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` Addresses []*CustomerRequest_Address `protobuf:"bytes,6,rep,name=addresses,proto3" json:"addresses,omitempty"` // contains filtered or unexported fields }
Request message for creating a new customer
func (*CustomerRequest) Descriptor
deprecated
func (*CustomerRequest) Descriptor() ([]byte, []int)
Deprecated: Use CustomerRequest.ProtoReflect.Descriptor instead.
func (*CustomerRequest) GetAddresses ¶
func (x *CustomerRequest) GetAddresses() []*CustomerRequest_Address
func (*CustomerRequest) GetEmail ¶
func (x *CustomerRequest) GetEmail() string
func (*CustomerRequest) GetFirstName ¶
func (x *CustomerRequest) GetFirstName() string
func (*CustomerRequest) GetId ¶
func (x *CustomerRequest) GetId() int32
func (*CustomerRequest) GetLastName ¶
func (x *CustomerRequest) GetLastName() string
func (*CustomerRequest) GetPhone ¶
func (x *CustomerRequest) GetPhone() string
func (*CustomerRequest) ProtoMessage ¶
func (*CustomerRequest) ProtoMessage()
func (*CustomerRequest) ProtoReflect ¶
func (x *CustomerRequest) ProtoReflect() protoreflect.Message
func (*CustomerRequest) Reset ¶
func (x *CustomerRequest) Reset()
func (*CustomerRequest) String ¶
func (x *CustomerRequest) String() string
type CustomerRequest_Address ¶
type CustomerRequest_Address struct { Street string `protobuf:"bytes,1,opt,name=street,proto3" json:"street,omitempty"` City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` Zip string `protobuf:"bytes,4,opt,name=zip,proto3" json:"zip,omitempty"` IsShippingAddress bool `protobuf:"varint,5,opt,name=isShippingAddress,proto3" json:"isShippingAddress,omitempty"` // contains filtered or unexported fields }
func (*CustomerRequest_Address) Descriptor
deprecated
func (*CustomerRequest_Address) Descriptor() ([]byte, []int)
Deprecated: Use CustomerRequest_Address.ProtoReflect.Descriptor instead.
func (*CustomerRequest_Address) GetCity ¶
func (x *CustomerRequest_Address) GetCity() string
func (*CustomerRequest_Address) GetIsShippingAddress ¶
func (x *CustomerRequest_Address) GetIsShippingAddress() bool
func (*CustomerRequest_Address) GetState ¶
func (x *CustomerRequest_Address) GetState() string
func (*CustomerRequest_Address) GetStreet ¶
func (x *CustomerRequest_Address) GetStreet() string
func (*CustomerRequest_Address) GetZip ¶
func (x *CustomerRequest_Address) GetZip() string
func (*CustomerRequest_Address) ProtoMessage ¶
func (*CustomerRequest_Address) ProtoMessage()
func (*CustomerRequest_Address) ProtoReflect ¶
func (x *CustomerRequest_Address) ProtoReflect() protoreflect.Message
func (*CustomerRequest_Address) Reset ¶
func (x *CustomerRequest_Address) Reset()
func (*CustomerRequest_Address) String ¶
func (x *CustomerRequest_Address) String() string
type CustomerResponse ¶
type CustomerResponse struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*CustomerResponse) Descriptor
deprecated
func (*CustomerResponse) Descriptor() ([]byte, []int)
Deprecated: Use CustomerResponse.ProtoReflect.Descriptor instead.
func (*CustomerResponse) GetId ¶
func (x *CustomerResponse) GetId() int32
func (*CustomerResponse) GetSuccess ¶
func (x *CustomerResponse) GetSuccess() bool
func (*CustomerResponse) ProtoMessage ¶
func (*CustomerResponse) ProtoMessage()
func (*CustomerResponse) ProtoReflect ¶
func (x *CustomerResponse) ProtoReflect() protoreflect.Message
func (*CustomerResponse) Reset ¶
func (x *CustomerResponse) Reset()
func (*CustomerResponse) String ¶
func (x *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) }
CustomerServer is the server API for Customer service.
type Customer_GetCustomersClient ¶
type Customer_GetCustomersClient interface { Recv() (*CustomerRequest, error) grpc.ClientStream }
type Customer_GetCustomersServer ¶
type Customer_GetCustomersServer interface { Send(*CustomerRequest) error grpc.ServerStream }
type UnimplementedCustomerServer ¶
type UnimplementedCustomerServer struct { }
UnimplementedCustomerServer can be embedded to have forward compatible implementations.
func (*UnimplementedCustomerServer) CreateCustomer ¶
func (*UnimplementedCustomerServer) CreateCustomer(context.Context, *CustomerRequest) (*CustomerResponse, error)
func (*UnimplementedCustomerServer) GetCustomers ¶
func (*UnimplementedCustomerServer) GetCustomers(*CustomerFilter, Customer_GetCustomersServer) error
Click to show internal directories.
Click to hide internal directories.