scenario

package
v0.18.6 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 40 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ActionConnectWs             = "connectws"
	ActionOpenApp               = "openapp"
	ActionOpenHub               = "openhub"
	ActionGenerateOdag          = "generateodag"
	ActionDeleteOdag            = "deleteodag"
	ActionCreateSheet           = "createsheet"
	ActionCreateBookmark        = "createbookmark"
	ActionDeleteBookmark        = "deletebookmark"
	ActionApplyBookmark         = "applybookmark"
	ActionSetScript             = "setscript"
	ActionChangeSheet           = "changesheet"
	ActionSelect                = "select"
	ActionClearAll              = "clearall"
	ActionIterated              = "iterated"
	ActionThinkTime             = "thinktime"
	ActionRandom                = "randomaction"
	ActionSheetChanger          = "sheetchanger"
	ActionDuplicateSheet        = "duplicatesheet"
	ActionReload                = "reload"
	ActionProductVersion        = "productversion"
	ActionPublishSheet          = "publishsheet"
	ActionUnPublishSheet        = "unpublishsheet"
	ActionDisconnectApp         = "disconnectapp"
	ActionDeleteSheet           = "deletesheet"
	ActionPublishBookmark       = "publishbookmark"
	ActionUnPublishBookmark     = "unpublishbookmark"
	ActionSubscribeObjects      = "subscribeobjects"
	ActionUnsubscribeObjects    = "unsubscribeobjects"
	ActionListBoxSelect         = "listboxselect"
	ActionDisconnectEnvironment = "disconnectenvironment"
	ActionClickActionButton     = "clickactionbutton"
	ActionContainerTab          = "containertab"
	ActionDoSave                = "dosave"
	ActionClearField            = "clearfield"
	ActionAskHubAdvisor         = "askhubadvisor"
	ActionSetSenseVariable      = "setsensevariable"
	ActionSetScriptVar          = "setscriptvar"
	ActionSmartSearch           = "smartsearch"
	ActionObjectSearch          = "objectsearch"
	ActionGetScript             = "getscript"
	ActionChangeSteam           = "changestream"
)
View Source
const DefaultArraySeparator = ","
View Source
const StreamsStateKey = "streamsState"

Variables

View Source
var WindowsOdagEndpointConfiguration = OdagEndpointConfiguration{
	Main:            "api/odag/v1/links",
	Requests:        "api/odag/v1/requests",
	EnabledEndpoint: "api/odag/v1/isodagavailable",
}

Functions

func CheckActionError

func CheckActionError(err error) (bool, error)

CheckActionError check action errors, returns true if error cause is aborted action, error containing any remaining error after flattening possible multi.Error

func Contains

func Contains(list []string, match func(s string) bool) bool

Contains check whether any element in the supplied list matches (match func(s string) bool)

func DebugPrintObjectSubscriptions added in v0.5.6

func DebugPrintObjectSubscriptions(sessionState *session.State)

func DeleteOdag added in v0.9.0

func DeleteOdag(sessionState *session.State, settings DeleteOdagSettings, actionState *action.State, connectionSettings *connection.ConnectionSettings, odagEndpoint OdagEndpointConfiguration, selectionAppId string) error

DeleteOdag delete ODAG app

func GenerateOdag added in v0.9.0

func GenerateOdag(sessionState *session.State, settings GenerateOdagSettings, actionState *action.State,
	connectionSettings *connection.ConnectionSettings, odagEndpoint OdagEndpointConfiguration, selectionAppId string) error

GenerateOdag generate ODAG app

func GetConnTestFuncs

func GetConnTestFuncs() []func(*connection.ConnectionSettings, *session.State, *action.State) error

func GetCurrentSheet

func GetCurrentSheet(uplink *enigmahandlers.SenseUplink) (*senseobjects.Sheet, error)

GetCurrentSheet from objects

func GetOdagSelectionBindings

func GetOdagSelectionBindings(host string, odagLinkId string, sessionState *session.State,
	actionState *action.State, odagEndpoint string) ([]structs.OdagLinkBinding, error)

GetOdagSelectionBindings gets information about the ODAG link, including bindings

func GetSheetEntry added in v0.5.6

func GetSheetEntry(sessionState *session.State, actionState *action.State, app *senseobjects.App, sheetid string) (*senseobjects.SheetNxContainerEntry, error)

func HubAdvisorQuery added in v0.8.0

func HubAdvisorQuery(text string, options ...HubAdvisorOption) *hubAdvisorQuery

func IndexOf added in v0.5.8

func IndexOf(match string, stringSlice []string) (int, bool)

IndexOf returns index of first match in stringSlice or else -1

func MakeOdagRequest

func MakeOdagRequest(sessionState *session.State, actionState *action.State, odagLinkBindings []structs.OdagLinkBinding, host string, odagEndpoint OdagEndpointConfiguration, odagLinkId string, postObject structs.IOdagPostRequest, connection *enigmahandlers.SenseUplink) error

func NewActionsSettings

func NewActionsSettings(typ string) interface{}

NewActionsSettings of type

func RegisterAction

func RegisterAction(act string, settings ActionSettings) error

RegisterAction register a custom action any existing with same name This should be done as early as possible and must be done before unmarshaling actions

func RegisterActionOverride

func RegisterActionOverride(act string, settings ActionSettings) error

RegisterActionOverride register a custom action and override any existing with same name This should be done as early as possible and must be done before unmarshaling actions

func RegisterActions

func RegisterActions(customActionMap map[string]ActionSettings) error

RegisterActions register custom actions. This should be done as early as possible and must be done before unmarshaling actions

func RegisterActionsOverride

func RegisterActionsOverride(customActionMap map[string]ActionSettings) error

RegisterActionsOverride register custom actions and override any existing with same name This should be done as early as possible and must be done before unmarshaling actions

func RegisterConnFunc

func RegisterConnFunc(connFunc func(*connection.ConnectionSettings, *session.State, *action.State) error) error

RegisterConnFunc registers a custom connection function This should be done as early as possible and must be done before unmarshaling actions

func RegisterConnFuncs

func RegisterConnFuncs(connFuncs []func(*connection.ConnectionSettings, *session.State, *action.State) error) error

RegisterConnFuncs registers custom connection functions. This should be done as early as possible and must be done before unmarshaling actions

func RegisteredActions

func RegisteredActions() []string

RegisteredActions returns a list of currently registered actions

func ResetDefaultActions

func ResetDefaultActions()

ResetDefaultActions reset action list to default list. Used e.g. for tests overriding default actions

func ResetDefaultConnFuncs

func ResetDefaultConnFuncs()

func Weights added in v0.8.0

func Weights(wqs []WeightedQuery) []int

Types

type AbortedError

type AbortedError struct{}

AbortedError action was aborted

func (AbortedError) Error

func (err AbortedError) Error() string

Implement error interface

type Action

type Action struct {
	ActionCore
	Settings ActionSettings `json:"settings,omitempty" doc-key:"config.scenario.settings"`
}

Action simulated user action

func (*Action) AppStructureAction added in v0.5.2

func (act *Action) AppStructureAction() (*AppStructureInfo, []Action)

AppStructureAction returns if this action should be included when getting app structure and any additional sub actions which should also be included

func (*Action) Execute

func (act *Action) Execute(sessionState *session.State, connectionSettings *connection.ConnectionSettings) error

Execute scenario action

func (*Action) IsContainerAction added in v0.5.7

func (act *Action) IsContainerAction() bool

IsContainerAction returns true if action settings implements ContainerAction interface

func (*Action) UnmarshalJSON

func (act *Action) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal action

func (*Action) Validate

func (act *Action) Validate() ([]string, error)

