Documentation ¶
Overview ¶
Package greetingservice is an implementation of the GreetingService service.
Index ¶
- Variables
- func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
- type Empty
- type GreeterClient
- type GreeterServer
- type Greeting
- func (*Greeting) Descriptor() ([]byte, []int)deprecated
- func (x *Greeting) GetGreeting() string
- func (x *Greeting) GetId() int32
- func (x *Greeting) GetLastUpdated() *timestamp.Timestamp
- func (x *Greeting) GetName() string
- func (*Greeting) ProtoMessage()
- func (x *Greeting) ProtoReflect() protoreflect.Message
- func (x *Greeting) Reset()
- func (x *Greeting) String() string
- type GreetingServer
- type UnimplementedGreeterServer
- type UnsafeGreeterServer
Constants ¶
This section is empty.
Variables ¶
var File_greeter_proto protoreflect.FileDescriptor
var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "GreetingServer.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetGreeting", Handler: _Greeter_GetGreeting_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "greeter.proto", }
Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGreeterServer ¶
func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)
Types ¶
type Empty ¶
type Empty struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 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 GreeterClient ¶
type GreeterClient interface {
GetGreeting(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Greeting, error)
}
GreeterClient is the client API for Greeter 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 NewGreeterClient ¶
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient
type GreeterServer ¶
type GreeterServer interface { GetGreeting(context.Context, *Empty) (*Greeting, error) // contains filtered or unexported methods }
GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility
type Greeting ¶
type Greeting struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Greeting string `protobuf:"bytes,3,opt,name=greeting,proto3" json:"greeting,omitempty"` LastUpdated *timestamp.Timestamp `protobuf:"bytes,4,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"` // contains filtered or unexported fields }
func (*Greeting) Descriptor
deprecated
func (*Greeting) GetGreeting ¶
func (*Greeting) GetLastUpdated ¶
func (*Greeting) ProtoMessage ¶
func (*Greeting) ProtoMessage()
func (*Greeting) ProtoReflect ¶
func (x *Greeting) ProtoReflect() protoreflect.Message
type GreetingServer ¶
type GreetingServer struct {
UnimplementedGreeterServer
}
GreetingServer is the server API for GreetingService service.
func (*GreetingServer) GetGreeting ¶
GetGreeting implements GreetingServer
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer must be embedded to have forward compatible implementations.
func (UnimplementedGreeterServer) GetGreeting ¶
type UnsafeGreeterServer ¶
type UnsafeGreeterServer interface {
// contains filtered or unexported methods
}
UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GreeterServer will result in compilation errors.