__

package
v0.0.0-...-7dd6b40 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2024 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var File_person_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Person.ProtoReflect.Descriptor instead.

func (*Person) GetBirthdate

func (x *Person) GetBirthdate() string

func (*Person) GetID

func (x *Person) GetID() int64

func (*Person) GetName

func (x *Person) GetName() string

func (*Person) ProtoMessage

func (*Person) ProtoMessage()

func (*Person) ProtoReflect

func (x *Person) ProtoReflect() protoreflect.Message

func (*Person) Reset

func (x *Person) Reset()

func (*Person) String

func (x *Person) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use PersonID.ProtoReflect.Descriptor instead.

func (*PersonID) GetValue

func (x *PersonID) GetValue() int64

func (*PersonID) ProtoMessage

func (*PersonID) ProtoMessage()

func (*PersonID) ProtoReflect

func (x *PersonID) ProtoReflect() protoreflect.Message

func (*PersonID) Reset

func (x *PersonID) Reset()

func (*PersonID) String

func (x *PersonID) String() string

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) AddPerson

func (UnimplementedPersonsServer) EditPerson

func (UnimplementedPersonsServer) GetList

func (UnimplementedPersonsServer) GetPerson

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL