Documentation
¶
Index ¶
- Variables
- func NewAnswerEndpoints() []*api.Endpoint
- func RegisterAnswerHandler(s server.Server, hdlr AnswerHandler, opts ...server.HandlerOption) error
- type AnswerHandler
- type AnswerService
- type QuestionRequest
- type QuestionResponse
- func (*QuestionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QuestionResponse) GetAnswer() string
- func (x *QuestionResponse) GetImage() string
- func (x *QuestionResponse) GetUrl() string
- func (*QuestionResponse) ProtoMessage()
- func (x *QuestionResponse) ProtoReflect() protoreflect.Message
- func (x *QuestionResponse) Reset()
- func (x *QuestionResponse) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_answer_proto protoreflect.FileDescriptor
Functions ¶
func NewAnswerEndpoints ¶
func RegisterAnswerHandler ¶
func RegisterAnswerHandler(s server.Server, hdlr AnswerHandler, opts ...server.HandlerOption) error
Types ¶
type AnswerHandler ¶
type AnswerHandler interface {
Question(context.Context, *QuestionRequest, *QuestionResponse) error
}
type AnswerService ¶
type AnswerService interface {
Question(ctx context.Context, in *QuestionRequest, opts ...client.CallOption) (*QuestionResponse, error)
}
func NewAnswerService ¶
func NewAnswerService(name string, c client.Client) AnswerService
type QuestionRequest ¶
type QuestionRequest struct {
// the question to answer
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
// contains filtered or unexported fields
}
Answer a question and receive an instant answer
func (*QuestionRequest) Descriptor
deprecated
func (*QuestionRequest) Descriptor() ([]byte, []int)
Deprecated: Use QuestionRequest.ProtoReflect.Descriptor instead.
func (*QuestionRequest) GetQuery ¶
func (x *QuestionRequest) GetQuery() string
func (*QuestionRequest) ProtoMessage ¶
func (*QuestionRequest) ProtoMessage()
func (*QuestionRequest) ProtoReflect ¶
func (x *QuestionRequest) ProtoReflect() protoreflect.Message
func (*QuestionRequest) Reset ¶
func (x *QuestionRequest) Reset()
func (*QuestionRequest) String ¶
func (x *QuestionRequest) String() string
type QuestionResponse ¶
type QuestionResponse struct {
// the answer to your question
Answer string `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"`
// a related url
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
// any related image
Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"`
// contains filtered or unexported fields
}
func (*QuestionResponse) Descriptor
deprecated
func (*QuestionResponse) Descriptor() ([]byte, []int)
Deprecated: Use QuestionResponse.ProtoReflect.Descriptor instead.
func (*QuestionResponse) GetAnswer ¶
func (x *QuestionResponse) GetAnswer() string
func (*QuestionResponse) GetImage ¶
func (x *QuestionResponse) GetImage() string
func (*QuestionResponse) GetUrl ¶
func (x *QuestionResponse) GetUrl() string
func (*QuestionResponse) ProtoMessage ¶
func (*QuestionResponse) ProtoMessage()
func (*QuestionResponse) ProtoReflect ¶
func (x *QuestionResponse) ProtoReflect() protoreflect.Message
func (*QuestionResponse) Reset ¶
func (x *QuestionResponse) Reset()
func (*QuestionResponse) String ¶
func (x *QuestionResponse) String() string
Click to show internal directories.
Click to hide internal directories.