Documentation ¶
Index ¶
- Variables
- func RegisterPoemsServer(s grpc.ServiceRegistrar, srv PoemsServer)
- type Poem
- type PoemsClient
- type PoemsRequest
- type PoemsResponse
- func (*PoemsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PoemsResponse) GetPoems() map[int32]*Poem
- func (x *PoemsResponse) GetSuccess() bool
- func (*PoemsResponse) ProtoMessage()
- func (x *PoemsResponse) ProtoReflect() protoreflect.Message
- func (x *PoemsResponse) Reset()
- func (x *PoemsResponse) String() string
- type PoemsServer
- type UnimplementedPoemsServer
- type UnsafePoemsServer
Constants ¶
This section is empty.
Variables ¶
var File_poems_poems_proto protoreflect.FileDescriptor
var Poems_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Poems", HandlerType: (*PoemsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetPoems", Handler: _Poems_GetPoems_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "poems/poems.proto", }
Poems_ServiceDesc is the grpc.ServiceDesc for Poems service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPoemsServer ¶
func RegisterPoemsServer(s grpc.ServiceRegistrar, srv PoemsServer)
Types ¶
type Poem ¶
type Poem struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // contains filtered or unexported fields }
func (*Poem) Descriptor
deprecated
func (*Poem) ProtoMessage ¶
func (*Poem) ProtoMessage()
func (*Poem) ProtoReflect ¶
func (x *Poem) ProtoReflect() protoreflect.Message
type PoemsClient ¶
type PoemsClient interface { // Sends a greeting GetPoems(ctx context.Context, in *PoemsRequest, opts ...grpc.CallOption) (*PoemsResponse, error) }
PoemsClient is the client API for Poems 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 NewPoemsClient ¶
func NewPoemsClient(cc grpc.ClientConnInterface) PoemsClient
type PoemsRequest ¶
type PoemsRequest struct { Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` // contains filtered or unexported fields }
The request message containing the category.
func (*PoemsRequest) Descriptor
deprecated
func (*PoemsRequest) Descriptor() ([]byte, []int)
Deprecated: Use PoemsRequest.ProtoReflect.Descriptor instead.
func (*PoemsRequest) GetCategory ¶
func (x *PoemsRequest) GetCategory() string
func (*PoemsRequest) ProtoMessage ¶
func (*PoemsRequest) ProtoMessage()
func (*PoemsRequest) ProtoReflect ¶
func (x *PoemsRequest) ProtoReflect() protoreflect.Message
func (*PoemsRequest) Reset ¶
func (x *PoemsRequest) Reset()
func (*PoemsRequest) String ¶
func (x *PoemsRequest) String() string
type PoemsResponse ¶
type PoemsResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Poems map[int32]*Poem `` /* 152-byte string literal not displayed */ // contains filtered or unexported fields }
The response message containing poems content.
func (*PoemsResponse) Descriptor
deprecated
func (*PoemsResponse) Descriptor() ([]byte, []int)
Deprecated: Use PoemsResponse.ProtoReflect.Descriptor instead.
func (*PoemsResponse) GetPoems ¶
func (x *PoemsResponse) GetPoems() map[int32]*Poem
func (*PoemsResponse) GetSuccess ¶
func (x *PoemsResponse) GetSuccess() bool
func (*PoemsResponse) ProtoMessage ¶
func (*PoemsResponse) ProtoMessage()
func (*PoemsResponse) ProtoReflect ¶
func (x *PoemsResponse) ProtoReflect() protoreflect.Message
func (*PoemsResponse) Reset ¶
func (x *PoemsResponse) Reset()
func (*PoemsResponse) String ¶
func (x *PoemsResponse) String() string
type PoemsServer ¶
type PoemsServer interface { // Sends a greeting GetPoems(context.Context, *PoemsRequest) (*PoemsResponse, error) // contains filtered or unexported methods }
PoemsServer is the server API for Poems service. All implementations must embed UnimplementedPoemsServer for forward compatibility
type UnimplementedPoemsServer ¶
type UnimplementedPoemsServer struct { }
UnimplementedPoemsServer must be embedded to have forward compatible implementations.
func (UnimplementedPoemsServer) GetPoems ¶
func (UnimplementedPoemsServer) GetPoems(context.Context, *PoemsRequest) (*PoemsResponse, error)
type UnsafePoemsServer ¶
type UnsafePoemsServer interface {
// contains filtered or unexported methods
}
UnsafePoemsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PoemsServer will result in compilation errors.