answer

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_answer_proto protoreflect.FileDescriptor

Functions

func NewAnswerEndpoints

func NewAnswerEndpoints() []*api.Endpoint

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

Jump to

Keyboard shortcuts

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