director

package
v0.2.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// ID of app
	ApplicationID string

	// Types of app:
	//  • mobile;
	//  • speaker;
	//  • VK;
	//  • other.
	ApplicationType marusia.ApplicationType
}

Application info about app.

type Button

type Button struct {
	Title   string
	URL     string
	Payload interface{}
}

type Director

type Director interface {
	PlayScene(command SceneRequest) Result
}

Director - interface type of game director

type Result

type Result struct {
	Text          Text
	Buttons       []Button
	IsEndOfScript bool
}

Result - of play scene.

type SceneRequest

type SceneRequest struct {
	Request       UserInput
	Info          SessionInfo
	Application   Application
	GlobalContext context.Context
}

SceneRequest - request from user for scene.

type SessionInfo

type SessionInfo struct {
	UserID    string
	SessionID string

	// VK ID user
	UserVKID string

	IsNewSession bool
}

SessionInfo - info about user for scene.

type Text

type Text struct {
	BaseText     string
	TextToSpeech string
}

type UserInput

type UserInput struct {
	Command      string
	FullUserText string
	WasButton    bool
	Payload      json.RawMessage
	NLU          language.NLU
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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