Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)
- type EchoServiceClient
- type EchoServiceServer
- type StringMessage
- func (*StringMessage) Descriptor() ([]byte, []int)deprecated
- func (x *StringMessage) GetValue() string
- func (*StringMessage) ProtoMessage()
- func (x *StringMessage) ProtoReflect() protoreflect.Message
- func (x *StringMessage) Reset()
- func (x *StringMessage) String() string
- func (m *StringMessage) Validate() error
- func (m *StringMessage) ValidateAll() error
- type StringMessageMultiError
- type StringMessageValidationError
- func (e StringMessageValidationError) Cause() error
- func (e StringMessageValidationError) Error() string
- func (e StringMessageValidationError) ErrorName() string
- func (e StringMessageValidationError) Field() string
- func (e StringMessageValidationError) Key() bool
- func (e StringMessageValidationError) Reason() string
- type UnimplementedEchoServiceServer
- type UnsafeEchoServiceServer
Constants ¶
const ( EchoService_Echo_FullMethodName = "/grpc.echo.service.v1.EchoService/Echo" EchoService_EchoCustomer_FullMethodName = "/grpc.echo.service.v1.EchoService/EchoCustomer" )
Variables ¶
var EchoService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.echo.service.v1.EchoService", HandlerType: (*EchoServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Echo", Handler: _EchoService_Echo_Handler, }, { MethodName: "EchoCustomer", Handler: _EchoService_EchoCustomer_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "prototpl/echo-service/echo-service.proto", }
EchoService_ServiceDesc is the grpc.ServiceDesc for EchoService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_prototpl_echo_service_echo_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEchoServiceServer ¶
func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)
Types ¶
type EchoServiceClient ¶
type EchoServiceClient interface { Echo(ctx context.Context, in *StringMessage, opts ...grpc.CallOption) (*StringMessage, error) EchoCustomer(ctx context.Context, in *StringMessage, opts ...grpc.CallOption) (*StringMessage, error) }
EchoServiceClient is the client API for EchoService 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 NewEchoServiceClient ¶
func NewEchoServiceClient(cc grpc.ClientConnInterface) EchoServiceClient
type EchoServiceServer ¶
type EchoServiceServer interface { Echo(context.Context, *StringMessage) (*StringMessage, error) EchoCustomer(context.Context, *StringMessage) (*StringMessage, error) // contains filtered or unexported methods }
EchoServiceServer is the server API for EchoService service. All implementations must embed UnimplementedEchoServiceServer for forward compatibility
type StringMessage ¶
type StringMessage struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*StringMessage) Descriptor
deprecated
func (*StringMessage) Descriptor() ([]byte, []int)
Deprecated: Use StringMessage.ProtoReflect.Descriptor instead.
func (*StringMessage) GetValue ¶
func (x *StringMessage) GetValue() string
func (*StringMessage) ProtoMessage ¶
func (*StringMessage) ProtoMessage()
func (*StringMessage) ProtoReflect ¶
func (x *StringMessage) ProtoReflect() protoreflect.Message
func (*StringMessage) Reset ¶
func (x *StringMessage) Reset()
func (*StringMessage) String ¶
func (x *StringMessage) String() string
func (*StringMessage) Validate ¶
func (m *StringMessage) Validate() error
Validate checks the field values on StringMessage 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 (*StringMessage) ValidateAll ¶
func (m *StringMessage) ValidateAll() error
ValidateAll checks the field values on StringMessage 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 StringMessageMultiError, or nil if none found.
type StringMessageMultiError ¶
type StringMessageMultiError []error
StringMessageMultiError is an error wrapping multiple validation errors returned by StringMessage.ValidateAll() if the designated constraints aren't met.
func (StringMessageMultiError) AllErrors ¶
func (m StringMessageMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (StringMessageMultiError) Error ¶
func (m StringMessageMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type StringMessageValidationError ¶
type StringMessageValidationError struct {
// contains filtered or unexported fields
}
StringMessageValidationError is the validation error returned by StringMessage.Validate if the designated constraints aren't met.
func (StringMessageValidationError) Cause ¶
func (e StringMessageValidationError) Cause() error
Cause function returns cause value.
func (StringMessageValidationError) Error ¶
func (e StringMessageValidationError) Error() string
Error satisfies the builtin error interface
func (StringMessageValidationError) ErrorName ¶
func (e StringMessageValidationError) ErrorName() string
ErrorName returns error name.
func (StringMessageValidationError) Field ¶
func (e StringMessageValidationError) Field() string
Field function returns field value.
func (StringMessageValidationError) Key ¶
func (e StringMessageValidationError) Key() bool
Key function returns key value.
func (StringMessageValidationError) Reason ¶
func (e StringMessageValidationError) Reason() string
Reason function returns reason value.
type UnimplementedEchoServiceServer ¶
type UnimplementedEchoServiceServer struct { }
UnimplementedEchoServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedEchoServiceServer) Echo ¶
func (UnimplementedEchoServiceServer) Echo(context.Context, *StringMessage) (*StringMessage, error)
func (UnimplementedEchoServiceServer) EchoCustomer ¶
func (UnimplementedEchoServiceServer) EchoCustomer(context.Context, *StringMessage) (*StringMessage, error)
type UnsafeEchoServiceServer ¶
type UnsafeEchoServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEchoServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EchoServiceServer will result in compilation errors.