Validate scenario action

type ActionCore

type ActionCore struct {
	Type     string `json:"action" doc-key:"config.scenario.action"`
	Label    string `json:"label" doc-key:"config.scenario.label"`
	Disabled bool   `json:"disabled" doc-key:"config.scenario.disabled"`
}

type ActionSettings

type ActionSettings interface {
	// Execute action
	Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())
	// Validate action []string are validation warnings to be reported to user
	Validate() ([]string, error)
}

ActionSettings scenario action interface for mandatory methods

type ActionType

type ActionType int

ActionType type of action

const (
	// ThinkTime wait for a random duration
	ThinkTime ActionType = iota
	// SheetObjectSelection selecting in a random object on the current sheet
	SheetObjectSelection
	// ChangeSheet changing to a random sheet
	ChangeSheet
	// ClearAll clearing all selections
	ClearAll
)

func (ActionType) GetEnumMap

func (value ActionType) GetEnumMap() *enummap.EnumMap

func (ActionType) MarshalJSON

func (value ActionType) MarshalJSON() ([]byte, error)

MarshalJSON marshal ActionType

func (ActionType) String added in v0.5.7

func (value ActionType) String() string

func (*ActionType) UnmarshalJSON

func (value *ActionType) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal ActionType

type ActionTypeSettings

type ActionTypeSettings struct {
	// Type of action
	Type ActionType `json:"type" doc-key:"randomaction.actions.type"`
	// Uniform likelihood for action (weight)
	Weight int `json:"weight" doc-key:"randomaction.actions.weight"`
	// Overrides override arbitrary properties of the settings corresponding to this action
	Overrides map[string]interface{} `json:"overrides,omitempty" doc-key:"randomaction.actions.overrides"`
	// contains filtered or unexported fields
}

ActionTypeSettings settings for specific ActionType

type AdvisorQuerySourceEnum added in v0.8.0

type AdvisorQuerySourceEnum int
const (
	// QueryString queries from string or file
	QueryList AdvisorQuerySourceEnum = iota
	// QueryFromFile queries read from file
	QueryFromFile
)

func (AdvisorQuerySourceEnum) GetEnumMap added in v0.8.0

func (value AdvisorQuerySourceEnum) GetEnumMap() *enummap.EnumMap

func (AdvisorQuerySourceEnum) MarshalJSON added in v0.8.0

func (value AdvisorQuerySourceEnum) MarshalJSON() ([]byte, error)

func (*AdvisorQuerySourceEnum) UnmarshalJSON added in v0.8.0

func (value *AdvisorQuerySourceEnum) UnmarshalJSON(arg []byte) error

type AffectsAppObjectsAction added in v0.5.2

type AffectsAppObjectsAction interface {
	AffectsAppObjectsAction(appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)
}

AffectsAppObjectsAction is an interface that should be implemented by all actions that affect the availability of selectable objects for app structure consumption. App structure of the current app is passed as an argument. The return is * added *config.AppStructurePopulatedObjects - objects to be added to the selectable list by this action * removed []string - ids of objects that are removed (including any children) by this action * clearObjects bool - clears all objects except bookmarks and sheets

type AppStructureAction added in v0.5.2

type AppStructureAction interface {
	AppStructureAction() (*AppStructureInfo, []Action)
}

AppStructureAction returns if this action should be included when doing an "get app structure" from script, IsAppAction tells the scenario to insert a "getappstructure" action after that action using data from sessionState.CurrentApp. A list of Sub action to be evaluated can also be included

type AppStructureInfo added in v0.5.2

type AppStructureInfo struct {
	IsAppAction bool
	Include     bool
}

AppStructureActionContainer

type ApplyBookmarkSettings

type ApplyBookmarkSettings struct {
	BookMarkSettings
	SelectionsOnly bool `json:"selectionsonly" displayname:"Apply selections only" doc-key:"applybookmark.selectionsonly"`
}

ApplyBookmarkSettings apply bookmark settings

func (ApplyBookmarkSettings) AffectsAppObjectsAction added in v0.5.2

func (settings ApplyBookmarkSettings) AffectsAppObjectsAction(structure appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)

AffectsAppObjectsAction implements AffectsAppObjectsAction interface

func (ApplyBookmarkSettings) Execute

