person

package
v0.0.0-...-ecdf00e Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_person_person_proto protoreflect.FileDescriptor
View Source
var Person_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.person.Person",
	HandlerType: (*PersonServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreatePerson",
			Handler:    _Person_CreatePerson_Handler,
		},
		{
			MethodName: "UpdatePerson",
			Handler:    _Person_UpdatePerson_Handler,
		},
		{
			MethodName: "GetPerson",
			Handler:    _Person_GetPerson_Handler,
		},
		{
			MethodName: "ListPersons",
			Handler:    _Person_ListPersons_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/person/person.proto",
}

Person_ServiceDesc is the grpc.ServiceDesc for Person service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPersonServer

func RegisterPersonServer(s grpc.ServiceRegistrar, srv PersonServer)

Types

type CreatePersonReply

type CreatePersonReply struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreatePersonReply) Descriptor deprecated

func (*CreatePersonReply) Descriptor() ([]byte, []int)

Deprecated: Use CreatePersonReply.ProtoReflect.Descriptor instead.

func (*CreatePersonReply) GetId

func (x *CreatePersonReply) GetId() int32

func (*CreatePersonReply) ProtoMessage

func (*CreatePersonReply) ProtoMessage()

func (*CreatePersonReply) ProtoReflect

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

func (*CreatePersonReply) Reset

func (x *CreatePersonReply) Reset()

func (*CreatePersonReply) String

func (x *CreatePersonReply) String() string

func (*CreatePersonReply) Validate

func (m *CreatePersonReply) Validate() error

Validate checks the field values on CreatePersonReply with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreatePersonReplyValidationError

type CreatePersonReplyValidationError struct {
	// contains filtered or unexported fields
}

CreatePersonReplyValidationError is the validation error returned by CreatePersonReply.Validate if the designated constraints aren't met.

func (CreatePersonReplyValidationError) Cause

Cause function returns cause value.

func (CreatePersonReplyValidationError) Error

Error satisfies the builtin error interface

func (CreatePersonReplyValidationError) ErrorName

ErrorName returns error name.

func (CreatePersonReplyValidationError) Field

Field function returns field value.

func (CreatePersonReplyValidationError) Key

Key function returns key value.

func (CreatePersonReplyValidationError) Reason

Reason function returns reason value.

type CreatePersonRequest

type CreatePersonRequest struct {
	Id        int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	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"`
	// contains filtered or unexported fields
}

func (*CreatePersonRequest) Descriptor deprecated

func (*CreatePersonRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreatePersonRequest.ProtoReflect.Descriptor instead.

func (*CreatePersonRequest) GetEmail

func (x *CreatePersonRequest) GetEmail() string

func (*CreatePersonRequest) GetFirstName

func (x *CreatePersonRequest) GetFirstName() string

func (*CreatePersonRequest) GetId

func (x *CreatePersonRequest) GetId() int32

func (*CreatePersonRequest) GetLastName

func (x *CreatePersonRequest) GetLastName() string

func (*CreatePersonRequest) ProtoMessage

func (*CreatePersonRequest) ProtoMessage()

func (*CreatePersonRequest) ProtoReflect

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

func (*CreatePersonRequest) Reset

func (x *CreatePersonRequest) Reset()

func (*CreatePersonRequest) String

func (x *CreatePersonRequest) String() string

func (*CreatePersonRequest) Validate

func (m *CreatePersonRequest) Validate() error

Validate checks the field values on CreatePersonRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type CreatePersonRequestValidationError

type CreatePersonRequestValidationError struct {
	// contains filtered or unexported fields
}

CreatePersonRequestValidationError is the validation error returned by CreatePersonRequest.Validate if the designated constraints aren't met.

func (CreatePersonRequestValidationError) Cause

Cause function returns cause value.

func (CreatePersonRequestValidationError) Error

Error satisfies the builtin error interface

func (CreatePersonRequestValidationError) ErrorName

ErrorName returns error name.

func (CreatePersonRequestValidationError) Field

Field function returns field value.

func (CreatePersonRequestValidationError) Key

Key function returns key value.

func (CreatePersonRequestValidationError) Reason

Reason function returns reason value.

type GetPersonRequest

type GetPersonRequest struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPersonRequest) Descriptor deprecated

