scene

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	Text    string  `yaml:"text" xml:"text" json:"text"`
	URL     string  `yaml:"url,omitempty" xml:"url,omitempty" json:"url,omitempty"`
	Payload Payload `yaml:"payload,omitempty" json:"payload,omitempty" xml:"payload,omitempty"`
}

type Error

type Error struct {
	Base  string `yaml:"base,omitempty" json:"base,omitempty" xml:"base,omitempty"`
	Name  string `yaml:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	Text  string `yaml:"text,omitempty" json:"text,omitempty" xml:"text,omitempty"`
	Scene string `yaml:"scene,omitempty" json:"scene,omitempty" xml:"scene,omitempty"`
}

func (Error) IsBase

func (e Error) IsBase() bool

func (Error) IsScene

func (e Error) IsScene() bool

func (Error) IsText

func (e Error) IsText() bool

func (Error) IsValid

func (e Error) IsValid() bool

type GoodByeScene

type GoodByeScene struct {
	Scene
	Name string `yaml:"name" json:"name" xml:"name"`
}

type Matcher

type Matcher struct {
	// contains filtered or unexported fields
}

func (*Matcher) GetRegexMatcher

func (m *Matcher) GetRegexMatcher() (*RegexMatcher, error)

func (*Matcher) GetSelectsMatcher

func (m *Matcher) GetSelectsMatcher() (*SelectMatcher, error)

func (*Matcher) GetStandardMatcher

func (m *Matcher) GetStandardMatcher() (string, error)

func (*Matcher) IsDefaultMatcher

func (m *Matcher) IsDefaultMatcher() bool

func (*Matcher) IsRegexMatcher

func (m *Matcher) IsRegexMatcher() bool

func (*Matcher) IsSelectMatcher

func (m *Matcher) IsSelectMatcher() bool

func (*Matcher) MustRegexMatcher

func (m *Matcher) MustRegexMatcher() RegexMatcher

func (*Matcher) MustSelectsMatcher

func (m *Matcher) MustSelectsMatcher() SelectMatcher

func (*Matcher) MustStandardMatcher

func (m *Matcher) MustStandardMatcher() string

func (*Matcher) UnmarshalJSON

func (m *Matcher) UnmarshalJSON(bs []byte) error

func (*Matcher) UnmarshalXML

func (m *Matcher) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*Matcher) UnmarshalYAML

func (m *Matcher) UnmarshalYAML(n *yaml.Node) error

type Payload

type Payload interface{}

type RegexMatcher

type RegexMatcher struct {
	Name  string `yaml:"name" json:"name" xml:"name"`
	Regex string `yaml:"regex" json:"regex" xml:"regex"`
}

type Scene

type Scene struct {
	Text        Text              `yaml:"text" json:"text" xml:"text"`
	NextScenes  []string          `yaml:"nextScenes,omitempty" json:"next_scenes,omitempty" xml:"nextScenes,omitempty"`
	IsInfoScene bool              `yaml:"isInfoScene,omitempty" json:"is_info_scene,omitempty" xml:"isInfoScene,omitempty"`
	Matchers    []Matcher         `yaml:"matchers,omitempty" json:"matchers,omitempty" xml:"matchers,omitempty"`
	Error       Error             `yaml:"error,omitempty" json:"error,omitempty" xml:"error,omitempty"`
	Buttons     map[string]Button `yaml:"buttons,omitempty" json:"buttons,omitempty" xml:"buttons,omitempty"`
}

func (*Scene) IsValid

func (s *Scene) IsValid() (bool, error)

type SelectMatcher

type SelectMatcher struct {
	Name           string   `yaml:"name" json:"name" xml:"name"`
	Selects        []string `yaml:"selects" json:"selects" xml:"selects"`
	ReplaceMessage string   `yaml:"replaceMessage" json:"replaceMessage" xml:"replaceMessage"`
}

type Text

type Text struct {
	Text   string            `yaml:"string" json:"text" xml:"text"`
	TTS    string            `yaml:"tts" json:"tts" xml:"tts"`
	Values map[string]string `yaml:"values,omitempty" json:"values,omitempty" xml:"values,omitempty"`
}

func (*Text) IsValid

func (t *Text) IsValid() (bool, error)

Jump to

Keyboard shortcuts

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