Documentation ¶
Index ¶
- type ApiClient
- func (c *ApiClient) AddEntries(idOrName string, entries []Entry) error
- func (c *ApiClient) CreateContext(context Context) error
- func (c *ApiClient) CreateEntity(entity Entity) (*CreationResponse, error)
- func (c *ApiClient) CreateIntent(intent Intent) (*CreationResponse, error)
- func (c *ApiClient) DeleteContext(name string) error
- func (c *ApiClient) DeleteContexts() error
- func (c *ApiClient) DeleteEntity(idOrName string) error
- func (c *ApiClient) DeleteEntries(idOrName string, entries []string) error
- func (c *ApiClient) DeleteIntent(id string) error
- func (c *ApiClient) GetContext(name string) (*Context, error)
- func (c *ApiClient) GetContexts() ([]Context, error)
- func (c *ApiClient) GetEntities() ([]EntityDescription, error)
- func (c *ApiClient) GetEntity(idOrName string) (*Entity, error)
- func (c *ApiClient) GetIntent(id string) (*Intent, error)
- func (c *ApiClient) GetIntents() ([]IntentDescription, error)
- func (c *ApiClient) Query(q Query) (*QueryResponse, error)
- func (c *ApiClient) Tts(text string) (string, error)
- func (c *ApiClient) UpdateEntities(entities []Entity) error
- func (c *ApiClient) UpdateEntity(idOrName string, entity Entity) error
- func (c *ApiClient) UpdateEntries(idOrName string, entries []Entry) error
- func (c *ApiClient) UpdateIntent(id string, intent Intent) error
- type CardButton
- type Client
- type ClientConfig
- type Context
- type CortanaCommand
- type CreationResponse
- type Data
- type Entity
- type EntityDescription
- type Entry
- type Event
- type Fulfilment
- type Intent
- type IntentDescription
- type IntentParameter
- type IntentResponse
- type Location
- type Message
- type Metadata
- type Platform
- type Query
- type QueryResponse
- type Result
- type Status
- type UserSays
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiClient ¶
type ApiClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(conf *ClientConfig) (*ApiClient, error)
func (*ApiClient) AddEntries ¶
func (*ApiClient) CreateContext ¶
func (*ApiClient) CreateEntity ¶
func (c *ApiClient) CreateEntity(entity Entity) (*CreationResponse, error)
func (*ApiClient) CreateIntent ¶
func (c *ApiClient) CreateIntent(intent Intent) (*CreationResponse, error)
func (*ApiClient) DeleteContext ¶
func (*ApiClient) DeleteContexts ¶
func (*ApiClient) DeleteEntity ¶
func (*ApiClient) DeleteEntries ¶
func (*ApiClient) DeleteIntent ¶
func (*ApiClient) GetContexts ¶
func (*ApiClient) GetEntities ¶
func (c *ApiClient) GetEntities() ([]EntityDescription, error)
func (*ApiClient) GetIntents ¶
func (c *ApiClient) GetIntents() ([]IntentDescription, error)
func (*ApiClient) UpdateEntities ¶
func (*ApiClient) UpdateEntity ¶
func (*ApiClient) UpdateEntries ¶
type CardButton ¶
type Client ¶
type Client interface { Query(Query) (*QueryResponse, error) Tts(text string) (string, error) GetContext(name string) (*Context, error) CreateContext(context Context) error DeleteContext(name string) error GetContexts() ([]Context, error) DeleteContexts() error GetEntities() ([]EntityDescription, error) UpdateEntities(entities []Entity) error GetEntity(idOrName string) (*Entity, error) CreateEntity(entity Entity) (*CreationResponse, error) UpdateEntity(idOrName string, entity Entity) error DeleteEntity(idOrName string) error AddEntries(idOrName string, entries []Entry) error UpdateEntries(idOrName string, entries []Entry) error DeleteEntries(idOrName string, entries []string) error GetIntent(id string) (*Intent, error) CreateIntent(intent Intent) (*CreationResponse, error) UpdateIntent(id string, intent Intent) error DeleteIntent(id string) error GetIntents() ([]IntentDescription, error) }
type ClientConfig ¶
type CortanaCommand ¶
type CortanaCommand struct { Target string `json:"target"` }
type CreationResponse ¶
type EntityDescription ¶
type Fulfilment ¶
type Intent ¶
type Intent struct { Id string `json:"id"` Name string `json:"name"` Auto bool `json:"auto"` Contexts []string `json:"contexts"` Templates []string `json:"templates"` UserSays []UserSays `json:"userSays"` Responses []IntentResponse `json:"responses"` Priority int `json:"priority"` WebhookUsed bool `json:"webhookUsed"` WebhookForSlotFilling bool `json:"webhookForSlotFilling"` FallbackIntent bool `json:"fallbackIntent"` CortanaCommand CortanaCommand `json:"cortanaCommand"` Events []Event `json:"events"` }
type IntentDescription ¶
type IntentDescription struct { Id string `json:"id"` Name string `json:"name"` ContextIn []string `json:"contextIn"` ContextOut []Context `json:"contextOut"` Actions []string `json:"actions"` Params []IntentParameter `json:"parameters"` Priority int `json:"priority"` FallbackIntent bool `json:"fallbackIntent"` }
type IntentParameter ¶
type IntentResponse ¶
type IntentResponse struct { Action string `json:"action"` ResetContexts bool `json:"resetContexts"` AffectedContexts []Context `json:"affectedContexts"` Params []IntentParameter `json:"parameters"` Messages []Message `json:"messages"` }
type Query ¶
type Query struct { Query []string `json:"query"` Event Event `json:"event"` Version string `json:"-"` SessionId string `json:"sessionId"` Language string `json:"lang"` Contexts []Context `json:"contexts"` ResetContexts bool `json:"resetContexts"` Entities []EntityDescription `json:"entities"` Timezone string `json:"timezone"` Location Location `json:"location"` OriginalRequest Platform `json:"originalRequest"` }
type QueryResponse ¶
type Result ¶
type Result struct { Source string `json:"source"` ResolvedQuery string `json:"resolvedQuery"` Action string `json:"action"` ActionIncomplete bool `json:"actionIncomplete"` Params map[string]string `json:"parameters"` Contexts []Context `json:"contexts"` Fulfillment Fulfilment `json:"fulfillment"` Score float64 `json:"score"` Metadata Metadata `json:"metadata"` }
Click to show internal directories.
Click to hide internal directories.