interact

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Type    string `json:"type"`
	Payload string `json:"payload"`
}

type Audio

type Audio struct {
	Type    string `json:"type"`
	Message string `json:"message"`
	Src     string `json:"src,omitempty"`
}

type Button

type Button struct {
	Name    string        `json:"name"`
	Request ButtonRequest `json:"request"`
}

type ButtonRequest

type ButtonRequest struct {
	Type    string               `json:"type"`
	Payload ButtonRequestPayload `json:"payload"`
}

type ButtonRequestPayload

type ButtonRequestPayload struct {
	Actions []interface{} `json:"actions"` // Adjust the type if `actions` has a specific structure
	Label   string        `json:"label"`
}

type Card

type Card struct {
	ID          string      `json:"id"`
	Title       string      `json:"title"`
	Description Description `json:"description"`
	ImageUrl    string      `json:"imageUrl"`
	Buttons     []Button    `json:"buttons"`
}

type CardV2

type CardV2 struct {
	Type    string        `json:"type"`
	Time    int64         `json:"time"`
	Payload CardV2Payload `json:"payload"`
}

type CardV2Payload

type CardV2Payload struct {
	ImageUrl    string      `json:"imageUrl"`
	Description Description `json:"description"`
	Buttons     []Button    `json:"buttons"`
	Title       string      `json:"title"`
}
type Carousel struct {
	Type    string          `json:"type"`
	Time    int64           `json:"time"`
	Payload CarouselPayload `json:"payload"`
}

type CarouselPayload

type CarouselPayload struct {
	Layout string `json:"layout"`
	Cards  []Card `json:"cards"`
}

type Child

type Child struct {
	Text string `json:"text"`
}

type Config

type Config struct {
	TTS       bool     `json:"tts"`
	StripSSML bool     `json:"stripSSML"`
	StopTypes []string `json:"stopTypes"`
}

type Description

type Description struct {
	Slate []Slate `json:"slate"`
	Text  string  `json:"text"`
}

type Dimensions

type Dimensions struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

type End

type End struct {
	Type    string      `json:"type"`
	Time    int64       `json:"time"`
	Payload interface{} `json:"payload"` // Can be null, so use interface{} to allow nil
}

type InteractionResponse

type InteractionResponse struct {
	Type    string                 `json:"type"`
	Payload map[string]interface{} `json:"payload"`
}

type InteratctionRequest

type InteratctionRequest struct {
	Action Action  `json:"action"`
	Config *Config `json:"config,omitempty"`
	State  *State  `json:"state,omitempty"`
}

type NoReply

type NoReply struct {
	Type    string         `json:"type"`
	Time    int64          `json:"time"`
	Payload NoReplyPayload `json:"payload"`
}

type NoReplyPayload

type NoReplyPayload struct {
	Timeout int `json:"timeout"` // Timeout in seconds
}

type Slate

type Slate struct {
	Children []Child `json:"children"`
}

type Speak

type Speak struct {
	Type    string `json:"type"`
	Message string `json:"message"`
	Src     string `json:"src,omitempty"`
}

type State

type State struct {
	Variables map[string]interface{} `json:"variables"`
}

type Visual

type Visual struct {
	Type    string        `json:"type"`
	Payload VisualPayload `json:"payload"`
}

type VisualPayload

type VisualPayload struct {
	VisualType       string     `json:"visualType"`
	Image            string     `json:"image"`
	Dimensions       Dimensions `json:"dimensions"`
	CanvasVisibility string     `json:"canvasVisibility"`
}

Specific payload types

Jump to

Keyboard shortcuts

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