Documentation
¶
Index ¶
- Variables
- func RegisterContactServiceServer(s grpc.ServiceRegistrar, srv ContactServiceServer)
- type Contact
- func (*Contact) Descriptor() ([]byte, []int)deprecated
- func (x *Contact) GetAge() int32
- func (x *Contact) GetCity() string
- func (x *Contact) GetEmail() string
- func (x *Contact) GetId() int32
- func (x *Contact) GetName() string
- func (x *Contact) GetPhone() string
- func (*Contact) ProtoMessage()
- func (x *Contact) ProtoReflect() protoreflect.Message
- func (x *Contact) Reset()
- func (x *Contact) String() string
- type ContactServiceClient
- type ContactServiceServer
- type ContactService_GetAllContactsClient
- type ContactService_GetAllContactsServer
- type GetContactInput
- type UnimplementedContactServiceServer
- func (UnimplementedContactServiceServer) GetAllContacts(*emptypb.Empty, ContactService_GetAllContactsServer) error
- func (UnimplementedContactServiceServer) GetContactById(context.Context, *GetContactInput) (*Contact, error)
- func (UnimplementedContactServiceServer) NewContact(context.Context, *Contact) (*Contact, error)
- type UnsafeContactServiceServer
Constants ¶
This section is empty.
Variables ¶
var ContactService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "contacts.ContactService", HandlerType: (*ContactServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "NewContact", Handler: _ContactService_NewContact_Handler, }, { MethodName: "GetContactById", Handler: _ContactService_GetContactById_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetAllContacts", Handler: _ContactService_GetAllContacts_Handler, ServerStreams: true, }, }, Metadata: "contacts.proto", }
ContactService_ServiceDesc is the grpc.ServiceDesc for ContactService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_contacts_proto protoreflect.FileDescriptor
Functions ¶
func RegisterContactServiceServer ¶
func RegisterContactServiceServer(s grpc.ServiceRegistrar, srv ContactServiceServer)
Types ¶
type Contact ¶
type Contact struct { Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` Phone string `protobuf:"bytes,3,opt,name=Phone,proto3" json:"Phone,omitempty"` Email string `protobuf:"bytes,4,opt,name=Email,proto3" json:"Email,omitempty"` City string `protobuf:"bytes,5,opt,name=City,proto3" json:"City,omitempty"` Age int32 `protobuf:"varint,6,opt,name=Age,proto3" json:"Age,omitempty"` // contains filtered or unexported fields }
func (*Contact) Descriptor
deprecated
func (*Contact) ProtoMessage ¶
func (*Contact) ProtoMessage()
func (*Contact) ProtoReflect ¶
func (x *Contact) ProtoReflect() protoreflect.Message
type ContactServiceClient ¶
type ContactServiceClient interface { NewContact(ctx context.Context, in *Contact, opts ...grpc.CallOption) (*Contact, error) GetAllContacts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (ContactService_GetAllContactsClient, error) GetContactById(ctx context.Context, in *GetContactInput, opts ...grpc.CallOption) (*Contact, error) }
ContactServiceClient is the client API for ContactService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewContactServiceClient ¶
func NewContactServiceClient(cc grpc.ClientConnInterface) ContactServiceClient
type ContactServiceServer ¶
type ContactServiceServer interface { NewContact(context.Context, *Contact) (*Contact, error) GetAllContacts(*emptypb.Empty, ContactService_GetAllContactsServer) error GetContactById(context.Context, *GetContactInput) (*Contact, error) // contains filtered or unexported methods }
ContactServiceServer is the server API for ContactService service. All implementations must embed UnimplementedContactServiceServer for forward compatibility
type ContactService_GetAllContactsClient ¶
type ContactService_GetAllContactsClient interface { Recv() (*Contact, error) grpc.ClientStream }
type ContactService_GetAllContactsServer ¶
type ContactService_GetAllContactsServer interface { Send(*Contact) error grpc.ServerStream }
type GetContactInput ¶
type GetContactInput struct { Id int32 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"` // contains filtered or unexported fields }
func (*GetContactInput) Descriptor
deprecated
func (*GetContactInput) Descriptor() ([]byte, []int)
Deprecated: Use GetContactInput.ProtoReflect.Descriptor instead.
func (*GetContactInput) GetId ¶
func (x *GetContactInput) GetId() int32
func (*GetContactInput) ProtoMessage ¶
func (*GetContactInput) ProtoMessage()
func (*GetContactInput) ProtoReflect ¶
func (x *GetContactInput) ProtoReflect() protoreflect.Message
func (*GetContactInput) Reset ¶
func (x *GetContactInput) Reset()
func (*GetContactInput) String ¶
func (x *GetContactInput) String() string
type UnimplementedContactServiceServer ¶
type UnimplementedContactServiceServer struct { }
UnimplementedContactServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedContactServiceServer) GetAllContacts ¶
func (UnimplementedContactServiceServer) GetAllContacts(*emptypb.Empty, ContactService_GetAllContactsServer) error
func (UnimplementedContactServiceServer) GetContactById ¶
func (UnimplementedContactServiceServer) GetContactById(context.Context, *GetContactInput) (*Contact, error)
func (UnimplementedContactServiceServer) NewContact ¶
type UnsafeContactServiceServer ¶
type UnsafeContactServiceServer interface {
// contains filtered or unexported methods
}
UnsafeContactServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ContactServiceServer will result in compilation errors.