Documentation
¶
Index ¶
- type AssistantDefinition
- type Content
- type EndpointDefinition
- type InvokeResponseWrapper
- func (irw *InvokeResponseWrapper) GetCode() int32
- func (irw *InvokeResponseWrapper) GetData() ([]*Content, error)
- func (irw *InvokeResponseWrapper) GetError() *lexatic_backend.InvokerError
- func (irw *InvokeResponseWrapper) GetErrorCode() int64
- func (irw *InvokeResponseWrapper) GetErrorMessage() string
- func (irw *InvokeResponseWrapper) GetHumanErrorMessage() string
- func (irw *InvokeResponseWrapper) GetMetadata() (map[string]interface{}, error)
- func (irw *InvokeResponseWrapper) GetMetrics() ([]*Metric, error)
- func (irw *InvokeResponseWrapper) GetRequestId() uint64
- func (irw *InvokeResponseWrapper) GetTimeTaken() uint64
- func (irw *InvokeResponseWrapper) IsError() bool
- func (irw *InvokeResponseWrapper) IsSuccess() bool
- func (irw *InvokeResponseWrapper) ToDict() (map[string]interface{}, error)
- func (irw *InvokeResponseWrapper) ToJSON() (string, error)
- type Metric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssistantDefinition ¶
func NewAssistant ¶
func NewAssistant(assistant interface{}, assistantVersion string) (AssistantDefinition, error)
type Content ¶
type Content struct { Original *lexatic_backend.Content Content []byte ContentFormat string ContentType string Meta *structpb.Struct }
Content is a struct that wraps around the Common.Content protobuf message.
func NewContent ¶
func NewContent(data *lexatic_backend.Content) *Content
NewContent constructs a Content wrapper from a Common.Content protobuf message.
type EndpointDefinition ¶
func NewEndpoint ¶
func NewEndpoint(endpoint uint64, endpointVersion string) EndpointDefinition
type InvokeResponseWrapper ¶
type InvokeResponseWrapper struct { Data *lexatic_backend.CallerResponse Success bool Code int32 Error *lexatic_backend.InvokerError }
InvokeResponseWrapper is a struct that wraps around the response from the Invoker API.
func NewInvokeResponseWrapper ¶
func NewInvokeResponseWrapper(data *lexatic_backend.InvokeResponse) *InvokeResponseWrapper
NewInvokeResponseWrapper constructs an InvokeResponseWrapper from an InvokerApi.InvokeResponse.
func (*InvokeResponseWrapper) GetCode ¶
func (irw *InvokeResponseWrapper) GetCode() int32
GetCode returns the response code.
func (*InvokeResponseWrapper) GetData ¶
func (irw *InvokeResponseWrapper) GetData() ([]*Content, error)
GetData returns a list of Content objects.
func (*InvokeResponseWrapper) GetError ¶
func (irw *InvokeResponseWrapper) GetError() *lexatic_backend.InvokerError
GetError returns the error object.
func (*InvokeResponseWrapper) GetErrorCode ¶
func (irw *InvokeResponseWrapper) GetErrorCode() int64
GetErrorCode returns the error code.
func (*InvokeResponseWrapper) GetErrorMessage ¶
func (irw *InvokeResponseWrapper) GetErrorMessage() string
GetErrorMessage returns the error message.
func (*InvokeResponseWrapper) GetHumanErrorMessage ¶
func (irw *InvokeResponseWrapper) GetHumanErrorMessage() string
GetHumanErrorMessage returns the human-readable error message.
func (*InvokeResponseWrapper) GetMetadata ¶
func (irw *InvokeResponseWrapper) GetMetadata() (map[string]interface{}, error)
GetMetadata returns the metadata as a map.
func (*InvokeResponseWrapper) GetMetrics ¶
func (irw *InvokeResponseWrapper) GetMetrics() ([]*Metric, error)
GetMetrics returns a list of Metric objects.
func (*InvokeResponseWrapper) GetRequestId ¶
func (irw *InvokeResponseWrapper) GetRequestId() uint64
GetRequestId returns the request ID.
func (*InvokeResponseWrapper) GetTimeTaken ¶
func (irw *InvokeResponseWrapper) GetTimeTaken() uint64
GetTimeTaken returns the time taken for the operation.
func (*InvokeResponseWrapper) IsError ¶
func (irw *InvokeResponseWrapper) IsError() bool
IsError returns true if there was an error.
func (*InvokeResponseWrapper) IsSuccess ¶
func (irw *InvokeResponseWrapper) IsSuccess() bool
IsSuccess returns true if the operation was successful.
func (*InvokeResponseWrapper) ToDict ¶
func (irw *InvokeResponseWrapper) ToDict() (map[string]interface{}, error)
ToDict converts the wrapped data to a map.
func (*InvokeResponseWrapper) ToJSON ¶
func (irw *InvokeResponseWrapper) ToJSON() (string, error)
ToJSON converts the wrapped data to JSON.
type Metric ¶
type Metric struct { Original *lexatic_backend.Metric Description string Name string Value string }
Metric wraps around the Common.Metric protobuf message.
func NewMetric ¶
func NewMetric(data *lexatic_backend.Metric) *Metric
NewMetric constructs a Metric wrapper from a Common.Metric protobuf message.