Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPersonsServer(s grpc.ServiceRegistrar, srv PersonsServer)
- type Empty
- type Person
- type PersonID
- type PersonsClient
- type PersonsServer
- type Persons_GetListClient
- type Persons_GetListServer
- type UnimplementedPersonsServer
- func (UnimplementedPersonsServer) AddPerson(context.Context, *Person) (*PersonID, error)
- func (UnimplementedPersonsServer) EditPerson(context.Context, *Person) (*Empty, error)
- func (UnimplementedPersonsServer) GetList(*Empty, grpc.ServerStreamingServer[Person]) error
- func (UnimplementedPersonsServer) GetPerson(context.Context, *PersonID) (*Person, error)
- func (UnimplementedPersonsServer) RemovePerson(context.Context, *PersonID) (*Empty, error)
- type UnsafePersonsServer
Constants ¶
const ( Persons_AddPerson_FullMethodName = "/persons.Persons/AddPerson" Persons_GetPerson_FullMethodName = "/persons.Persons/GetPerson" Persons_EditPerson_FullMethodName = "/persons.Persons/EditPerson" Persons_RemovePerson_FullMethodName = "/persons.Persons/RemovePerson" Persons_GetList_FullMethodName = "/persons.Persons/GetList" )
Variables ¶
var File_person_proto protoreflect.FileDescriptor
var Persons_ServiceDesc = grpc.ServiceDesc{ ServiceName: "persons.Persons", HandlerType: (*PersonsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "AddPerson", Handler: _Persons_AddPerson_Handler, }, { MethodName: "GetPerson", Handler: _Persons_GetPerson_Handler, }, { MethodName: "EditPerson", Handler: _Persons_EditPerson_Handler, }, { MethodName: "RemovePerson", Handler: _Persons_RemovePerson_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetList", Handler: _Persons_GetList_Handler, ServerStreams: true, }, }, Metadata: "person.proto", }
Persons_ServiceDesc is the grpc.ServiceDesc for Persons service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPersonsServer ¶
func RegisterPersonsServer(s grpc.ServiceRegistrar, srv PersonsServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Person ¶
type Person struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"` Birthdate string `protobuf:"bytes,3,opt,name=Birthdate,proto3" json:"Birthdate,omitempty"` // contains filtered or unexported fields }
func (*Person) Descriptor
deprecated
func (*Person) GetBirthdate ¶
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
func (*Person) ProtoReflect ¶
func (x *Person) ProtoReflect() protoreflect.Message
type PersonID ¶
type PersonID struct { Value int64 `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"` // contains filtered or unexported fields }
func (*PersonID) Descriptor
deprecated
func (*PersonID) ProtoMessage ¶
func (*PersonID) ProtoMessage()
func (*PersonID) ProtoReflect ¶
func (x *PersonID) ProtoReflect() protoreflect.Message
type PersonsClient ¶
type PersonsClient interface { AddPerson(ctx context.Context, in *Person, opts ...grpc.CallOption) (*PersonID, error) GetPerson(ctx context.Context, in *PersonID, opts ...grpc.CallOption) (*Person, error) EditPerson(ctx context.Context, in *Person, opts ...grpc.CallOption) (*Empty, error) RemovePerson(ctx context.Context, in *PersonID, opts ...grpc.CallOption) (*Empty, error) GetList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Person], error) }
PersonsClient is the client API for Persons 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 NewPersonsClient ¶
func NewPersonsClient(cc grpc.ClientConnInterface) PersonsClient
type PersonsServer ¶
type PersonsServer interface { AddPerson(context.Context, *Person) (*PersonID, error) GetPerson(context.Context, *PersonID) (*Person, error) EditPerson(context.Context, *Person) (*Empty, error) RemovePerson(context.Context, *PersonID) (*Empty, error) GetList(*Empty, grpc.ServerStreamingServer[Person]) error // contains filtered or unexported methods }
PersonsServer is the server API for Persons service. All implementations must embed UnimplementedPersonsServer for forward compatibility.
type Persons_GetListClient ¶
type Persons_GetListClient = grpc.ServerStreamingClient[Person]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Persons_GetListServer ¶
type Persons_GetListServer = grpc.ServerStreamingServer[Person]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedPersonsServer ¶
type UnimplementedPersonsServer struct{}
UnimplementedPersonsServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPersonsServer) EditPerson ¶
func (UnimplementedPersonsServer) GetList ¶
func (UnimplementedPersonsServer) GetList(*Empty, grpc.ServerStreamingServer[Person]) error
func (UnimplementedPersonsServer) RemovePerson ¶
type UnsafePersonsServer ¶
type UnsafePersonsServer interface {
// contains filtered or unexported methods
}
UnsafePersonsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PersonsServer will result in compilation errors.