func (*GetPersonRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPersonRequest.ProtoReflect.Descriptor instead.

func (*GetPersonRequest) GetId

func (x *GetPersonRequest) GetId() int32

func (*GetPersonRequest) ProtoMessage

func (*GetPersonRequest) ProtoMessage()

func (*GetPersonRequest) ProtoReflect

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

func (*GetPersonRequest) Reset

func (x *GetPersonRequest) Reset()

func (*GetPersonRequest) String

func (x *GetPersonRequest) String() string

func (*GetPersonRequest) Validate

func (m *GetPersonRequest) Validate() error

Validate checks the field values on GetPersonRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type GetPersonRequestValidationError

type GetPersonRequestValidationError struct {
	// contains filtered or unexported fields
}

GetPersonRequestValidationError is the validation error returned by GetPersonRequest.Validate if the designated constraints aren't met.

func (GetPersonRequestValidationError) Cause

Cause function returns cause value.

func (GetPersonRequestValidationError) Error

Error satisfies the builtin error interface

func (GetPersonRequestValidationError) ErrorName

ErrorName returns error name.

func (GetPersonRequestValidationError) Field

Field function returns field value.

func (GetPersonRequestValidationError) Key

Key function returns key value.

func (GetPersonRequestValidationError) Reason

Reason function returns reason value.

type ListPersonReply

type ListPersonReply struct {
	Persons []*PersonReply `protobuf:"bytes,1,rep,name=persons,proto3" json:"persons,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPersonReply) Descriptor deprecated

func (*ListPersonReply) Descriptor() ([]byte, []int)

Deprecated: Use ListPersonReply.ProtoReflect.Descriptor instead.

func (*ListPersonReply) GetPersons

func (x *ListPersonReply) GetPersons() []*PersonReply

func (*ListPersonReply) ProtoMessage

func (*ListPersonReply) ProtoMessage()

func (*ListPersonReply) ProtoReflect

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

func (*ListPersonReply) Reset

func (x *ListPersonReply) Reset()

func (*ListPersonReply) String

func (x *ListPersonReply) String() string

func (*ListPersonReply) Validate

func (m *ListPersonReply) Validate() error

Validate checks the field values on ListPersonReply with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListPersonReplyValidationError

type ListPersonReplyValidationError struct {
	// contains filtered or unexported fields
}

ListPersonReplyValidationError is the validation error returned by ListPersonReply.Validate if the designated constraints aren't met.

func (ListPersonReplyValidationError) Cause

Cause function returns cause value.

func (ListPersonReplyValidationError) Error

Error satisfies the builtin error interface

func (ListPersonReplyValidationError) ErrorName

func (e ListPersonReplyValidationError) ErrorName() string

ErrorName returns error name.

func (ListPersonReplyValidationError) Field

Field function returns field value.

func (ListPersonReplyValidationError) Key

Key function returns key value.

func (ListPersonReplyValidationError) Reason

Reason function returns reason value.

type ListPersonRequest

type ListPersonRequest struct {
	LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ListPersonRequest) Descriptor deprecated

func (*ListPersonRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListPersonRequest.ProtoReflect.Descriptor instead.

func (*ListPersonRequest) GetLastName

func (x *ListPersonRequest) GetLastName() string

func (*ListPersonRequest) ProtoMessage

func (*ListPersonRequest) ProtoMessage()

func (*ListPersonRequest) ProtoReflect

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

func (*ListPersonRequest) Reset

func (x *ListPersonRequest) Reset()

func (*ListPersonRequest) String

func (x *ListPersonRequest) String() string

func (*ListPersonRequest) Validate

func (m *ListPersonRequest) Validate() error

Validate checks the field values on ListPersonRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type ListPersonRequestValidationError

type ListPersonRequestValidationError struct {
	// contains filtered or unexported fields
}

ListPersonRequestValidationError is the validation error returned by ListPersonRequest.Validate if the designated constraints aren't met.

func (ListPersonRequestValidationError) Cause

Cause function returns cause value.

func (ListPersonRequestValidationError) Error

Error satisfies the builtin error interface

func (ListPersonRequestValidationError) ErrorName

ErrorName returns error name.

func (ListPersonRequestValidationError) Field

Field function returns field value.

func (ListPersonRequestValidationError) Key

Key function returns key value.

func (ListPersonRequestValidationError) Reason

Reason function returns reason value.

type PersonClient

type PersonClient interface {
	CreatePerson(ctx context.Context, in *CreatePersonRequest, opts ...grpc.CallOption) (*CreatePersonReply, error)
	UpdatePerson(ctx context.Context, in *UpdatePersonRequest, opts ...grpc.CallOption) (*PersonReply, error)
	GetPerson(ctx context.Context, in *GetPersonRequest, opts ...grpc.CallOption) (*PersonReply, error)
	ListPersons(ctx context.Context, in *ListPersonRequest, opts ...grpc.CallOption) (*ListPersonReply, error)
}

PersonClient is the client API for Person 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 NewPersonClient

func NewPersonClient(cc grpc.ClientConnInterface) PersonClient

type PersonReply

type PersonReply struct {
	Id        int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	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"`
	// contains filtered or unexported fields
}

func (*PersonReply) Descriptor deprecated

func (*PersonReply) Descriptor() ([]byte, []int)

Deprecated: Use PersonReply.ProtoReflect.Descriptor instead.

func (*PersonReply) GetEmail

func (x *PersonReply) GetEmail() string

func (*PersonReply) GetFirstName

func (x *PersonReply) GetFirstName() string

func (*PersonReply) GetId

func (x *PersonReply) GetId() int32

func (*PersonReply) GetLastName

func (x *PersonReply) GetLastName() string

func (*PersonReply) ProtoMessage

func (*PersonReply) ProtoMessage()

func (*PersonReply) ProtoReflect

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

func (*PersonReply) Reset

func (x *PersonReply) Reset()

func (*PersonReply) String

func (x *PersonReply) String() string

func (*PersonReply) Validate

func (m *PersonReply) Validate() error

Validate checks the field values on PersonReply with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type PersonReplyValidationError

type PersonReplyValidationError struct {
	// contains filtered or unexported fields
}

PersonReplyValidationError is the validation error returned by PersonReply.Validate if the designated constraints aren't met.

func (PersonReplyValidationError) Cause

Cause function returns cause value.

func (PersonReplyValidationError) Error

Error satisfies the builtin error interface

func (PersonReplyValidationError) ErrorName

func (e PersonReplyValidationError) ErrorName() string

ErrorName returns error name.

func (PersonReplyValidationError) Field

Field function returns field value.

func (PersonReplyValidationError) Key

Key function returns key value.

func (PersonReplyValidationError) Reason

Reason function returns reason value.

type PersonServer

type PersonServer interface {
	CreatePerson(context.Context, *CreatePersonRequest) (*CreatePersonReply, error)
	UpdatePerson(context.Context, *UpdatePersonRequest) (*PersonReply, error)
	GetPerson(context.Context, *GetPersonRequest) (*PersonReply, error)
	ListPersons(context.Context, *ListPersonRequest) (*ListPersonReply, error)
	// contains filtered or unexported methods
}

PersonServer is the server API for Person service. All implementations must embed UnimplementedPersonServer for forward compatibility

type UnimplementedPersonServer

type UnimplementedPersonServer struct {
}

UnimplementedPersonServer must be embedded to have forward compatible implementations.

func (UnimplementedPersonServer) CreatePerson

func (UnimplementedPersonServer) GetPerson

func (UnimplementedPersonServer) ListPersons

func (UnimplementedPersonServer) UpdatePerson

type UnsafePersonServer

type UnsafePersonServer interface {
	// contains filtered or unexported methods
}

UnsafePersonServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PersonServer will result in compilation errors.

type UpdatePersonRequest

type UpdatePersonRequest struct {
	Id        int32  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	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"`
	// contains filtered or unexported fields
}

func (*UpdatePersonRequest) Descriptor deprecated

func (*UpdatePersonRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdatePersonRequest.ProtoReflect.Descriptor instead.

func (*UpdatePersonRequest) GetEmail

func (x *UpdatePersonRequest) GetEmail() string

func (*UpdatePersonRequest) GetFirstName

func (x *UpdatePersonRequest) GetFirstName() string

func (*UpdatePersonRequest) GetId

func (x *UpdatePersonRequest) GetId() int32

func (*UpdatePersonRequest) GetLastName

func (x *UpdatePersonRequest) GetLastName() string

func (*UpdatePersonRequest) ProtoMessage

func (*UpdatePersonRequest) ProtoMessage()

func (*UpdatePersonRequest) ProtoReflect

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

func (*UpdatePersonRequest) Reset

func (x *UpdatePersonRequest) Reset()

func (*UpdatePersonRequest) String

func (x *UpdatePersonRequest) String() string

func (*UpdatePersonRequest) Validate

func (m *UpdatePersonRequest) Validate() error

Validate checks the field values on UpdatePersonRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

type UpdatePersonRequestValidationError

type UpdatePersonRequestValidationError struct {
	// contains filtered or unexported fields
}

UpdatePersonRequestValidationError is the validation error returned by UpdatePersonRequest.Validate if the designated constraints aren't met.

func (UpdatePersonRequestValidationError) Cause

Cause function returns cause value.

func (UpdatePersonRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdatePersonRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdatePersonRequestValidationError) Field

Field function returns field value.

func (UpdatePersonRequestValidationError) Key

Key function returns key value.

func (UpdatePersonRequestValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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