Documentation ¶
Index ¶
- Variables
- func RegisterPersonServiceServer(s grpc.ServiceRegistrar, srv PersonServiceServer)
- type GetPersonInput
- type Person
- func (*Person) Descriptor() ([]byte, []int)deprecated
- func (x *Person) GetBirthDate() *timestamppb.Timestamp
- func (x *Person) GetId() string
- func (x *Person) GetName() string
- func (*Person) ProtoMessage()
- func (x *Person) ProtoReflect() protoreflect.Message
- func (x *Person) Reset()
- func (x *Person) String() string
- type PersonServiceClient
- type PersonServiceServer
- type UnimplementedPersonServiceServer
- type UnsafePersonServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_person_proto protoreflect.FileDescriptor
var PersonService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "greet.PersonService", HandlerType: (*PersonServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetPerson", Handler: _PersonService_GetPerson_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "person.proto", }
PersonService_ServiceDesc is the grpc.ServiceDesc for PersonService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPersonServiceServer ¶
func RegisterPersonServiceServer(s grpc.ServiceRegistrar, srv PersonServiceServer)
Types ¶
type GetPersonInput ¶
type GetPersonInput struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetPersonInput) Descriptor
deprecated
func (*GetPersonInput) Descriptor() ([]byte, []int)
Deprecated: Use GetPersonInput.ProtoReflect.Descriptor instead.
func (*GetPersonInput) GetId ¶
func (x *GetPersonInput) GetId() string
func (*GetPersonInput) ProtoMessage ¶
func (*GetPersonInput) ProtoMessage()
func (*GetPersonInput) ProtoReflect ¶
func (x *GetPersonInput) ProtoReflect() protoreflect.Message
func (*GetPersonInput) Reset ¶
func (x *GetPersonInput) Reset()
func (*GetPersonInput) String ¶
func (x *GetPersonInput) String() string
type Person ¶
type Person struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` BirthDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=birth_date,json=birthDate,proto3" json:"birth_date,omitempty"` // contains filtered or unexported fields }
func (*Person) Descriptor
deprecated
func (*Person) GetBirthDate ¶
func (x *Person) GetBirthDate() *timestamppb.Timestamp
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
func (*Person) ProtoReflect ¶
func (x *Person) ProtoReflect() protoreflect.Message
type PersonServiceClient ¶
type PersonServiceClient interface {
GetPerson(ctx context.Context, in *GetPersonInput, opts ...grpc.CallOption) (*Person, error)
}
PersonServiceClient is the client API for PersonService 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 NewPersonServiceClient ¶
func NewPersonServiceClient(cc grpc.ClientConnInterface) PersonServiceClient
type PersonServiceServer ¶
type PersonServiceServer interface { GetPerson(context.Context, *GetPersonInput) (*Person, error) // contains filtered or unexported methods }
PersonServiceServer is the server API for PersonService service. All implementations must embed UnimplementedPersonServiceServer for forward compatibility
type UnimplementedPersonServiceServer ¶
type UnimplementedPersonServiceServer struct { }
UnimplementedPersonServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPersonServiceServer) GetPerson ¶
func (UnimplementedPersonServiceServer) GetPerson(context.Context, *GetPersonInput) (*Person, error)
type UnsafePersonServiceServer ¶
type UnsafePersonServiceServer interface {
// contains filtered or unexported methods
}
UnsafePersonServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PersonServiceServer will result in compilation errors.