Documentation
¶
Index ¶
- Constants
- func FilePathToTopic(filePath string) string
- func FilesToJson(path string) ([]byte, error)
- func FilesToMap(path string) (map[string]interface{}, error)
- func IsJSON(data []byte) bool
- func JsonToFiles(data []byte, path string, perm os.FileMode) error
- func MapToFiles(data map[string]interface{}, path string, perm os.FileMode) error
- func ParseSubscriptionDirective(directive, prefix string) []string
- func TopicToFilePath(topic string) string
- func TrimStringSlice(in []string) []string
- type AutomationState
- type Event
- type EventType
- type IgorPlugin
- type OttoScript
- type PluginInit
- type Runnable
- type ScriptManager
- type ScriptStore
- type Store
Constants ¶
View Source
const PluginInitSymbol = "Init"
Variables ¶
This section is empty.
Functions ¶
func FilePathToTopic ¶
func FilesToJson ¶
func FilesToMap ¶
func ParseSubscriptionDirective ¶
parses a directive line inside of a JS file
func TopicToFilePath ¶
func TrimStringSlice ¶
Types ¶
type AutomationState ¶
func NewAutomationState ¶
func NewAutomationState(init []byte) *AutomationState
func (*AutomationState) Mutate ¶
func (as *AutomationState) Mutate(update []byte, updatePath ...string) error
func (*AutomationState) State ¶
func (as *AutomationState) State() []byte
type IgorPlugin ¶
type IgorPlugin interface {
// UpdateState is called whenever the state the plugin is listening to changes
// the state will be in a hierarchical structure like JSON and the path dictates
// which part of the state the update argument should replace. An empty path
// indicates that the entire state for the plugin should be updated
UpdateState(path []string, update []byte) error
}
type OttoScript ¶
type PluginInit ¶
type PluginInit func(func(Event), []string) IgorPlugin
PluginInit initializes the plugin with a function to emit events from and the path through the global state that contains the parts this plugin should get it's data from
type ScriptManager ¶
type ScriptManager interface {
HandleEvents(<-chan Event)
}
type ScriptStore ¶
type ScriptStore interface {
Fetch()
}
Click to show internal directories.
Click to hide internal directories.