Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateConfig ¶
GenerateConfig generates a blank json encoded config template
Types ¶
type Config ¶
type Config struct { SlackConfig SlackConfig `json:"slack_config"` SnipsConfig SnipsConfig `json:"snips_config"` MQTTConfig MQTTConfig `json:"mqtt_config"` }
Config holds relevant configuration for MQTT client and future config options
func LoadConfig ¶
LoadConfig loads path and returns config instance or returns an error
type EndSession ¶
EndSession holds outbound message when responding to user and ending session
type Entity ¶
type Entity struct {
Ops [][]interface{} `json:"operations"`
}
Entity contains operations/data for injecting entities via mqtt message
func BuildEntityFromSlackUsers ¶
func BuildEntityFromSlackUsers(c SnipsConfig, users []*slack.User) *Entity
type MQTTConfig ¶
type MQTTConfig struct { // Required host // Example of host tcp://localhost:1883 or just localhost:1833 Hosts []string `json:"host"` // Optional username authentication Username string `json:"username"` // Optional password authentication Password string `json:"password"` }
MQTTConfig contains the configuration details for the client to connect
type Payload ¶
type Payload struct { SessionID string `json:"sessionId"` Values map[string]interface{} `json:"customData"` Intent Intent `json:"intent"` Slots []Slot `json:"slots"` }
Payload contains the custom payload from a mqtt.Message defined by snips
type SlackConfig ¶
type SlackConfig struct { Token string `json:"token"` // Message config options Username string `json:"username"` EmojiIcon string `json:"emoji_icon"` Messages []string `json:"messages"` // Blacklist holds the list of user/channel IDs // for which should never be messaged. Blacklist []string `json:"blacklist"` }
func (SlackConfig) IsBlacklisted ¶
func (s SlackConfig) IsBlacklisted(id string) bool
type Slot ¶
type Slot struct { Confidence float64 `json:"confidence"` Entity string `json:"entity"` Name string `json:"slotName"` Range map[string]int `json:"range"` RawValue string `json:"raw_value"` Value ValueType `json:"value"` }
Slot contains details about extracted slots of an intent
type SnipsConfig ¶
type SnipsConfig struct { SlackIntent string `json:"slack_intent"` SlotName string `json:"slot_name"` }
SnipsConfig holds snips related configration like intent name
Click to show internal directories.
Click to hide internal directories.