Documentation
¶
Index ¶
- Constants
- type Service
- type Store
- func (s *Store) AddUtterance(botName, utterance string)
- func (s *Store) CreateBotVersion(name string) (*StoredBot, *service.AWSError)
- func (s *Store) CreateIntentVersion(name string) (*StoredIntent, *service.AWSError)
- func (s *Store) CreateSlotTypeVersion(name string) (*StoredSlotType, *service.AWSError)
- func (s *Store) DeleteBot(name string) *service.AWSError
- func (s *Store) DeleteBotAlias(botName, aliasName string) *service.AWSError
- func (s *Store) DeleteBotVersion(name, version string) *service.AWSError
- func (s *Store) DeleteChannelAssoc(botName, alias, name string) *service.AWSError
- func (s *Store) DeleteIntent(name string) *service.AWSError
- func (s *Store) DeleteIntentVersion(name, version string) *service.AWSError
- func (s *Store) DeleteSlotType(name string) *service.AWSError
- func (s *Store) DeleteSlotTypeVersion(name, version string) *service.AWSError
- func (s *Store) DeleteUtterances(botName string)
- func (s *Store) GetBot(name, version string) (*StoredBot, *service.AWSError)
- func (s *Store) GetBotAlias(botName, aliasName string) (*StoredBotAlias, *service.AWSError)
- func (s *Store) GetChannelAssoc(botName, alias, name string) (*StoredChannelAssoc, *service.AWSError)
- func (s *Store) GetImport(id string) (*StoredImport, *service.AWSError)
- func (s *Store) GetIntent(name, version string) (*StoredIntent, *service.AWSError)
- func (s *Store) GetMigration(id string) (*StoredMigration, *service.AWSError)
- func (s *Store) GetSlotType(name, version string) (*StoredSlotType, *service.AWSError)
- func (s *Store) GetUtterances(botName string) []string
- func (s *Store) ListBotAliases(botName, nameContains string) []*StoredBotAlias
- func (s *Store) ListBotVersions(name string) ([]*StoredBot, *service.AWSError)
- func (s *Store) ListBots(nameContains string) []*StoredBot
- func (s *Store) ListChannelAssocs(botName, alias, nameContains string) []*StoredChannelAssoc
- func (s *Store) ListIntentVersions(name string) ([]*StoredIntent, *service.AWSError)
- func (s *Store) ListIntents(nameContains string) []*StoredIntent
- func (s *Store) ListMigrations() []*StoredMigration
- func (s *Store) ListSlotTypeVersions(name string) ([]*StoredSlotType, *service.AWSError)
- func (s *Store) ListSlotTypes(nameContains string) []*StoredSlotType
- func (s *Store) ListTags(arn string) map[string]string
- func (s *Store) PutBot(b *StoredBot) (*StoredBot, *service.AWSError)
- func (s *Store) PutBotAlias(a *StoredBotAlias) (*StoredBotAlias, *service.AWSError)
- func (s *Store) PutChannelAssoc(a *StoredChannelAssoc) (*StoredChannelAssoc, *service.AWSError)
- func (s *Store) PutIntent(in *StoredIntent) (*StoredIntent, *service.AWSError)
- func (s *Store) PutSlotType(st *StoredSlotType) (*StoredSlotType, *service.AWSError)
- func (s *Store) Reset()
- func (s *Store) StartImport(name, resourceType, mergeStrategy string, tags map[string]string) *StoredImport
- func (s *Store) StartMigration(strategy, v1Name, v1Version, v2Name, v2Role string) *StoredMigration
- func (s *Store) TagResource(arn string, tags map[string]string)
- func (s *Store) UntagResource(arn string, keys []string)
- type StoredBot
- type StoredBotAlias
- type StoredChannelAssoc
- type StoredImport
- type StoredIntent
- type StoredMigration
- type StoredSlotType
Constants ¶
const LatestVersion = "$LATEST"
LatestVersion is the alias used for the working draft of a Lex resource.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the cloudmock implementation of the AWS lex service.
func (*Service) HandleRequest ¶
HandleRequest routes a request to the appropriate handler.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the in-memory data store for Lex Models V1.
func (*Store) AddUtterance ¶
AddUtterance appends a sample utterance for the given bot.
func (*Store) CreateBotVersion ¶
CreateBotVersion snapshots $LATEST into a new numeric version.
func (*Store) CreateIntentVersion ¶
func (s *Store) CreateIntentVersion(name string) (*StoredIntent, *service.AWSError)
CreateIntentVersion snapshots $LATEST.
func (*Store) CreateSlotTypeVersion ¶
func (s *Store) CreateSlotTypeVersion(name string) (*StoredSlotType, *service.AWSError)
func (*Store) DeleteBot ¶
DeleteBot removes a bot and every version. Also cleans up aliases and channel associations rooted on that bot.
func (*Store) DeleteBotAlias ¶
func (*Store) DeleteBotVersion ¶
DeleteBotVersion removes a single numeric version. $LATEST cannot be deleted.
func (*Store) DeleteChannelAssoc ¶
func (*Store) DeleteIntentVersion ¶
func (*Store) DeleteSlotTypeVersion ¶
func (*Store) DeleteUtterances ¶
DeleteUtterances drops recorded utterances for a bot.
func (*Store) GetBotAlias ¶
func (s *Store) GetBotAlias(botName, aliasName string) (*StoredBotAlias, *service.AWSError)
func (*Store) GetChannelAssoc ¶
func (s *Store) GetChannelAssoc(botName, alias, name string) (*StoredChannelAssoc, *service.AWSError)
func (*Store) GetIntent ¶
func (s *Store) GetIntent(name, version string) (*StoredIntent, *service.AWSError)
func (*Store) GetMigration ¶
func (s *Store) GetMigration(id string) (*StoredMigration, *service.AWSError)
func (*Store) GetSlotType ¶
func (s *Store) GetSlotType(name, version string) (*StoredSlotType, *service.AWSError)
func (*Store) GetUtterances ¶
GetUtterances returns recorded utterances for a bot.
func (*Store) ListBotAliases ¶
func (s *Store) ListBotAliases(botName, nameContains string) []*StoredBotAlias
func (*Store) ListBotVersions ¶
ListBotVersions returns every version of a single bot.
func (*Store) ListChannelAssocs ¶
func (s *Store) ListChannelAssocs(botName, alias, nameContains string) []*StoredChannelAssoc
func (*Store) ListIntentVersions ¶
func (s *Store) ListIntentVersions(name string) ([]*StoredIntent, *service.AWSError)
func (*Store) ListIntents ¶
func (s *Store) ListIntents(nameContains string) []*StoredIntent
func (*Store) ListMigrations ¶
func (s *Store) ListMigrations() []*StoredMigration
func (*Store) ListSlotTypeVersions ¶
func (s *Store) ListSlotTypeVersions(name string) ([]*StoredSlotType, *service.AWSError)
func (*Store) ListSlotTypes ¶
func (s *Store) ListSlotTypes(nameContains string) []*StoredSlotType
func (*Store) PutBot ¶
PutBot creates or updates the $LATEST version of a bot. If createVersion is set on the bot, a numeric version snapshot is also produced.
func (*Store) PutBotAlias ¶
func (s *Store) PutBotAlias(a *StoredBotAlias) (*StoredBotAlias, *service.AWSError)
func (*Store) PutChannelAssoc ¶
func (s *Store) PutChannelAssoc(a *StoredChannelAssoc) (*StoredChannelAssoc, *service.AWSError)
func (*Store) PutIntent ¶
func (s *Store) PutIntent(in *StoredIntent) (*StoredIntent, *service.AWSError)
PutIntent creates or updates the $LATEST version of an intent.
func (*Store) PutSlotType ¶
func (s *Store) PutSlotType(st *StoredSlotType) (*StoredSlotType, *service.AWSError)
func (*Store) Reset ¶
func (s *Store) Reset()
Reset clears all in-memory state. Satisfies the Resettable interface used by the admin API.
func (*Store) StartImport ¶
func (s *Store) StartImport(name, resourceType, mergeStrategy string, tags map[string]string) *StoredImport
func (*Store) StartMigration ¶
func (s *Store) StartMigration(strategy, v1Name, v1Version, v2Name, v2Role string) *StoredMigration
func (*Store) UntagResource ¶
type StoredBot ¶
type StoredBot struct {
Name string
Version string
Description string
Locale string
VoiceID string
ProcessBehavior string
Status string
FailureReason string
Checksum string
IdleSessionTTLInSeconds int
NluIntentConfidenceThreshold float64
ChildDirected bool
DetectSentiment bool
EnableModelImprovements bool
CreateVersion bool
Intents []map[string]any
ClarificationPrompt map[string]any
AbortStatement map[string]any
CreatedAt time.Time
LastUpdatedAt time.Time
}
StoredBot is the persisted shape of a Lex bot version.
type StoredBotAlias ¶
type StoredBotAlias struct {
Name string
BotName string
BotVersion string
Description string
Checksum string
ConversationLogs map[string]any
CreatedAt time.Time
LastUpdatedAt time.Time
}
StoredBotAlias is the persisted shape of a Lex bot alias.
type StoredChannelAssoc ¶
type StoredChannelAssoc struct {
Name string
BotName string
BotAlias string
Description string
Type string
Status string
FailureReason string
BotConfiguration map[string]string
CreatedAt time.Time
}
StoredChannelAssoc is the persisted shape of a bot channel association.
type StoredImport ¶
type StoredImport struct {
ImportID string
Name string
ResourceType string
MergeStrategy string
Status string
FailureReason []string
Tags map[string]string
CreatedAt time.Time
}
StoredImport models an asynchronous resource import job.
type StoredIntent ¶
type StoredIntent struct {
Name string
Version string
Description string
Checksum string
ParentIntentSignature string
Slots []map[string]any
SampleUtterances []string
ConfirmationPrompt map[string]any
RejectionStatement map[string]any
FollowUpPrompt map[string]any
ConclusionStatement map[string]any
DialogCodeHook map[string]any
FulfillmentActivity map[string]any
InputContexts []map[string]any
OutputContexts []map[string]any
KendraConfiguration map[string]any
CreatedAt time.Time
LastUpdatedAt time.Time
}
StoredIntent is the persisted shape of a Lex intent version.
type StoredMigration ¶
type StoredMigration struct {
MigrationID string
MigrationStrategy string
Status string
V1BotName string
V1BotVersion string
V1BotLocale string
V2BotID string
V2BotRole string
StartedAt time.Time
Alerts []map[string]any
}
StoredMigration models an async v1 → v2 bot migration job.
type StoredSlotType ¶
type StoredSlotType struct {
Name string
Version string
Description string
Checksum string
ValueSelectionStrategy string
ParentSlotTypeSignature string
EnumerationValues []map[string]any
SlotTypeConfigurations []map[string]any
CreatedAt time.Time
LastUpdatedAt time.Time
}
StoredSlotType is the persisted shape of a Lex slot type version.