v1

package
v0.0.0-...-67bc4e0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PersonService_GetPerson_FullMethodName = "/grpc.person.service.v1.PersonService/GetPerson"
)

Variables

View Source
var File_prototpl_person_service_person_service_proto protoreflect.FileDescriptor
View Source
var PersonService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpc.person.service.v1.PersonService",
	HandlerType: (*PersonServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPerson",
			Handler:    _PersonService_GetPerson_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "prototpl/person-service/person-service.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 PersonMessage

type PersonMessage struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Age  int32  `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"`
	// contains filtered or unexported fields
}

func (*PersonMessage) Descriptor deprecated

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

Deprecated: Use PersonMessage.ProtoReflect.Descriptor instead.

func (*PersonMessage) GetAge

func (x *PersonMessage) GetAge() int32

func (*PersonMessage) GetName

func (x *PersonMessage) GetName() string

func (*PersonMessage) ProtoMessage

func (*PersonMessage) ProtoMessage()

func (*PersonMessage) ProtoReflect

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

func (*PersonMessage) Reset

func (x *PersonMessage) Reset()

func (*PersonMessage) String

func (x *PersonMessage) String() string

func (*PersonMessage) Validate

func (m *PersonMessage) Validate() error

Validate checks the field values on PersonMessage with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*PersonMessage) ValidateAll

func (m *PersonMessage) ValidateAll() error

ValidateAll checks the field values on PersonMessage with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PersonMessageMultiError, or nil if none found.

type PersonMessageMultiError

type PersonMessageMultiError []error

PersonMessageMultiError is an error wrapping multiple validation errors returned by PersonMessage.ValidateAll() if the designated constraints aren't met.

func (PersonMessageMultiError) AllErrors

func (m PersonMessageMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PersonMessageMultiError) Error

func (m PersonMessageMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type PersonMessageValidationError

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

PersonMessageValidationError is the validation error returned by PersonMessage.Validate if the designated constraints aren't met.

func (PersonMessageValidationError) Cause

Cause function returns cause value.

func (PersonMessageValidationError) Error

Error satisfies the builtin error interface

func (PersonMessageValidationError) ErrorName

func (e PersonMessageValidationError) ErrorName() string

ErrorName returns error name.

func (PersonMessageValidationError) Field

Field function returns field value.

func (PersonMessageValidationError) Key

Key function returns key value.

func (PersonMessageValidationError) Reason

Reason function returns reason value.

type PersonServiceClient

type PersonServiceClient interface {
	GetPerson(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*PersonMessage, 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.

type PersonServiceServer

type PersonServiceServer interface {
	GetPerson(context.Context, *PersonMessage) (*PersonMessage, 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

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.

Jump to

Keyboard shortcuts

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