func (settings ApplyBookmarkSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute ApplyBookmarkSettings action (Implements ActionSettings interface)

func (ApplyBookmarkSettings) Validate

func (settings ApplyBookmarkSettings) Validate() ([]string, error)

Validate ApplyBookmarkSettings action (Implements ActionSettings interface)

type AskHubAdvisorSettings added in v0.8.0

type AskHubAdvisorSettings struct {
	AskHubAdvisorSettingsCore
}

AskHubAdvisor-action settings

func (AskHubAdvisorSettings) DefaultValuesForGUI added in v0.14.18

func (AskHubAdvisorSettings) DefaultValuesForGUI() ActionSettings

func (AskHubAdvisorSettings) Execute added in v0.8.0

func (settings AskHubAdvisorSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

AskHubAdvisorSettings implements ActionSettings

func (*AskHubAdvisorSettings) IsContainerAction added in v0.8.0

func (settings *AskHubAdvisorSettings) IsContainerAction()

func (AskHubAdvisorSettings) MarshalJSON added in v0.14.18

func (settings AskHubAdvisorSettings) MarshalJSON() ([]byte, error)

func (*AskHubAdvisorSettings) UnmarshalJSON added in v0.8.0

func (settings *AskHubAdvisorSettings) UnmarshalJSON(bytes []byte) error

func (AskHubAdvisorSettings) Validate added in v0.8.0

func (settings AskHubAdvisorSettings) Validate() ([]string, error)

Implements ActionSettings

type AskHubAdvisorSettingsCore added in v0.8.0

type AskHubAdvisorSettingsCore struct {
	QuerySource       AdvisorQuerySourceEnum `json:"querysource" displayname:"Query source" doc-key:"askhubadvisor.querysource"`
	QueryList         []WeightedQuery        `json:"querylist" displayname:"List of queries" doc-key:"askhubadvisor.querylist"`
	Lang              language               `json:"lang" displayname:"Query language" doc-key:"askhubadvisor.lang"`
	FollowupDepth     uint                   `json:"maxfollowup" displayname:"Max depth of followup queries performed" doc-key:"askhubadvisor.maxfollowup"`
	FileName          string                 `json:"file" displayname:"File with one query per line" doc-key:"askhubadvisor.file" displayelement:"file"`
	App               string                 `json:"app" displayname:"App name (optional)" doc-key:"askhubadvisor.app"`
	SaveImages        bool                   `json:"saveimages" displayname:"Save images" doc-key:"askhubadvisor.saveimages"`
	SaveImageFile     synced.Template        `json:"saveimagefile" displayname:"File name (without suffix)" doc-key:"askhubadvisor.saveimagefile" displayelement:"savefile"`
	ThinkTimeSettings ThinkTimeSettings      `json:"thinktime,omitempty" displayname:"Think time settings" doc-key:"askhubadvisor.thinktime"`
	FollowupTypes     []followupType         `json:"followuptypes,omitempty" displayname:"Followup query types" doc-key:"askhubadvisor.followuptypes"`
}

AskHubAdvisor-action settings

type BookMarkSettings added in v0.5.0

type BookMarkSettings struct {
	Title synced.Template `json:"title" displayname:"Bookmark title" doc-key:"bookmark.title"`
	ID    string          `json:"id" displayname:"Bookmark ID" doc-key:"bookmark.id" appstructure:"active:bookmark"`
}

type BookmarkDeletionModeEnum

type BookmarkDeletionModeEnum int

BookmarkDeletionModeEnum defines what bookmarks to remove

const (
	// SingleBookmark delete specified bookmark
	SingleBookmark BookmarkDeletionModeEnum = iota
	// MatchingBookmarks delete all bookmarks in app
	MatchingBookmarks
	// AllBookmarks delete all bookmarks in app
	AllBookmarks
)

func (BookmarkDeletionModeEnum) GetEnumMap

func (value BookmarkDeletionModeEnum) GetEnumMap() *enummap.EnumMap

func (BookmarkDeletionModeEnum) MarshalJSON

func (value BookmarkDeletionModeEnum) MarshalJSON() ([]byte, error)

MarshalJSON marshal BookmarkDeletionModeEnum type

func (*BookmarkDeletionModeEnum) UnmarshalJSON

func (value *BookmarkDeletionModeEnum) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal BookmarkDeletionModeEnum

type ChangeSheetSettings

type ChangeSheetSettings struct {
	ID string `json:"id" displayname:"Sheet ID" doc-key:"changesheet.id" appstructure:"active:sheet"`
}

ChangeSheetSettings settings for change sheet action

func (ChangeSheetSettings) AffectsAppObjectsAction added in v0.5.2

func (settings ChangeSheetSettings) AffectsAppObjectsAction(structure appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)

AffectsAppObjectsAction implements AffectsAppObjectsAction interface

func (ChangeSheetSettings) Execute

func (settings ChangeSheetSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute change sheet action

func (ChangeSheetSettings) Validate

func (settings ChangeSheetSettings) Validate() ([]string, error)

Validate change sheet action

type ChangeStreamModeEnum added in v0.17.0

type ChangeStreamModeEnum int
const (
	ChangeStreamModeName ChangeStreamModeEnum = iota
	ChangestreamModeID
)

func (ChangeStreamModeEnum) GetEnumMap added in v0.17.0

func (mode ChangeStreamModeEnum) GetEnumMap() *enummap.EnumMap

GetEnumMap for change stream mode

func (ChangeStreamModeEnum) MarshalJSON added in v0.17.0

func (mode ChangeStreamModeEnum) MarshalJSON() ([]byte, error)

MarshalJSON marshal ChangeStreamModeEnum

func (ChangeStreamModeEnum) String added in v0.17.0

func (mode ChangeStreamModeEnum) String() string

String implements stringer interface

func (*ChangeStreamModeEnum) UnmarshalJSON added in v0.17.0

func (mode *ChangeStreamModeEnum) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal ChangeStreamModeEnum

type ChangestreamSettings added in v0.17.0

type ChangestreamSettings struct {
	Mode   ChangeStreamModeEnum `json:"mode" displayname:"Mode" doc-key:"changestream.mode"`
	Stream string               `json:"stream" displayname:"Stream" doc-key:"changestream.stream"`
}

ChangestreamSettings Changestream reads in apps from selected stream

func (ChangestreamSettings) Execute added in v0.17.0

func (settings ChangestreamSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute ChangestreamSettings action (Implements ActionSettings interface)

func (ChangestreamSettings) Validate added in v0.17.0

func (settings ChangestreamSettings) Validate() ([]string, error)

Validate ChangestreamSettings action (Implements ActionSettings interface)

type ClearAllSettings

type ClearAllSettings struct{}

ClearAllSettings clear all selections action

func (ClearAllSettings) Execute

func (settings ClearAllSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute ClearAll action (Implements ActionSettings interface)

func (ClearAllSettings) Validate

func (settings ClearAllSettings) Validate() ([]string, error)

Validate ClearAll action (Implements ActionSettings interface)

type ClearFieldSettings added in v0.8.0

type ClearFieldSettings struct {
	Name string `json:"name" displayname:"name" doc-key:"clearfield.name"` // TODO add appstructure:"fields:name" when supported by GUI
}

ClearFieldSettings clear all selections in field

func (ClearFieldSettings) Execute added in v0.8.0

func (settings ClearFieldSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute ClearField action

func (ClearFieldSettings) Validate added in v0.8.0

func (settings ClearFieldSettings) Validate() ([]string, error)

Validate ClearField action settings

type ClickActionButtonSettings added in v0.5.8

type ClickActionButtonSettings struct {
	// ID object id
	ID string `json:"id" appstructure:"active:action-button" displayname:"Button ID" doc-key:"clickactionbutton.id"`
}

ClickActionButtonSettings implements the ActionSettings and ContainerAction interfaces. Executing this action replicates the behaviour of clicking an "action-button" in Sense.

func (ClickActionButtonSettings) Execute added in v0.5.8

func (settings ClickActionButtonSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute button-actions contained by sense action-button

func (ClickActionButtonSettings) IsContainerAction added in v0.5.8

func (settings ClickActionButtonSettings) IsContainerAction()

IsContainerAction implements ContainerAction interface and sets container action logging to original action entry

func (ClickActionButtonSettings) Validate added in v0.5.8

func (settings ClickActionButtonSettings) Validate() ([]string, error)

Validate filter pane select action

type ContainerAction

type ContainerAction interface {
	IsContainerAction()
}

ContainerAction Implement this interface on action settings to mark an action as a container action containing other actions. A container action will not log result as a normal action, instead result will be logged as level=info, infotype: containeractionend Returns if action is to be considered a container action. ContainerAction can't be used in conjunction with StartActionOverrider interface

type ContainerTabMode added in v0.6.10

type ContainerTabMode int
const (
	ContainerTabModeObjectID ContainerTabMode = iota
	ContainerTabModeRandom
	ContainerTabModeIndex
)

ContainerTabMode enum

func (ContainerTabMode) GetEnumMap added in v0.6.10

func (mode ContainerTabMode) GetEnumMap() *enummap.EnumMap

func (ContainerTabMode) MarshalJSON added in v0.6.10

func (mode ContainerTabMode) MarshalJSON() ([]byte, error)

MarshalJSON marshal container tab mode

func (ContainerTabMode) String added in v0.6.10

func (mode ContainerTabMode) String() string

String representation of ContainerTabMode

func (*ContainerTabMode) UnmarshalJSON added in v0.6.10

func (mode *ContainerTabMode) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal container tab mode

type ContainerTabSettings added in v0.6.10

type ContainerTabSettings struct {
	Mode        ContainerTabMode `json:"mode" displayname:"Mode" doc-key:"containertab.mode"`
	ContainerID string           `json:"containerid" displayname:"Container ID" appstructure:"active:container" doc-key:"containertab.containerid"`
	ObjectID    string           `json:"objectid,omitempty" appstructure:"children:containerid" displayname:"Object ID" doc-key:"containertab.objectid"`
	Index       int              `json:"index,omitempty" displayname:"Index" doc-key:"containertab.index"`
}

ContainerTabSettings switches active object in container

func (ContainerTabSettings) Execute added in v0.6.10

func (settings ContainerTabSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute ContainerTabSettings action (Implements ActionSettings interface)

func (ContainerTabSettings) Validate added in v0.6.10

func (settings ContainerTabSettings) Validate() ([]string, error)

Validate ContainerTabSettings action (Implements ActionSettings interface)

type CreateBookmarkSettings

type CreateBookmarkSettings struct {
	BookMarkSettings
	Description     string `json:"description" displayname:"Bookmark description" doc-key:"createbookmark.description"`
	NoSheetLocation bool   `json:"nosheet" displayname:"Exclude sheet location" doc-key:"createbookmark.nosheet"`
	SaveLayout      bool   `json:"savelayout" displayname:"Save layout" doc-key:"createbookmark.savelayout"`
}

CreateBookmarkSettings create bookmark settings

func (CreateBookmarkSettings) AffectsAppObjectsAction added in v0.5.2

func (settings CreateBookmarkSettings) AffectsAppObjectsAction(structure appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)

AffectsAppObjectsAction implements AffectsAppObjectsAction interface

func (CreateBookmarkSettings) Execute

func (settings CreateBookmarkSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute CreateBookmarkSettings action (Implements ActionSettings interface)

func (CreateBookmarkSettings) Validate

func (settings CreateBookmarkSettings) Validate() ([]string, error)

Validate CreateBookmarkSettings action (Implements ActionSettings interface)

type CreateSheetSettings

type CreateSheetSettings struct {
	ID          string `json:"id" displayname:"Sheet ID" doc-key:"createsheet.id"`
	Title       string `json:"title" displayname:"Sheet title" doc-key:"createsheet.title"`
	Description string `json:"description" displayname:"Sheet description" doc-key:"createsheet.description"`
}

CreateSheetSettings settings for creating a sheet

func (CreateSheetSettings) AffectsAppObjectsAction added in v0.5.2

func (settings CreateSheetSettings) AffectsAppObjectsAction(structure appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)

AffectsAppObjectsAction implements AffectsAppObjectsAction interface

func (CreateSheetSettings) Execute

func (settings CreateSheetSettings) Execute(sessionState *session.State,
	actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute implements ActionSettings interface

func (CreateSheetSettings) Validate

func (settings CreateSheetSettings) Validate() ([]string, error)

Validate implements ActionSettings interface

type DefaultValuesForGUI added in v0.14.18

type DefaultValuesForGUI interface {
	DefaultValuesForGUI() ActionSettings
}

type DeleteBookmarkSettings

type DeleteBookmarkSettings struct {
	BookMarkSettings
	DeletionMode BookmarkDeletionModeEnum `json:"mode" displayname:"Deletion mode" doc-key:"deletebookmark.mode"`
}

DeleteBookmarkSettings create bookmark settings

func (DeleteBookmarkSettings) AffectsAppObjectsAction added in v0.5.2

func (settings DeleteBookmarkSettings) AffectsAppObjectsAction(structure appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)

AffectsAppObjectsAction implements AffectsAppObjectsAction interface

func (DeleteBookmarkSettings) Execute

func (settings DeleteBookmarkSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute DeleteBookmarkSettings action (Implements ActionSettings interface)

func (DeleteBookmarkSettings) Validate

func (settings DeleteBookmarkSettings) Validate() ([]string, error)

Validate DeleteBookmarkSettings action (Implements ActionSettings interface)

type DeleteOdagSettings

type DeleteOdagSettings struct {
	Name synced.Template `json:"linkname" displayname:"ODAG link name" doc-key:"deleteodag.linkname"`
}

DeleteOdagSettings settings for DeleteOdag

func (DeleteOdagSettings) Execute

func (settings DeleteOdagSettings) Execute(sessionState *session.State, actionState *action.State,
	connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute DeleteOdagSettings action (Implements ActionSettings interface)

func (DeleteOdagSettings) Validate

func (settings DeleteOdagSettings) Validate() ([]string, error)

Validate DeleteOdagSettings action (Implements ActionSettings interface)

type DeleteSheetSettings

type DeleteSheetSettings struct {
	DeletionMode SheetDeletionModeEnum `json:"mode" displayname:"Deletion mode" doc-key:"deletesheet.mode"`
	Title        string                `json:"title" displayname:"Sheet title" doc-key:"deletesheet.title"`
	ID           string                `json:"id" displayname:"Sheet ID" doc-key:"deletesheet.id" appstructure:"active:sheet"`
}

DeleteBookmarkSettings create bookmark settings

func (DeleteSheetSettings) AffectsAppObjectsAction added in v0.5.2

func (settings DeleteSheetSettings) AffectsAppObjectsAction(structure appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)

AffectsAppObjectsAction implements AffectsAppObjectsAction interface

func (DeleteSheetSettings) Execute

func (settings DeleteSheetSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute DeleteSheetSettings action (Implements ActionSettings interface)

func (DeleteSheetSettings) Validate

func (settings DeleteSheetSettings) Validate() ([]string, error)

Validate DeleteSheetSettings action (Implements ActionSettings interface)

type DisconnectAppSettings

type DisconnectAppSettings struct{}

DisconnectAppSettings

func (DisconnectAppSettings) Execute

func (settings DisconnectAppSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute

func (DisconnectAppSettings) Validate

func (settings DisconnectAppSettings) Validate() ([]string, error)

Validate

type DisconnectEnvironment added in v0.9.0

type DisconnectEnvironment struct{}

DisconnectEnvironment use after actions in an environment and before connecting to a different environment, The action will disconnect open websockets, including towards sense and event listeners, and thus doesn't need to be combined with a disconnectapp action.

func (*DisconnectEnvironment) AppStructureAction added in v0.9.0

func (settings *DisconnectEnvironment) AppStructureAction() (*AppStructureInfo, []Action)

AppStructureAction Implements AppStructureAction interface. It returns if this action should be included when doing an "get app structure" from script, IsAppAction tells the scenario to insert a "getappstructure" action after that action using data from sessionState.CurrentApp. A list of sub actions to be evaluated can also be included. AppStructureAction returns if this action should be included when getting app structure and any additional sub actions which should also be included.

func (DisconnectEnvironment) Execute added in v0.9.0

func (settings DisconnectEnvironment) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute DisconnectEnvironment action (Implements ActionSettings interface)

func (DisconnectEnvironment) Validate added in v0.9.0

func (settings DisconnectEnvironment) Validate() ([]string, error)

Validate DisconnectEnvironment action (Implements ActionSettings interface)

type DoSaveSettings added in v0.6.13

type DoSaveSettings struct{}

DoSaveSettings issues a DoSave command to engine to save the currently opened app

func (DoSaveSettings) Execute added in v0.6.13

func (settings DoSaveSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute DoSaveSettings action (Implements ActionSettings interface)

func (DoSaveSettings) Validate added in v0.6.13

func (settings DoSaveSettings) Validate() ([]string, error)

Validate DoSaveSettings action (Implements ActionSettings interface)

type DuplicateSheetSettings

type DuplicateSheetSettings struct {
	// ID of object to clone
	ID string `json:"id" displayname:"Sheet ID" doc-key:"duplicatesheet.id" appstructure:"active:sheet"`
	// ChangeSheet after cloning
	ChangeSheet bool `json:"changesheet" displayname:"Change to sheet after creation" doc-key:"duplicatesheet.changesheet"`
	// Save object changes after clone
	Save bool `json:"save" displayname:"Save sheet" doc-key:"duplicatesheet.save"`
	// CloneID
	CloneID string `json:"cloneid" displayname:"Cloned sheet ID" doc-key:"duplicatesheet.cloneid"`
}

DuplicateSheetSettings clone object settings

func (DuplicateSheetSettings) AffectsAppObjectsAction added in v0.5.2

func (settings DuplicateSheetSettings) AffectsAppObjectsAction(structure appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)

AffectsAppObjectsAction implements AffectsAppObjectsAction interface

func (DuplicateSheetSettings) Execute

func (settings DuplicateSheetSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute clone object

func (DuplicateSheetSettings) Validate

func (settings DuplicateSheetSettings) Validate() ([]string, error)

Validate clone object settings

type Enum

type Enum interface {
	GetEnumMap() *enummap.EnumMap
}

Enum interface should be implemented on types used fields of action struct if: 1. Type is derived from one integer type. Example: `type MyType int` 2. Type has natural string representations for its values. Typically you should consider implementing Enum when declaring global constants of a user defined integer type.

type GenerateOdagSettings

type GenerateOdagSettings struct {
	Name synced.Template `json:"linkname" displayname:"ODAG link name" doc-key:"generateodag.linkname"`
}

GenerateOdagSettings settings for GenerateOdag

func (GenerateOdagSettings) Execute

func (settings GenerateOdagSettings) Execute(sessionState *session.State, actionState *action.State,
	connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute GenerateOdagSettings action (Implements ActionSettings interface)

func (GenerateOdagSettings) Validate

func (settings GenerateOdagSettings) Validate() ([]string, error)

Validate GenerateOdagSettings action (Implements ActionSettings interface)

type GetscriptSettings added in v0.16.2

type GetscriptSettings struct {
	SaveLog bool `json:"savelog" doc-key:"getscript.savelog"`
}

GetscriptSettings Getscript gets load script

func (GetscriptSettings) Execute added in v0.16.2

func (settings GetscriptSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute GetscriptSettings action (Implements ActionSettings interface)

func (GetscriptSettings) Validate added in v0.16.2

func (settings GetscriptSettings) Validate() ([]string, error)

Validate GetscriptSettings action (Implements ActionSettings interface)

type HubAdvisorOption added in v0.8.0

type HubAdvisorOption func(*hubAdvisorQuery)

func App added in v0.8.0

func App(app *app) HubAdvisorOption

func ConversationContext added in v0.8.0

func ConversationContext(convContext conversationContext) HubAdvisorOption

func Language added in v0.8.0

func Language(lang language) HubAdvisorOption

func SelectedRecommendation added in v0.8.0

func SelectedRecommendation(rec *recommendation) HubAdvisorOption

type IteratedSettings

type IteratedSettings struct {
	Iterations int      `json:"iterations" displayname:"Iterations" doc-key:"iterated.iterations"`
	Actions    []Action `json:"actions" displayname:"Actions" doc-key:"iterated.actions"`
}

IteratedSettings parallel action settings

func (IteratedSettings) AppStructureAction added in v0.5.2

func (action IteratedSettings) AppStructureAction() (*AppStructureInfo, []Action)

AppStructureAction implements AppStructureAction interface

func (IteratedSettings) Execute

func (action IteratedSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute iterated actions

func (IteratedSettings) IsContainerAction

func (action IteratedSettings) IsContainerAction()

IsContainerAction implements ContainerAction interface and sets container action logging to original action entry

func (IteratedSettings) Validate

func (action IteratedSettings) Validate() ([]string, error)

Validate iterated actions

type ListBoxSelectSettings added in v0.5.7

type ListBoxSelectSettings struct {
	// ID object id
	ID string `json:"id" appstructure:"selectable:listbox" displayname:"Listbox ID" doc-key:"listboxselect.id"`
	// Type selection type
	Type ListBoxSelectType `json:"type" displayname:"Selection type" doc-key:"listboxselect.type"`
	// Accept true - confirm selection. false - abort selection
	Accept bool `json:"accept" displayname:"Accept selection" doc-key:"listboxselect.accept"`
	// Wrap selection with Begin / End selection requests
	Wrap bool `json:"wrap" displayname:"Wrap selection" doc-key:"listboxselect.wrap"`
}

ListBoxSelectSettings selection settings

func (ListBoxSelectSettings) Execute added in v0.5.7

func (settings ListBoxSelectSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute filter pane select action

func (ListBoxSelectSettings) Validate added in v0.5.7

func (settings ListBoxSelectSettings) Validate() ([]string, error)

Validate filter pane select action

type ListBoxSelectType added in v0.5.7

type ListBoxSelectType int

ListBoxSelectType type of selection

const (
	// All select all
	All ListBoxSelectType = iota
	// Possible select possible
	Possible
	// Alternative select alternative
	Alternative
	// Excluded select excluded
	Excluded
)

func (ListBoxSelectType) GetEnumMap added in v0.5.7

func (ListBoxSelectType) GetEnumMap() *enummap.EnumMap

func (ListBoxSelectType) MarshalJSON added in v0.5.7

func (value ListBoxSelectType) MarshalJSON() ([]byte, error)

MarshalJSON marshal filter pane selection type

func (ListBoxSelectType) String added in v0.5.7

func (value ListBoxSelectType) String() string

String representation of ListBoxSelectType

func (*ListBoxSelectType) UnmarshalJSON added in v0.5.7

func (value *ListBoxSelectType) UnmarshalJSON(json []byte) error

UnmarshalJSON unmarshal filter pane selection type

type ObjectSearchSettings added in v0.15.3

type ObjectSearchSettings struct {
	ID           string             `json:"id" doc-key:"objectsearch.id" displayname:"ID"`
	SearchTerms  []string           `json:"searchterms" doc-key:"objectsearch.searchterms" displayname:"Search terms"`
	SearchType   ObjectSearchType   `json:"type" doc-key:"objectsearch.type" displayname:"Search type"`
	SearchSource ObjectSearchSource `json:"source" doc-key:"objectsearch.source" displayname:"Search source"`
	ErrorOnEmpty bool               `json:"erroronempty" doc-key:"objectsearch.erroronempty" displayname:"Throw error if no search results"`
	Filename     helpers.RowFile    `json:"searchtermsfile" doc-key:"objectsearch.searchtermsfile" displayname:"Search terms filename" displayelement:"file"`
}

ObjectSearchSettings ObjectSearch search listbox, field or master dimension

func (ObjectSearchSettings) Execute added in v0.15.3

func (settings ObjectSearchSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute ObjectSearchSettings action (Implements ActionSettings interface)

func (ObjectSearchSettings) Validate added in v0.15.3

func (settings ObjectSearchSettings) Validate() ([]string, error)

Validate ObjectSearchSettings action (Implements ActionSettings interface)

type ObjectSearchSource added in v0.15.3

type ObjectSearchSource int
const (
	ObjectSearchSourceFromList ObjectSearchSource = iota
	ObjectSearchSourceFromFile
)

ObjectSearchSource

func (ObjectSearchSource) GetEnumMap added in v0.15.4

func (value ObjectSearchSource) GetEnumMap() *enummap.EnumMap

GetEnumMap returns objectsearch source enum map to GUI

func (ObjectSearchSource) MarshalJSON added in v0.15.3

func (value ObjectSearchSource) MarshalJSON() ([]byte, error)

MarshalJSON marshal objectsearch source

func (ObjectSearchSource) String added in v0.15.3

func (value ObjectSearchSource) String() string

String implements Stringer interface

func (*ObjectSearchSource) UnmarshalJSON added in v0.15.3

func (value *ObjectSearchSource) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal objectsearch source

type ObjectSearchType added in v0.15.3

type ObjectSearchType int
const (
	ObjectSearchTypeListbox ObjectSearchType = iota
	ObjectSearchTypeField
	ObjectSearchTypeDimension
)

ObjectSearchType

func (ObjectSearchType) GetEnumMap added in v0.15.3

func (value ObjectSearchType) GetEnumMap() *enummap.EnumMap

GetEnumMap returns objectsearch type enum map to GUI

func (ObjectSearchType) MarshalJSON added in v0.15.3

func (value ObjectSearchType) MarshalJSON() ([]byte, error)

MarshalJSON marshal objectsearch type

func (ObjectSearchType) String added in v0.15.3

func (value ObjectSearchType) String() string

String representation of ObjectSearchType

func (*ObjectSearchType) UnmarshalJSON added in v0.15.3

func (value *ObjectSearchType) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal objectsearch type

type OdagEndpointConfiguration

type OdagEndpointConfiguration struct {
	Main            string
	Requests        string
	EnabledEndpoint string
}

type OpenAppSettings

type OpenAppSettings struct {
	session.AppSelection
	OpenAppSettingsCore
}

OpenAppSettings app and server settings

func (OpenAppSettings) AffectsAppObjectsAction added in v0.5.2

func (openApp OpenAppSettings) AffectsAppObjectsAction(structure appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)

AffectsAppObjectsAction implements AffectsAppObjectsAction interface

func (OpenAppSettings) AppStructureAction added in v0.5.2

func (openApp OpenAppSettings) AppStructureAction() (*AppStructureInfo, []Action)

AppStructureAction implements AppStructureAction interface

func (OpenAppSettings) Execute

func (openApp OpenAppSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, setOpenStart func())

Execute open app

func (OpenAppSettings) GetConnectWsAction

func (openApp OpenAppSettings) GetConnectWsAction(wsLabel string, connectFunc func(bool) (string, error)) Action

func (*OpenAppSettings) UnmarshalJSON

func (openApp *OpenAppSettings) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshals open app settings from JSON

func (OpenAppSettings) Validate

func (openApp OpenAppSettings) Validate() ([]string, error)

Validate open app scenario item

type OpenAppSettingsCore added in v0.8.0

type OpenAppSettingsCore struct {
	ExternalHost  string `json:"externalhost" displayname:"External hostname" doc-key:"openapp.externalhost"`
	UniqueSession bool   `json:"unique" displayname:"Make session unique" doc-key:"openapp.unique"`
}

type OpenHubSettings

type OpenHubSettings struct{}

OpenHubSettings settings for OpenHub

func (OpenHubSettings) AppStructureAction added in v0.5.2

func (openHub OpenHubSettings) AppStructureAction() (*AppStructureInfo, []Action)

AppStructureAction implements AppStructureAction interface

func (OpenHubSettings) Execute

func (openHub OpenHubSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, setHubStart func())

Execute execute the action

func (OpenHubSettings) Validate

func (openHub OpenHubSettings) Validate() ([]string, error)

Validate open app scenario item

type ProductVersionSettings

type ProductVersionSettings struct {
	// Log product version to log file as InfoType ProductVersion
	Log bool `json:"log" displayname:"Log product version" doc-key:"productversion.log"`
}

ProductVersionSettings settings for ProductVersion action

func (ProductVersionSettings) Execute

func (settings ProductVersionSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute ProductVersion action (Implements ActionSettings interface)

func (ProductVersionSettings) Validate

func (settings ProductVersionSettings) Validate() ([]string, error)

Validate ProductVersion action (Implements ActionSettings interface)

type PublishBookmarkSettings added in v0.5.0

type PublishBookmarkSettings struct {
	BookMarkSettings
}

func (PublishBookmarkSettings) Execute added in v0.5.0

func (settings PublishBookmarkSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute CreateBookmarkSettings action (Implements ActionSettings interface)

func (PublishBookmarkSettings) Validate added in v0.5.0

func (settings PublishBookmarkSettings) Validate() ([]string, error)

Validate PublishBookmarkSettings action (Implements ActionSettings interface)

type PublishSheetMode

type PublishSheetMode int

PublishSheetMode specifies the mode for publishing the sheets

const (
	// AllSheets publishes all of the sheets in the opened app
	AllSheets PublishSheetMode = iota
	// SheetIDs publishes sheets specified in the sheetIds array
	SheetIDs
)

func (PublishSheetMode) GetEnumMap

func (value PublishSheetMode) GetEnumMap() *enummap.EnumMap

func (PublishSheetMode) MarshalJSON

func (value PublishSheetMode) MarshalJSON() ([]byte, error)

MarshalJSON marshal PublishSheetMode type

func (*PublishSheetMode) UnmarshalJSON

func (value *PublishSheetMode) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal PublishSheetMode

type PublishSheetSettings

type PublishSheetSettings struct {
	Mode             PublishSheetMode `json:"mode" displayname:"Publish mode" doc-key:"publishsheet.mode"`
	SheetIDs         []string         `json:"sheetIds" displayname:"Sheet IDs" doc-key:"publishsheet.sheetIds"`
	IncludePublished bool             `json:"includePublished" displayname:"Try to publish already published sheets" doc-key:"publishsheet.includePublished"`
}

PublishSheetSettings contains details for publishing sheet(s)

func (PublishSheetSettings) Execute

func (publishSheetSettings PublishSheetSettings) Execute(sessionState *session.State,
	actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute performs the publish sheet action

func (PublishSheetSettings) Validate

func (publishSheetSettings PublishSheetSettings) Validate() ([]string, error)

Validate checks the settings of the publish sheet action

type RandomActionSettings

type RandomActionSettings struct {
	RandomActionSettingsCore
	// contains filtered or unexported fields
}

RandomActionSettings RandomAction settings

func (RandomActionSettings) Execute

func (settings RandomActionSettings) Execute(sessionState *session.State, state *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute random action/-s. Implements ActionSetting interface

func (RandomActionSettings) IsContainerAction

func (settings RandomActionSettings) IsContainerAction()

IsContainerAction implements ContainerAction interface and sets container action logging to original action entry

func (*RandomActionSettings) UnmarshalJSON

func (settings *RandomActionSettings) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal ActionType

func (RandomActionSettings) Validate

func (settings RandomActionSettings) Validate() ([]string, error)

Validate random action settings. Implements ActionSetting interface

type RandomActionSettingsCore

type RandomActionSettingsCore struct {
	// List of the different actions and their weights
	ActionTypes []ActionTypeSettings `json:"actions" displayname:"Actions" doc-key:"randomaction.actions"`
	// ThinkTime in between random actions
	InterThinkTimeSettings *ThinkTimeSettings `json:"thinktimesettings,omitempty" doc-key:"randomaction.thinktimesettings"`
	// Number of random actions to execute
	Iterations int `json:"iterations" displayname:"Iterations" doc-key:"randomaction.iterations"`
}

RandomActionSettingsCore RandomAction settings

type ReloadModeEnum

type ReloadModeEnum int

ReloadModeEnum determines error handling mode

const (
	// 0: for default mode.
	DefaultReloadMode ReloadModeEnum = iota
	// 1: for ABEND; the reload of the script ends if an error occurs.
	Abend
	// 2: for ignore; the reload of the script continues even if an error is detected in the script.
	Ignore
)

func (ReloadModeEnum) GetEnumMap

func (value ReloadModeEnum) GetEnumMap() *enummap.EnumMap

func (ReloadModeEnum) MarshalJSON

func (value ReloadModeEnum) MarshalJSON() ([]byte, error)

MarshalJSON marshal ReloadModeEnum type

func (*ReloadModeEnum) UnmarshalJSON

func (value *ReloadModeEnum) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal ReloadModeEnum

type ReloadSettings

type ReloadSettings struct {
	ReloadMode ReloadModeEnum `json:"mode" displayname:"Reload mode" doc-key:"reload.mode"`
	Partial    bool           `json:"partial" displayname:"Partial reload" doc-key:"reload.partial"`
	SaveLog    bool           `json:"log" displayname:"Save log" doc-key:"reload.log"`
	NoSave     bool           `json:"nosave" displayname:"Disable app save" doc-key:"reload.nosave"`
}

ReloadSettings loop through sheets in an app

func (*ReloadSettings) DoReload added in v0.18.0

func (settings *ReloadSettings) DoReload(ctx context.Context, sessionState *session.State, actionState *action.State, uplink *enigmahandlers.SenseUplink, doc *enigma.Doc) error

func (ReloadSettings) Execute

func (settings ReloadSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute implements ActionSettings interface

func (ReloadSettings) Validate

func (settings ReloadSettings) Validate() ([]string, error)

Validate implements ActionSettings interface

type SearchTextSource added in v0.14.12

type SearchTextSource int
const (
	SearchTextSourceList SearchTextSource = iota
	SearchTextSourceFile
)

func (SearchTextSource) GetEnumMap added in v0.14.12

func (SearchTextSource) GetEnumMap() *enummap.EnumMap

func (SearchTextSource) MarshalJSON added in v0.14.12

func (value SearchTextSource) MarshalJSON() ([]byte, error)

func (*SearchTextSource) UnmarshalJSON added in v0.14.12

func (value *SearchTextSource) UnmarshalJSON(arg []byte) error

type SelectionSettings

type SelectionSettings struct {
	// ID object id
	ID string `json:"id" displayname:"Object ID" doc-key:"select.id" appstructure:"selectable:!sheet"`
	// Type selection type
	Type SelectionType `json:"type" displayname:"Selection type" doc-key:"select.type"`
	// Accept true - confirm selection. false - abort selection
	Accept bool `json:"accept" displayname:"Accept selection" doc-key:"select.accept"`
	// WrapSelections
	WrapSelections bool `json:"wrap" displayname:"Wrap selections" doc-key:"select.wrap"`
	// Min minimum amount of values to select
	Min int `json:"min" displayname:"Minimum amount of values to select" doc-key:"select.min"`
	// Max maximum amount of values to select
	Max int `json:"max" displayname:"Maximum amount of values to select" doc-key:"select.max"`
	// Dimension in which dimension to select (defaults to 0)
	Dimension int `json:"dim" displayname:"Dimension to select in" doc-key:"select.dim"`
	// Values element values to selection (using select type "values")
	Values []int `json:"values" displayname:"Element values to select" doc-key:"select.values"`
}

SelectionSettings selection settings

func (SelectionSettings) Execute

func (settings SelectionSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute select action

func (SelectionSettings) Validate

func (settings SelectionSettings) Validate() ([]string, error)

Validate select action

type SelectionType

type SelectionType int

SelectionType type of selection

const (
	// RandomFromAll random from all values
	RandomFromAll SelectionType = iota
	// RandomFromEnabled random from white values
	RandomFromEnabled
	// RandomFromExcluded random from grey values
	RandomFromExcluded
	// RandomDeselect random deselect from selected values
	RandomDeselect
	// Values select specific element values
	Values
)

func (SelectionType) GetEnumMap

func (value SelectionType) GetEnumMap() *enummap.EnumMap

GetEnumMap returns selection type enum map to GUI

func (SelectionType) IsExcludedOrDeselect

func (value SelectionType) IsExcludedOrDeselect() bool

IsExcludedOrDeselect true if type is RandomDeselect or RandomFromExcluded

func (SelectionType) MarshalJSON

func (value SelectionType) MarshalJSON() ([]byte, error)

MarshalJSON marshal selection type

func (SelectionType) String

func (value SelectionType) String() string

String representation of SelectionType

func (*SelectionType) UnmarshalJSON

func (value *SelectionType) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal selection type

type SetScriptSettings

type SetScriptSettings struct {
	Script string `json:"script" displayname:"Script" displayelement:"textarea" doc-key:"setscript.script"`
}

SetScriptSettings set script

func (SetScriptSettings) Execute

func (settings SetScriptSettings) Execute(sessionState *session.State,
	actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute implements ActionSettings interface

func (SetScriptSettings) Validate

func (settings SetScriptSettings) Validate() ([]string, error)

Validate implements ActionSettings interface

type SetScriptVarSettings added in v0.11.0

type SetScriptVarSettings struct {
	Name      string                          `json:"name" doc-key:"setscriptvar.name" displayname:"Name"`
	Type      session.SessionVariableTypeEnum `json:"type" doc-key:"setscriptvar.type" displayname:"Variable type"`
	Value     synced.Template                 `json:"value" doc-key:"setscriptvar.value" displayname:"Variable value"`
	Separator string                          `json:"sep" doc-key:"setscriptvar.sep" displayname:"Array separator"`
}

SetScriptVarSettings action creates/sets variables value

func (*SetScriptVarSettings) AppStructureAction added in v0.11.0

func (settings *SetScriptVarSettings) AppStructureAction() (*AppStructureInfo, []Action)

AppStructureAction Implements AppStructureAction interface. It returns if this action should be included when doing an "get app structure" from script, IsAppAction tells the scenario to insert a "getappstructure" action after that action using data from sessionState.CurrentApp. A list of Sub action to be evaluated can also be included AppStructureAction returns if this action should be included when getting app structure and any additional sub actions which should also be included

func (SetScriptVarSettings) Execute added in v0.11.0

func (settings SetScriptVarSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute SetScriptVarSettings action (Implements ActionSettings interface)

func (SetScriptVarSettings) Validate added in v0.11.0

func (settings SetScriptVarSettings) Validate() ([]string, error)

Validate SetScriptVarSettings action (Implements ActionSettings interface)

type SetSenseVariableSettings added in v0.11.0

type SetSenseVariableSettings struct {
	VariableName  string          `json:"name" displayname:"name of the variable" doc-key:"setsensevariable.name"`
	VariableValue synced.Template `json:"value" displayname:"value of the variable" doc-key:"setsensevariable.value"`
}

SetSenseVariableSettings

func (SetSenseVariableSettings) Execute added in v0.11.0

func (settings SetSenseVariableSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute SetSenseVariable action (Implements ActionSettings interface)

func (SetSenseVariableSettings) Validate added in v0.11.0

func (settings SetSenseVariableSettings) Validate() ([]string, error)

Validate SetSenseVariable action (Implements ActionSettings interface)

type SheetChangerSettings

type SheetChangerSettings struct{}

SheetChangerSettings loop through sheets in an app

func (SheetChangerSettings) Execute

func (settings SheetChangerSettings) Execute(sessionState *session.State,
	actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute implements ActionSettings interface

func (SheetChangerSettings) IsContainerAction

func (settings SheetChangerSettings) IsContainerAction()

IsContainerAction implements ContainerAction interface and sets container action logging to original action entry

func (SheetChangerSettings) Validate

func (settings SheetChangerSettings) Validate() ([]string, error)

Validate implements ActionSettings interface

type SheetDeletionModeEnum

type SheetDeletionModeEnum int

BookmarkDeletionModeEnum defines what bookmarks to remove

const (
	// SingleSheet delete specified sheet
	SingleSheet SheetDeletionModeEnum = iota
	// MatchingSheets delete sheets matching name
	MatchingSheets
	// AllUnpublished delete all unpublished sheets in app
	AllUnpublished
)

func (SheetDeletionModeEnum) GetEnumMap

func (value SheetDeletionModeEnum) GetEnumMap() *enummap.EnumMap

func (SheetDeletionModeEnum) MarshalJSON

func (value SheetDeletionModeEnum) MarshalJSON() ([]byte, error)

MarshalJSON marshal SheetDeletionModeEnum type

func (*SheetDeletionModeEnum) UnmarshalJSON

func (value *SheetDeletionModeEnum) UnmarshalJSON(arg []byte) error

UnmarshalJSON unmarshal SheetDeletionModeEnum

type SmartSearchSettings added in v0.14.12

type SmartSearchSettings struct {
	SmartSearchSettingsCore
}

func (SmartSearchSettings) DefaultValuesForGUI added in v0.14.18

func (SmartSearchSettings) DefaultValuesForGUI() ActionSettings

func (SmartSearchSettings) Execute added in v0.14.12

func (settings SmartSearchSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute implements ActionSettings interface

func (*SmartSearchSettings) IsContainerAction added in v0.14.12

func (settings *SmartSearchSettings) IsContainerAction()

func (SmartSearchSettings) MarshalJSON added in v0.14.18

func (settings SmartSearchSettings) MarshalJSON() ([]byte, error)

func (*SmartSearchSettings) UnmarshalJSON added in v0.14.12

func (settings *SmartSearchSettings) UnmarshalJSON(bytes []byte) error

func (SmartSearchSettings) Validate added in v0.14.12

func (settings SmartSearchSettings) Validate() ([]string, error)

Validate implements ActionSettings interface

type SmartSearchSettingsCore added in v0.14.12

type SmartSearchSettingsCore struct {
	SearchTextSource   SearchTextSource  `json:"searchtextsource" displayname:"Search Text Source" doc-key:"smartsearch.searchtextsource"`
	SearchTextList     []string          `json:"searchtextlist" displayname:"Search Text List" doc-key:"smartsearch.searchtextlist"`
	SearchTextFilePath string            `json:"searchtextfile" displayname:"Search Text File" doc-key:"smartsearch.searchtextfile"`
	PasteSearchText    bool              `json:"pastesearchtext" displayname:"Simulate Pasting Search Text" doc-key:"smartsearch.pastesearchtext"`
	MakeSelection      bool              `json:"makeselection" displayname:"Make selection from search result" doc-key:"smartsearch.makeselection"`
	SelectionThinkTime ThinkTimeSettings `json:"selectionthinktime,omitempty" displayname:"Think time before selection" doc-key:"smartsearch.selectionthinktime"`
}

type StreamsState added in v0.17.0

type StreamsState map[string]string

type SubscribeObjectsSettings added in v0.5.6

type SubscribeObjectsSettings struct {
	ClearCurrent bool     `json:"clear" displayname:"Clear" doc-key:"subscribeobjects.clear"`
	IDs          []string `json:"ids" displayname:"IDs" doc-key:"subscribeobjects.ids"` // todo add appstructure:"" when array is supported filling with all objects
}

func (SubscribeObjectsSettings) AffectsAppObjectsAction added in v0.5.6

func (settings SubscribeObjectsSettings) AffectsAppObjectsAction(structure appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)

AffectsAppObjectsAction implements AffectsAppObjectsAction interface, returns: * added *config.AppStructurePopulatedObjects - objects to be added to the selectable list by this action * removed []string - ids of objects that are removed (including any children) by this action * clearObjects bool - clears all objects except bookmarks and sheets

func (SubscribeObjectsSettings) Execute added in v0.5.6

func (settings SubscribeObjectsSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute implements ActionSettings interface

func (SubscribeObjectsSettings) Validate added in v0.5.6

func (settings SubscribeObjectsSettings) Validate() ([]string, error)

Validate implements ActionSettings interface

type ThinkTimeSettings

type ThinkTimeSettings struct {
	helpers.DistributionSettings
}

ThinkTimeSettings think time settings

func (ThinkTimeSettings) Execute

func (settings ThinkTimeSettings) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute simulated think time

func (ThinkTimeSettings) LogDetails

func (settings ThinkTimeSettings) LogDetails() string

LogDetails log think time settings

func (ThinkTimeSettings) Validate

func (settings ThinkTimeSettings) Validate() ([]string, error)

Validate think time settings

type TypedInfo added in v0.8.0

type TypedInfo struct {
	InfoType   string            `json:"infoType"`
	InfoValues []json.RawMessage `json:"infoValues"`
}

Messages used by hubAdvisorEndpont

type UnPublishBookmarkSettings added in v0.5.0

type UnPublishBookmarkSettings struct {
	BookMarkSettings
}

func (UnPublishBookmarkSettings) Execute added in v0.5.0

func (settings UnPublishBookmarkSettings) Execute(sessionState *session.State, actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute CreateBookmarkSettings action (Implements ActionSettings interface)

func (UnPublishBookmarkSettings) Validate added in v0.5.0

func (settings UnPublishBookmarkSettings) Validate() ([]string, error)

Validate PublishBookmarkSettings action (Implements ActionSettings interface)

type UnPublishSheetSettings

type UnPublishSheetSettings struct {
	Mode     PublishSheetMode `json:"mode" displayname:"Un-publish mode" doc-key:"unpublishsheet.mode"`
	SheetIDs []string         `json:"sheetIds" displayname:"Sheet IDs" doc-key:"unpublishsheet.sheetIds"`
}

UnPublishSheetSettings specifies un-publish sheet settings

func (UnPublishSheetSettings) Execute

func (unPublishSheetSettings UnPublishSheetSettings) Execute(sessionState *session.State,
	actionState *action.State, connectionSettings *connection.ConnectionSettings, label string, reset func())

Execute performs the un-publish sheet action

func (UnPublishSheetSettings) Validate

func (unPublishSheetSettings UnPublishSheetSettings) Validate() ([]string, error)

Validate checks the settings of the un-publish sheet action

type UnsubscribeObjects added in v0.5.6

type UnsubscribeObjects struct {
	// IDs to unsubscribe to
	IDs []string `json:"ids" displayname:"ID's'" doc-key:"unsubscribeobjects.ids"` // todo add appstructure:"" when array is supported filling with subscribed objects
	// Clear unsubscribes to all objects
	Clear bool `json:"clear" displayname:"Clear" doc-key:"unsubscribeobjects.clear"`
}

func (UnsubscribeObjects) AffectsAppObjectsAction added in v0.5.6

func (settings UnsubscribeObjects) AffectsAppObjectsAction(structure appstructure.AppStructure) ([]*appstructure.AppStructurePopulatedObjects, []string, bool)

AffectsAppObjectsAction implements AffectsAppObjectsAction interface, returns: * added *config.AppStructurePopulatedObjects - objects to be added to the selectable list by this action * removed []string - ids of objects that are removed (including any children) by this action * clearObjects bool - clears all objects except bookmarks and sheets

func (UnsubscribeObjects) Execute added in v0.5.6

func (settings UnsubscribeObjects) Execute(sessionState *session.State, actionState *action.State, connection *connection.ConnectionSettings, label string, reset func())

Execute implements ActionSettings interface

func (UnsubscribeObjects) Validate added in v0.5.6

func (settings UnsubscribeObjects) Validate() ([]string, error)

Validate implements ActionSettings interface

type WeightedQuery added in v0.8.0

type WeightedQuery struct {
	WeightedQueryCore
}

AskHubAdvisor-action settings

func ParseWeightedQueries added in v0.8.0

func ParseWeightedQueries(reader io.Reader) ([]WeightedQuery, error)

func WeightedQueryFromString added in v0.8.0

func WeightedQueryFromString(str string) (WeightedQuery, error)

WeightedQueryFromString creates a new WeightedQuery from string on format [WEIGHT;]QUERY, where weight is optional.

func (*WeightedQuery) UnmarshalJSON added in v0.8.0

func (wq *WeightedQuery) UnmarshalJSON(bytes []byte) error

UnmarshalJSON accepts plain string and WeightedQueryCore json object. Plain strings are assigned weight 1.

type WeightedQueryCore added in v0.8.0

type WeightedQueryCore struct {
	Weight int    `json:"weight" displayname:"Weight used for randomly picking this query" doc-key:"askhubadvisor.querylist.weight"`
	Query  string `json:"query" displayname:"A query sentence" doc-key:"askhubadvisor.querylist.query"`
}

AskHubAdvisor-action settings

Jump to

Keyboard shortcuts

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