Documentation ¶
Index ¶
- Constants
- Variables
- func CheckResponseStatus(request *RestRequest, statusCodes []int) error
- func DefaultClient(allowUntrusted bool, state *State) (*http.Client, error)
- func DefaultSetObjectDataAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, ...)
- func EngineCodeToString(errorCode int) string
- func GetAndAddObjectAsync(sessionState *State, actionState *action.State, name string)
- func GetAndAddObjectSync(sessionState *State, actionState *action.State, name string)
- func GetApproriateNrOfBins(hypercube *enigmahandlers.HyperCube) int
- func GetFullContinuousRange(hypercube *enigmahandlers.HyperCube) (enigma.Float64, enigma.Float64, error)
- func GetObjectLayout(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, ...) error
- func GetObjectProperties(sessionState *State, actionState *action.State, obj *enigmahandlers.Object) error
- func LogTrafficIn(resp *http.Response, trafficLogger MinimalTrafficLogger, ...)
- func LogTrafficOut(req *http.Request, doLogBody bool, trafficLogger MinimalTrafficLogger, ...)
- func RegisterCustomHeadersFunc(f CustomHeadersFunc) error
- func SetChildList(rawLayout json.RawMessage, obj *enigmahandlers.Object) error
- func SetChildren(rawLayout json.RawMessage, obj *enigmahandlers.Object) error
- func SetHyperCube(sessionState *State, actionState *action.State, rawLayout json.RawMessage, ...) error
- func SetListObject(rawLayout json.RawMessage, obj *enigmahandlers.Object, path helpers.DataPath) error
- func SetObjectData(sessionState *State, actionState *action.State, rawLayout json.RawMessage, ...) error
- func UpdateListObjectDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, ...)
- func UpdateObjectHyperCubeBinnedDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, ...)
- func UpdateObjectHyperCubeContinuousDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, ...)
- func UpdateObjectHyperCubeDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, ...)
- func UpdateObjectHyperCubeReducedDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, ...)
- func UpdateObjectHyperCubeStackDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, ...)
- func UpdateObjectHyperCubeTreeDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, ...)
- func WarnOrError(actionState *action.State, logEntry *logger.LogEntry, failOnError bool, ...)
- type AppSelection
- type AppSelectionCore
- type AppSelectionModeEnum
- type ArtifactEntry
- type ArtifactEntryCompareType
- type ArtifactKey
- type ArtifactList
- type ArtifactMap
- func (am *ArtifactMap) Append(resourceType string, entry *ArtifactEntry)
- func (am *ArtifactMap) ClearArtifactMap()
- func (am *ArtifactMap) Count(resourceType string) int
- func (am *ArtifactMap) DeleteApp(appGUID string)
- func (am *ArtifactMap) DeleteItem(resourceType, lookfor string, compareType ArtifactEntryCompareType)
- func (am *ArtifactMap) DeleteItemUsingID(id, resourceType string)
- func (am *ArtifactMap) DeleteItemUsingItemID(id, resourceType string)
- func (am *ArtifactMap) FillAppsUsingDocListEntries(docListEntries []*enigma.DocListEntry) error
- func (am *ArtifactMap) FillAppsUsingStream(stream structs.Stream) error
- func (am *ArtifactMap) FillArtifacts(item *ItemData) error
- func (am *ArtifactMap) First(resourceType string) *ArtifactEntry
- func (am *ArtifactMap) GetAllOfType(sessionState *State, resourcetype string) []ArtifactEntry
- func (am *ArtifactMap) GetAppID(appName string) (string, error)
- func (am *ArtifactMap) GetAppItemID(appName string) (string, error)
- func (am *ArtifactMap) GetRandomApp(sessionState *State) (ArtifactEntry, error)
- func (am *ArtifactMap) GetRoundRobin(sessionState *State) (ArtifactEntry, error)
- func (am *ArtifactMap) JSON() ([]byte, error)
- func (am *ArtifactMap) LogMap(entry *logger.LogEntry) error
- func (am *ArtifactMap) Lookup(resourcetype, lookup string, compareType ArtifactEntryCompareType) (*ArtifactEntry, error)
- func (am *ArtifactMap) LookupAppGUID(guid string) (*ArtifactEntry, error)
- func (am *ArtifactMap) LookupAppTitle(title string) (*ArtifactEntry, error)
- func (am *ArtifactMap) LookupItemID(resourcetype, itemID string) (*ArtifactEntry, error)
- func (am *ArtifactMap) Sort(resourceType string)
- type AutoChartHandler
- type AutoChartInstance
- func (instance *AutoChartInstance) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error)
- func (instance *AutoChartInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, ...)
- func (instance *AutoChartInstance) SetObjectDefData(objDefData []senseobjdef.Data)
- type CalcEvalConditionFailedError
- type ConnectionSettings
- type ContainerChild
- type ContainerChildItem
- type ContainerChildItemData
- type ContainerChildList
- type ContainerChildReference
- type ContainerExternal
- type ContainerHandler
- type ContainerHandlerInstance
- func (handler *ContainerHandlerInstance) ActiveChildReference() *ContainerChildReference
- func (handler *ContainerHandlerInstance) ChildWithID(id string) *ContainerChildReference
- func (handler *ContainerHandlerInstance) Children() []ContainerChildReference
- func (handler *ContainerHandlerInstance) FirstShowableChild() (*ContainerChildReference, bool)
- func (handler *ContainerHandlerInstance) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error)
- func (handler *ContainerHandlerInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, ...)
- func (handler *ContainerHandlerInstance) SwitchActiveChild(sessionState *State, actionState *action.State, child *ContainerChildReference) error
- func (handler *ContainerHandlerInstance) UpdateChildren(layout *ContainerLayout) error
- type ContainerLayout
- type CustomHeadersFunc
- type CustomHeadersInput
- type DefaultHandler
- type DefaultHandlerInstance
- type DefaultRandomizer
- type DuplicateKeyError
- type Event
- type EventMetricsLogger
- type FeatureAllocationError
- type FeatureFlagNotFoundError
- type Features
- func (features *Features) IsFeatureEnabled(feature string) (bool, error)
- func (features *Features) IsFeatureEnabledDefault(feature string, d bool) bool
- func (features *Features) UpdateCapabilities(rest *RestHandler, host string, actionState *action.State, ...)
- func (features *Features) UpdateFeatureMap(rest *RestHandler, host string, actionState *action.State, ...)
- type GenericObjectLayoutWithVisualization
- type HeaderJar
- type HyperCubeSection
- type IConnection
- type IDMap
- type ItemData
- type LayoutContainerChildItem
- type LayoutContainerChildItemData
- type LayoutContainerChildList
- type LayoutContainerHandler
- type LayoutContainerHandlerInstance
- func (handler *LayoutContainerHandlerInstance) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error)
- func (handler *LayoutContainerHandlerInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, ...)
- func (handler *LayoutContainerHandlerInstance) UpdateChildren(sessionState *State, actionState *action.State, layout *LayoutContainerLayout) error
- type LayoutContainerLayout
- type LayoutContainerLayoutObject
- type MasterObjectHandler
- type MasterObjectHandlerInstance
- type MinimalTrafficLogger
- type NoActiveDocError
- type NxValidationError
- type ObjectHandler
- type ObjectHandlerInstance
- type ReconnectInfo
- type ReconnectSettings
- type ReqOptions
- type RestHandler
- func (handler *RestHandler) DeleteAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) DeleteAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) DeleteAsyncWithHeaders(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) GetAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) GetAsyncOnce(url string, actionState *action.State, sessionState *State, ...) *RestRequest
- func (handler *RestHandler) GetAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) GetSync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) (*RestRequest, error)
- func (handler *RestHandler) GetSyncOnce(url string, actionState *action.State, sessionState *State, ...) (*RestRequest, error)
- func (handler *RestHandler) GetSyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) (*RestRequest, error)
- func (handler *RestHandler) GetWithHeadersAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) HeadAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) HeadAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) HeadSync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) (*RestRequest, error)
- func (handler *RestHandler) HeadSyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) (*RestRequest, error)
- func (handler *RestHandler) HeadWithHeadersAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) OptionsAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) OptionsAsyncWitCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) OptionsSync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) (*RestRequest, error)
- func (handler *RestHandler) OptionsSyncWitCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) (*RestRequest, error)
- func (handler *RestHandler) PatchAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) PatchAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) PatchWithHeadersAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) PostAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) PostAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) PostSync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) (*RestRequest, error)
- func (handler *RestHandler) PostSyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) (*RestRequest, error)
- func (handler *RestHandler) PostWithHeadersAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) PutAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) PutAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) PutWithHeadersAsync(url string, actionState *action.State, logEntry *logger.LogEntry, ...) *RestRequest
- func (handler *RestHandler) QueueRequest(actionState *action.State, failOnError bool, request *RestRequest, ...)
- func (handler *RestHandler) QueueRequestWithCallback(actionState *action.State, failOnError bool, request *RestRequest, ...)
- func (handler *RestHandler) SetClient(client *http.Client)
- type RestMethod
- type RestRequest
- type SessionVariableTypeEnum
- func (typ SessionVariableTypeEnum) GetEnumMap() *enummap.EnumMap
- func (typ SessionVariableTypeEnum) MarshalJSON() ([]byte, error)
- func (typ SessionVariableTypeEnum) String() string
- func (typ *SessionVariableTypeEnum) UnmarshalJSON(arg []byte) error
- func (typ *SessionVariableTypeEnum) Validate() error
- type SessionVariables
- type State
- func (state *State) AddCustomState(key string, value interface{})
- func (state *State) AwaitReconnect()
- func (state *State) BaseContext() context.Context
- func (state *State) Cancel()
- func (state *State) ClearObjectSubscriptions()
- func (state *State) ClearSubscribedObjects(IDs []string) error
- func (state *State) ContextChangeList() (context.Context, *enigma.ChangeLists)
- func (state *State) ContextWithTimeout(ctx context.Context) (context.Context, context.CancelFunc)
- func (state *State) CurrentSenseApp() (*senseobjects.App, error)
- func (state *State) CurrentSenseUplink() (*enigmahandlers.SenseUplink, error)
- func (state *State) DeRegisterEvent(handle int)
- func (state *State) DeRegisterEvents(handles []int)
- func (state *State) DeregisterAllEvents()
- func (state *State) Disconnect()
- func (state *State) EventWebsocket() *eventws.EventWebsocket
- func (state *State) GetCustomState(key string) (interface{}, bool)
- func (state *State) GetEventFunc(handle int) func(ctx context.Context, actionState *action.State) error
- func (state *State) GetObjectHandlerInstance(id, typ string) ObjectHandlerInstance
- func (state *State) GetReconnectError() error
- func (state *State) GetSessionVariable(localData interface{}) SessionVariables
- func (state *State) GetSheet(actionState *action.State, upLink *enigmahandlers.SenseUplink, id string) (*enigmahandlers.Object, *senseobjects.Sheet, error)
- func (state *State) GetSheetList(actionState *action.State, uplink *enigmahandlers.SenseUplink)
- func (state *State) IsAbortTriggered() bool
- func (state *State) IsSenseWebsocketDisconnected(err error) bool
- func (state *State) LogDebugf(format string, args ...interface{})
- func (state *State) LogDetail(level logger.LogLevel, msg, detail string)
- func (state *State) LogError(err error)
- func (state *State) LogInfo(infoType, msg string)
- func (state *State) LogTrafficMetric(responseTime int64, sent, received uint64, requestID int, ...)
- func (state *State) Once(key string, f func()) bool
- func (state *State) QueueRequest(f func(ctx context.Context) error, actionState *action.State, failOnError bool, ...)
- func (state *State) QueueRequestRaw(f func(ctx context.Context) (json.RawMessage, error), ...)
- func (state *State) QueueRequestWithCallback(f func(ctx context.Context) error, actionState *action.State, failOnError bool, ...)
- func (state *State) Randomizer() helpers.Randomizer
- func (state *State) ReOpenDoc(actionState *action.State, upLink *enigmahandlers.SenseUplink) (*enigma.Doc, error)
- func (state *State) Reconnect() error
- func (state *State) RegisterEvent(handle int, event func(ctx context.Context, actionState *action.State) error, ...)
- func (state *State) ReplaceSessionVariables(input *synced.Template) (string, error)
- func (state *State) ReplaceSessionVariablesWithLocalData(input *synced.Template, localData interface{}) (string, error)
- func (state *State) ReqContext() (context.Context, *enigma.ChangeLists, context.CancelFunc)
- func (state *State) Reset(ctx context.Context)
- func (state *State) SendRequest(actionState *action.State, f func(ctx context.Context) error) error
- func (state *State) SendRequestRaw(actionState *action.State, ...) (json.RawMessage, error)
- func (state *State) SetLogEntry(entry *logger.LogEntry)
- func (state *State) SetRandomizer(rnd helpers.Randomizer, force bool)
- func (state *State) SetReconnectFunc(f func(bool) (string, error))
- func (state *State) SetTargetEnv(env string)
- func (state *State) SetVariableValue(variable string, value interface{})
- func (state *State) SetupChangeChan() error
- func (state *State) SetupEventWebsocketAsync(actionState *action.State, nurl neturl.URL, allowuntrusted bool)
- func (state *State) TargetEnv() string
- func (state *State) TrafficLogger() enigmahandlers.ITrafficLogger
- func (state *State) TriggerContextChanges(ctx context.Context, actionState *action.State)
- func (state *State) TriggerEvents(actionState *action.State, chHandles, clHandles []int)
- func (state *State) UpdateFeatureMap(host string, actionState *action.State)
- func (state *State) WSFailed()
- func (state *State) Wait(actionState *action.State) bool
- type TabbedContainerChildReference
- type TabbedContainerHandler
- type TabbedContainerHandlerInstance
- func (handler *TabbedContainerHandlerInstance) FirstShowableChild() (*TabbedContainerChildReference, bool)
- func (handler *TabbedContainerHandlerInstance) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error)
- func (handler *TabbedContainerHandlerInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, ...)
- func (handler *TabbedContainerHandlerInstance) SwitchActiveChild(sessionState *State, actionState *action.State, ...)
- func (handler *TabbedContainerHandlerInstance) UpdateChildren(layout *TabbedContainerLayout) error
- type TabbedContainerLayout
- type TabbedContainerLayoutChildList
- type TabbedContainerLayoutChildListItems
- type TabbedContainerLayoutChildListItemsData
- type TabbedContainerLayoutObjects
- type TemplateArtifactMap
- type Transport
Constants ¶
const ( ResourceTypeApp = "app" ResourceTypeQVApp = "qvapp" ResourceTypeGenericLink = "genericlink" ResourceTypeDataset = "dataset" ResourceTypeDataAsset = "dataasset" )
Currently known resource types
const ( EventWsReconnectStarted = "eventws.reconnect.started" EventWsReconnectEnded = "eventws.reconnect.ended" )
Fake "events" for event websocket
const ( TargetEnvQlikSenseOnWindows = "qseow" TargetEnvStandaloneEngine = "engine" TargetEnvDefault = TargetEnvStandaloneEngine )
Standard defined target environments
const ( // DefaultTimeout per request timeout DefaultTimeout = 300 * time.Second )
const (
GeneratedPropertiesPath = "/qUndoExclude/generated"
)
Variables ¶
var (
GlobalObjectHandler objectHandlerMap
)
var ( // LogFeatureFlags logs feature flags unless previously logged LogFeatureFlags = &sync.Once{} )
Functions ¶
func CheckResponseStatus ¶
func CheckResponseStatus(request *RestRequest, statusCodes []int) error
CheckResponseStatus validates that a response has acceptable
func DefaultClient ¶
DefaultClient creates client instance with default client settings
func DefaultSetObjectDataAndEvents ¶ added in v0.17.18
func DefaultSetObjectDataAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject, def *senseobjdef.ObjectDef)
func EngineCodeToString ¶ added in v0.17.19
func GetAndAddObjectAsync ¶ added in v0.5.3
GetAndAddObjectAsync get and add object to object handling
func GetAndAddObjectSync ¶ added in v0.5.7
GetAndAddObjectSync get and add object to object handling
func GetApproriateNrOfBins ¶ added in v0.5.3
func GetApproriateNrOfBins(hypercube *enigmahandlers.HyperCube) int
Logic as written in client.js as of sense april 2018:
getApproriateNrOfBins: function (t) { var e = t.qHyperCube.qMeasureInfo.length || 1, n = 4 + 2 * (e - 1); return t.qHyperCube.qDimensionInfo.length > 1 && (e = Math.max(1, Math.min(h.maxNumberOfLines, t.qHyperCube.qDimensionInfo[1].qStateCounts.qLocked + t.qHyperCube.qDimensionInfo[1].qStateCounts.qOption + t.qHyperCube.qDimensionInfo[1].qStateCounts.qSelected)), n = 4), Math.ceil(2e3 / (e * n)) },
func GetFullContinuousRange ¶ added in v0.5.3
func GetFullContinuousRange(hypercube *enigmahandlers.HyperCube) (enigma.Float64, enigma.Float64, error)
Logic as written in client.js as of sense april 2018:
getFullContinuousRange: function (t) { var e = t.qHyperCube.qDimensionInfo[0].qMin, n = t.qHyperCube.qDimensionInfo[0].qMax; return n < e || "NaN" === n ? e = n = "NaN" : e === n && (e -= .5, n += .5), { min: e, max: n } },
func GetObjectLayout ¶ added in v0.5.3
func GetObjectLayout(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, def *senseobjdef.ObjectDef) error
func GetObjectProperties ¶ added in v0.5.3
func LogTrafficIn ¶ added in v0.11.5
func LogTrafficOut ¶ added in v0.11.5
func RegisterCustomHeadersFunc ¶ added in v0.18.0
func RegisterCustomHeadersFunc(f CustomHeadersFunc) error
RegisterCustomHeadersFunc adds extra headers to all http requests. RegisterCustomHeadersFunc shall be called only once and this call shall be before the gopherciser scenario runs.
func SetChildList ¶ added in v0.5.3
func SetChildList(rawLayout json.RawMessage, obj *enigmahandlers.Object) error
func SetChildren ¶ added in v0.5.3
func SetChildren(rawLayout json.RawMessage, obj *enigmahandlers.Object) error
func SetHyperCube ¶ added in v0.5.3
func SetListObject ¶ added in v0.5.3
func SetListObject(rawLayout json.RawMessage, obj *enigmahandlers.Object, path helpers.DataPath) error
func SetObjectData ¶ added in v0.5.3
func SetObjectData(sessionState *State, actionState *action.State, rawLayout json.RawMessage, objectDef *senseobjdef.ObjectDef, obj *enigmahandlers.Object, enigmaObject *enigma.GenericObject) error
SetObjectData sets data to obj from layout and data requests according to objectDef
func UpdateListObjectDataAsync ¶ added in v0.5.3
func UpdateListObjectDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, obj *enigmahandlers.Object, requestDef senseobjdef.GetDataRequests)
UpdateListObjectDataAsync send get listobject data and update saved list object
func UpdateObjectHyperCubeBinnedDataAsync ¶ added in v0.5.3
func UpdateObjectHyperCubeBinnedDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, obj *enigmahandlers.Object, requestDef senseobjdef.GetDataRequests)
UpdateObjectHyperCubeBinnedDataAsync send get hypercube binned data request and update saved hypercube
func UpdateObjectHyperCubeContinuousDataAsync ¶ added in v0.5.3
func UpdateObjectHyperCubeContinuousDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, obj *enigmahandlers.Object, requestDef senseobjdef.GetDataRequests)
UpdateObjectHyperCubeContinuousDataAsync send get continous data request
func UpdateObjectHyperCubeDataAsync ¶ added in v0.5.3
func UpdateObjectHyperCubeDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, obj *enigmahandlers.Object, requestDef senseobjdef.GetDataRequests, columns bool)
UpdateObjectHyperCubeDataAsync send get straight hypercube data and update saved hypercube
func UpdateObjectHyperCubeReducedDataAsync ¶ added in v0.5.3
func UpdateObjectHyperCubeReducedDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, obj *enigmahandlers.Object, requestDef senseobjdef.GetDataRequests)
UpdateObjectHyperCubeReducedDataAsync send get hypercube reduced data request and update saved hypercube
func UpdateObjectHyperCubeStackDataAsync ¶ added in v0.5.3
func UpdateObjectHyperCubeStackDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, obj *enigmahandlers.Object, requestDef senseobjdef.GetDataRequests)
UpdateObjectHyperCubeStackDataAsync send get stacked hypercube data and update saved hypercube
func UpdateObjectHyperCubeTreeDataAsync ¶ added in v0.6.26
func UpdateObjectHyperCubeTreeDataAsync(sessionState *State, actionState *action.State, gob *enigma.GenericObject, obj *enigmahandlers.Object, requestDef senseobjdef.GetDataRequests)
UpdateObjectHyperCubeTreeDataAsync send get hypercube tree data request and update saved data
Types ¶
type AppSelection ¶
type AppSelection struct { AppSelectionCore // contains filtered or unexported fields }
AppSelection contains the selected app for the current session
func NewAppSelection ¶
func NewAppSelection(appMode AppSelectionModeEnum, app string, list []string) (*AppSelection, error)
NewAppSelection creates new instance of AppSelection
func (*AppSelection) Select ¶
func (appSelection *AppSelection) Select(sessionState *State) (*ArtifactEntry, error)
Select new app
func (*AppSelection) UnmarshalJSON ¶
func (appSelection *AppSelection) UnmarshalJSON(arg []byte) error
UnmarshalJSON unmarshal AppSelection
func (*AppSelection) Validate ¶
func (appSelection *AppSelection) Validate() error
Validate AppSelection settings
type AppSelectionCore ¶
type AppSelectionCore struct { // AppMode app selection mode AppMode AppSelectionModeEnum `json:"appmode" displayname:"App selection mode" doc-key:"appselection.appmode"` // App name or GUID depending on AppMode App synced.Template `json:"app,omitempty" displayname:"App" doc-key:"appselection.app"` // AppList of app names or GUID's, depending on AppMode AppList []string `json:"list,omitempty" displayname:"App selection list" doc-key:"appselection.list"` // Filename of file containing app names, one app per line Filename helpers.RowFile `json:"filename,omitempty" displayname:"App selection filename" displayelement:"file" doc-key:"appselection.filename"` }
AppSelectionCore app selection settings shared between multiple actions
type AppSelectionModeEnum ¶
type AppSelectionModeEnum int
AppSelectionModeEnum from where to get app to open, defaults to "current"
const ( AppModeCurrent AppSelectionModeEnum = iota AppModeGUID AppModeName AppModeRandom AppModeRandomNameFromList AppModeRandomGUIDFromList AppModeRandomNameFromFile AppModeRandomGUIDFromFile AppModeRound AppModeRoundNameFromList AppModeRoundGUIDFromList AppModeRoundNameFromFile AppModeRoundGUIDFromFile )
AppSelectionModeEnum from where to get app to open, defaults to "current"
func (AppSelectionModeEnum) GetEnumMap ¶
func (mode AppSelectionModeEnum) GetEnumMap() *enummap.EnumMap
GetEnumMap for app selection mode
func (AppSelectionModeEnum) MarshalJSON ¶
func (mode AppSelectionModeEnum) MarshalJSON() ([]byte, error)
MarshalJSON marshal AppSelectionModeEnum
func (AppSelectionModeEnum) String ¶
func (mode AppSelectionModeEnum) String() string
String implements stringer interface
func (*AppSelectionModeEnum) UnmarshalJSON ¶
func (mode *AppSelectionModeEnum) UnmarshalJSON(arg []byte) error
UnmarshalJSON unmarshal AppSelectionModeEnum
type ArtifactEntry ¶
type ArtifactEntry struct { Name string `json:"name"` ID string `json:"resourceId"` ItemID string `json:"ID,omitempty"` ResourceType string `json:"resourceType"` Data interface{} `json:"-"` }
ArtifactEntry is the entry for most, but not all, item types in artifact map
func (*ArtifactEntry) Copy ¶
func (entry *ArtifactEntry) Copy() *ArtifactEntry
Copy of ArtifactEntry
type ArtifactEntryCompareType ¶ added in v0.12.0
type ArtifactEntryCompareType int
const ( ArtifactEntryCompareTypeID ArtifactEntryCompareType = iota ArtifactEntryCompareTypeItemID ArtifactEntryCompareTypeName )
func (ArtifactEntryCompareType) String ¶ added in v0.17.13
func (cmpType ArtifactEntryCompareType) String() string
type ArtifactKey ¶ added in v0.6.19
ArtifactKey used to find item using title
type ArtifactList ¶ added in v0.6.19
type ArtifactList struct {
// contains filtered or unexported fields
}
ArtifactList all items, spaces and collections
func (*ArtifactList) Len ¶ added in v0.6.19
func (d *ArtifactList) Len() int
func (ArtifactList) Less ¶ added in v0.6.19
func (d ArtifactList) Less(i, j int) bool
func (ArtifactList) MarshalJSON ¶ added in v0.6.19
func (d ArtifactList) MarshalJSON() ([]byte, error)
MarshalJSON marshal artifact list to JSON
func (ArtifactList) Swap ¶ added in v0.6.19
func (d ArtifactList) Swap(i, j int)
type ArtifactMap ¶
type ArtifactMap struct { NonEphemeralResourceTypes []string // contains filtered or unexported fields }
ArtifactMap is the map between app names and GUIDs
func NewArtifactMap ¶ added in v0.6.19
func NewArtifactMap() *ArtifactMap
NewArtifactMap returns an empty ArtifactMap
func (*ArtifactMap) Append ¶ added in v0.6.19
func (am *ArtifactMap) Append(resourceType string, entry *ArtifactEntry)
Append locks ArtifactMap and appends entry to artifact list
func (*ArtifactMap) ClearArtifactMap ¶ added in v0.6.19
func (am *ArtifactMap) ClearArtifactMap()
ClearArtifactMap Empty Apps from ArtifactMap
func (*ArtifactMap) Count ¶ added in v0.6.19
func (am *ArtifactMap) Count(resourceType string) int
Count of specified resource type list
func (*ArtifactMap) DeleteApp ¶
func (am *ArtifactMap) DeleteApp(appGUID string)
DeleteApp deletes an app from the ArtifactMap
func (*ArtifactMap) DeleteItem ¶ added in v0.6.19
func (am *ArtifactMap) DeleteItem(resourceType, lookfor string, compareType ArtifactEntryCompareType)
DeleteItem from artifact map
func (*ArtifactMap) DeleteItemUsingID ¶ added in v0.6.19
func (am *ArtifactMap) DeleteItemUsingID(id, resourceType string)
DeleteItemUsingID with resource type and ID
func (*ArtifactMap) DeleteItemUsingItemID ¶ added in v0.12.0
func (am *ArtifactMap) DeleteItemUsingItemID(id, resourceType string)
DeleteItemUsingItemID with resource type and item ID
func (*ArtifactMap) FillAppsUsingDocListEntries ¶
func (am *ArtifactMap) FillAppsUsingDocListEntries(docListEntries []*enigma.DocListEntry) error
FillAppsUsingDocListEntries should be used to fillAppMap app map in QSEoW
func (*ArtifactMap) FillAppsUsingStream ¶ added in v0.10.0
func (am *ArtifactMap) FillAppsUsingStream(stream structs.Stream) error
FillAppsUsingStream
func (*ArtifactMap) FillArtifacts ¶ added in v0.6.19
func (am *ArtifactMap) FillArtifacts(item *ItemData) error
FillArtifacts puts the app name (key) and the app ID (value) in the ArtifactMap
func (*ArtifactMap) First ¶ added in v0.6.19
func (am *ArtifactMap) First(resourceType string) *ArtifactEntry
First entry of resource type
func (*ArtifactMap) GetAllOfType ¶ added in v0.17.9
func (am *ArtifactMap) GetAllOfType(sessionState *State, resourcetype string) []ArtifactEntry
GetAllOfType gets a copy of a list of the current items with specified resource type
func (*ArtifactMap) GetAppID ¶
func (am *ArtifactMap) GetAppID(appName string) (string, error)
GetAppID returns the app ID given the app Title. When multiple apps have the same Title, this will return the ID of the last app in the order of the struct passed to the Fill function.
func (*ArtifactMap) GetAppItemID ¶ added in v0.6.19
func (am *ArtifactMap) GetAppItemID(appName string) (string, error)
GetAppItemID returns the item ID given the app Title. When multiple apps have the same Title, this will return the ID of the last app in the order of the struct passed to the Fill function.
func (*ArtifactMap) GetRandomApp ¶
func (am *ArtifactMap) GetRandomApp(sessionState *State) (ArtifactEntry, error)
GetRandomApp returns a random app for the map, chosen by a uniform distribution
func (*ArtifactMap) GetRoundRobin ¶
func (am *ArtifactMap) GetRoundRobin(sessionState *State) (ArtifactEntry, error)
GetRoundRobin returns a app round robin for the map
func (*ArtifactMap) JSON ¶ added in v0.6.19
func (am *ArtifactMap) JSON() ([]byte, error)
JSON locks artifact map and marshals json
func (*ArtifactMap) LogMap ¶
func (am *ArtifactMap) LogMap(entry *logger.LogEntry) error
LogMap log entire map as debug logging
func (*ArtifactMap) Lookup ¶ added in v0.9.0
func (am *ArtifactMap) Lookup(resourcetype, lookup string, compareType ArtifactEntryCompareType) (*ArtifactEntry, error)
Lookup resource type with using lookup (name or ID, defined by id flag)
func (*ArtifactMap) LookupAppGUID ¶
func (am *ArtifactMap) LookupAppGUID(guid string) (*ArtifactEntry, error)
LookupAppGUID lookup app using GUID
func (*ArtifactMap) LookupAppTitle ¶
func (am *ArtifactMap) LookupAppTitle(title string) (*ArtifactEntry, error)
LookupAppTitle lookup app using title
func (*ArtifactMap) LookupItemID ¶ added in v0.12.0
func (am *ArtifactMap) LookupItemID(resourcetype, itemID string) (*ArtifactEntry, error)
LookupItemID lookup resource using Item ID
func (*ArtifactMap) Sort ¶ added in v0.6.19
func (am *ArtifactMap) Sort(resourceType string)
Sort entries of resource type
type AutoChartHandler ¶ added in v0.5.3
type AutoChartHandler struct {
DefaultHandler
}
func (*AutoChartHandler) Instance ¶ added in v0.5.3
func (handler *AutoChartHandler) Instance(id string) ObjectHandlerInstance
type AutoChartInstance ¶ added in v0.5.3
type AutoChartInstance struct { DefaultHandlerInstance ObjectDef *senseobjdef.ObjectDef }
func (*AutoChartInstance) GetObjectDefinition ¶ added in v0.5.4
func (instance *AutoChartInstance) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error)
func (*AutoChartInstance) SetObjectAndEvents ¶ added in v0.5.3
func (instance *AutoChartInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject)
GetObject implement ObjectHandler interface
func (*AutoChartInstance) SetObjectDefData ¶ added in v0.5.4
func (instance *AutoChartInstance) SetObjectDefData(objDefData []senseobjdef.Data)
type CalcEvalConditionFailedError ¶ added in v0.14.5
type CalcEvalConditionFailedError string
func (CalcEvalConditionFailedError) Error ¶ added in v0.14.5
func (err CalcEvalConditionFailedError) Error() string
Error implements error interface
type ConnectionSettings ¶
type ConnectionSettings interface {
AllowUntrusted() bool
}
ConnectionSettings interface
type ContainerChild ¶ added in v0.6.10
type ContainerChildItem ¶ added in v0.6.10
type ContainerChildItem struct { Info enigma.NxInfo `json:"qInfo"` Meta interface{} `json:"qMeta"` Data ContainerChildItemData `json:"qData"` }
type ContainerChildItemData ¶ added in v0.6.10
type ContainerChildList ¶ added in v0.6.10
type ContainerChildList struct {
Items []ContainerChildItem `json:"qItems"`
}
type ContainerChildReference ¶ added in v0.6.10
type ContainerExternal ¶ added in v0.6.10
type ContainerHandler ¶ added in v0.6.10
type ContainerHandler struct{}
func (*ContainerHandler) Instance ¶ added in v0.6.10
func (handler *ContainerHandler) Instance(id string) ObjectHandlerInstance
Instance implements ObjectHandler interface
type ContainerHandlerInstance ¶ added in v0.6.10
type ContainerHandlerInstance struct { ID string ActiveID string DefaultID string // contains filtered or unexported fields }
func (*ContainerHandlerInstance) ActiveChildReference ¶ added in v0.6.17
func (handler *ContainerHandlerInstance) ActiveChildReference() *ContainerChildReference
ActiveChildReference returns reference to currently active child or nil
func (*ContainerHandlerInstance) ChildWithID ¶ added in v0.6.17
func (handler *ContainerHandlerInstance) ChildWithID(id string) *ContainerChildReference
ChildWithID returns child reference to child with defined object ID
func (*ContainerHandlerInstance) Children ¶ added in v0.6.10
func (handler *ContainerHandlerInstance) Children() []ContainerChildReference
Children returns copy of children
func (*ContainerHandlerInstance) FirstShowableChild ¶ added in v0.6.17
func (handler *ContainerHandlerInstance) FirstShowableChild() (*ContainerChildReference, bool)
FirstShowableChild gets reference to first object from container which fulfills conditions, true if already active object
func (*ContainerHandlerInstance) GetObjectDefinition ¶ added in v0.6.10
func (handler *ContainerHandlerInstance) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error)
GetObjectDefinition implements ObjectHandlerInstance interface
func (*ContainerHandlerInstance) SetObjectAndEvents ¶ added in v0.6.10
func (handler *ContainerHandlerInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject)
SetObjectAndEvents implements ObjectHandlerInstance interface
func (*ContainerHandlerInstance) SwitchActiveChild ¶ added in v0.6.17
func (handler *ContainerHandlerInstance) SwitchActiveChild(sessionState *State, actionState *action.State, child *ContainerChildReference) error
SwitchActiveChild to referenced child
func (*ContainerHandlerInstance) UpdateChildren ¶ added in v0.6.17
func (handler *ContainerHandlerInstance) UpdateChildren(layout *ContainerLayout) error
UpdateChildren of the container
type ContainerLayout ¶ added in v0.6.10
type ContainerLayout struct { Children []ContainerChild `json:"children"` ChildList ContainerChildList `json:"qChildList"` DefaultTab string `json:"defaultTab"` }
func GetContainerLayout ¶ added in v0.6.17
func GetContainerLayout(sessionState *State, actionState *action.State, containerObject *enigma.GenericObject) *ContainerLayout
GetContainerLayout returns unmarshaled container layout, errors reported on action state
type CustomHeadersFunc ¶ added in v0.18.0
type CustomHeadersFunc func(input CustomHeadersInput, setHeader func(key, value string))
type CustomHeadersInput ¶ added in v0.18.0
type CustomHeadersInput struct { // RunID is a string unique to an execution of gopherciser RunID string GopherciserVersion string Session logger.SessionEntry Action logger.ActionEntry }
type DefaultHandler ¶ added in v0.5.3
type DefaultHandler struct{}
func (*DefaultHandler) Instance ¶ added in v0.5.3
func (handler *DefaultHandler) Instance(id string) ObjectHandlerInstance
type DefaultHandlerInstance ¶ added in v0.5.3
type DefaultHandlerInstance struct {
Id string
}
func (*DefaultHandlerInstance) GetObjectDefinition ¶ added in v0.5.3
func (instance *DefaultHandlerInstance) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error)
func (*DefaultHandlerInstance) SetObjectAndEvents ¶ added in v0.5.3
func (instance *DefaultHandlerInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject)
GetObject implement ObjectHandler interface
type DefaultRandomizer ¶ added in v0.4.11
type DefaultRandomizer struct { *randomizer.Randomizer // contains filtered or unexported fields }
func (*DefaultRandomizer) Reset ¶ added in v0.4.11
func (rnd *DefaultRandomizer) Reset(instance, session uint64, onlyInstanceSeed bool)
Reset child randomizer with new seed
type DuplicateKeyError ¶
type DuplicateKeyError string
DuplicateKeyError is returned in case of adding an already existing key id
func (DuplicateKeyError) Error ¶
func (err DuplicateKeyError) Error() string
Error id already exist in map
type Event ¶
type Event struct { // F is function to be executed on event F func(ctx context.Context, actionState *action.State) error // NoFailOnError - // False (Default) - Report error and abort action // True - Log warning instead of failing and error reporting NoFailOnError bool // Close executed on de-registering event Close func() }
Event encapsulates an event channel and a function to be executed on events
type EventMetricsLogger ¶ added in v0.6.0
func (*EventMetricsLogger) SocketOpenMetric ¶ added in v0.6.0
func (lgr *EventMetricsLogger) SocketOpenMetric(url *neturl.URL, duration time.Duration)
type FeatureAllocationError ¶ added in v0.6.23
type FeatureAllocationError struct{}
FeatureAllocationError returned when feature map is expected to be allocated but is not
func (FeatureAllocationError) Error ¶ added in v0.6.23
func (err FeatureAllocationError) Error() string
type FeatureFlagNotFoundError ¶ added in v0.6.23
type FeatureFlagNotFoundError string
FeatureFlagNotFoundError returned when feature flag was not found
func (FeatureFlagNotFoundError) Error ¶ added in v0.6.23
func (err FeatureFlagNotFoundError) Error() string
type Features ¶ added in v0.6.23
type Features struct {
// contains filtered or unexported fields
}
Features maps feature flags and values
func (*Features) IsFeatureEnabled ¶ added in v0.6.23
IsFeatureEnabled check if feature flag is enabled
func (*Features) IsFeatureEnabledDefault ¶ added in v0.6.23
IsFeatureEnabledDefault check if feature flag is enabled, if not existing return default value
func (*Features) UpdateCapabilities ¶ added in v0.10.0
func (features *Features) UpdateCapabilities(rest *RestHandler, host string, actionState *action.State, logEntry *logger.LogEntry)
UpdateCapabilities request capabilities from server and updates feature map
func (*Features) UpdateFeatureMap ¶ added in v0.6.23
func (features *Features) UpdateFeatureMap(rest *RestHandler, host string, actionState *action.State, logEntry *logger.LogEntry)
UpdateFeatureMap request features from server and updates feature map
type GenericObjectLayoutWithVisualization ¶ added in v0.17.18
type GenericObjectLayoutWithVisualization struct { enigma.GenericObjectLayout Visualization string }
func GetMasterObjectLayout ¶ added in v0.17.18
func GetMasterObjectLayout(sessionState *State, actionState *action.State, containerObject *enigma.GenericObject) *GenericObjectLayoutWithVisualization
GetMasterObjectLayout returns
type HeaderJar ¶
type HeaderJar struct {
// contains filtered or unexported fields
}
HeaderJar map between hosts and headers
type HyperCubeSection ¶ added in v0.17.22
type HyperCubeSection int
const ( HyperCubeSectionRoot HyperCubeSection = iota HyperCubeSectionMeasure HyperCubeSectionDimension HyperCubeSectionMeasureMinichart )
type IConnection ¶
type IConnection interface { // Disconnect connection Disconnect() error // SetSense : set current sense environment SetSense(*enigmahandlers.SenseUplink) // Sense : connection to sense environment Sense() *enigmahandlers.SenseUplink }
IConnection interface for current
type IDMap ¶
type IDMap struct {
// contains filtered or unexported fields
}
IDMap should be used as a lookup table for Id defined in the script and id of object created. We should never define the id to be sent to engine as this might cause collision errors, instead this lookup table is used with the key id connecting object together for in-script purposes.
func (*IDMap) IsDuplicateKey ¶
IsDuplicateKey returns already in case of duplicate key
type ItemData ¶ added in v0.6.19
type ItemData struct {
Data []ArtifactEntry `json:"data"`
}
ItemData struct to unmarshal list app response
type LayoutContainerChildItem ¶ added in v0.17.18
type LayoutContainerChildItem struct { Info enigma.NxInfo `json:"qInfo"` Meta interface{} `json:"qMeta"` Data LayoutContainerChildItemData `json:"qData"` }
type LayoutContainerChildItemData ¶ added in v0.17.18
type LayoutContainerChildList ¶ added in v0.17.18
type LayoutContainerChildList struct {
Items []LayoutContainerChildItem `json:"qItems"`
}
type LayoutContainerHandler ¶ added in v0.17.18
type LayoutContainerHandler struct{}
func (*LayoutContainerHandler) Instance ¶ added in v0.17.18
func (handler *LayoutContainerHandler) Instance(id string) ObjectHandlerInstance
Instance implements ObjectHandler interface
type LayoutContainerHandlerInstance ¶ added in v0.17.18
type LayoutContainerHandlerInstance struct { ID string // contains filtered or unexported fields }
func (*LayoutContainerHandlerInstance) GetObjectDefinition ¶ added in v0.17.18
func (handler *LayoutContainerHandlerInstance) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error)
GetObjectDefinition implements ObjectHandlerInstance interface
func (*LayoutContainerHandlerInstance) SetObjectAndEvents ¶ added in v0.17.18
func (handler *LayoutContainerHandlerInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject)
SetObjectAndEvents implements ObjectHandlerInstance interface
func (*LayoutContainerHandlerInstance) UpdateChildren ¶ added in v0.17.18
func (handler *LayoutContainerHandlerInstance) UpdateChildren(sessionState *State, actionState *action.State, layout *LayoutContainerLayout) error
UpdateChildren of the container
type LayoutContainerLayout ¶ added in v0.17.18
type LayoutContainerLayout struct { Objects []LayoutContainerLayoutObject `json:"objects"` ChildList LayoutContainerChildList `json:"qChildList"` }
func GetLayourContainerLayout ¶ added in v0.17.18
func GetLayourContainerLayout(sessionState *State, actionState *action.State, containerObject *enigma.GenericObject) *LayoutContainerLayout
GetLayourContainerLayout returns unmarshaled sn-layout-container layout, errors reported on action state
func (*LayoutContainerLayout) ChildRefsToIDs ¶ added in v0.17.18
func (layout *LayoutContainerLayout) ChildRefsToIDs(sessionState *State, childRefs []string) ([]string, error)
ChildRefsToIDs translates a list of child refs to object ID's
type LayoutContainerLayoutObject ¶ added in v0.17.18
type MasterObjectHandler ¶ added in v0.17.18
type MasterObjectHandler struct{}
func (*MasterObjectHandler) Instance ¶ added in v0.17.18
func (handler *MasterObjectHandler) Instance(id string) ObjectHandlerInstance
Instance implements ObjectHandler interface
type MasterObjectHandlerInstance ¶ added in v0.17.18
func (*MasterObjectHandlerInstance) GetObjectDefinition ¶ added in v0.17.18
func (handler *MasterObjectHandlerInstance) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error)
GetObjectDefinition implements ObjectHandlerInstance interface
func (*MasterObjectHandlerInstance) SetObjectAndEvents ¶ added in v0.17.18
func (handler *MasterObjectHandlerInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject)
SetObjectAndEvents
type MinimalTrafficLogger ¶ added in v0.11.5
type NoActiveDocError ¶ added in v0.5.7
func (NoActiveDocError) Error ¶ added in v0.5.7
func (err NoActiveDocError) Error() string
Error implements error interface
type NxValidationError ¶ added in v0.17.8
type NxValidationError struct { Err enigma.NxValidationError Id string Path string Section HyperCubeSection }
func (NxValidationError) Code ¶ added in v0.17.22
func (err NxValidationError) Code() int
Implements engima.Error interface
func (NxValidationError) Error ¶ added in v0.17.8
func (err NxValidationError) Error() string
func (NxValidationError) Message ¶ added in v0.17.22
func (err NxValidationError) Message() string
Implements engima.Error interface
func (NxValidationError) Parameter ¶ added in v0.17.22
func (err NxValidationError) Parameter() string
Implements engima.Error interface
type ObjectHandler ¶ added in v0.5.3
type ObjectHandler interface {
Instance(id string) ObjectHandlerInstance
}
type ObjectHandlerInstance ¶ added in v0.5.3
type ObjectHandlerInstance interface { SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error) }
type ReconnectInfo ¶ added in v0.5.7
type ReconnectInfo struct {
// contains filtered or unexported fields
}
type ReconnectSettings ¶ added in v0.5.7
type ReconnectSettings struct { // Reconnect set to true to attempt reconnecting websocket on disconnect Reconnect bool `json:"reconnect" doc-key:"reconnectsettings.reconnect" displayname:"Reconnect on disconnected websocket"` // Backoff pattern for reconnect, if empty defaults to defaultReconnectBackoff Backoff []float64 `json:"backoff" doc-key:"reconnectsettings.backoff" displayname:"Reconnect backoff pattern"` }
ReconnectSettings settings for re-connecting websocket on unexpected disconnect
type ReqOptions ¶
type ReqOptions struct { // ExpectedStatusCode of response, empty list accepts everything (used e.g. for separate checking status) ExpectedStatusCode []int // FailOnError set to true for request to add an error to actionState, otherwise a warning is logged. FailOnError bool // ContentType defaults to application/json ContentType string // NoVirtualProxy disables the automatic adding of virtualproxy to request when a virtualproxy is defined. // This is useful e.g. when sending requests towards non sense environments as part of custom actions. NoVirtualProxy bool }
ReqOptions options controlling handling of requests
func DefaultReqOptions ¶
func DefaultReqOptions() *ReqOptions
DefaultReqOptions sets expected status code to 200 and fails on error
type RestHandler ¶
RestHandler handles waiting for pending requests and responses
func NewRestHandler ¶
func NewRestHandler(ctx context.Context, trafficLogger enigma.TrafficLogger, headerjar *HeaderJar, virtualProxy string, timeout time.Duration, pendingHandler *pending.Handler) *RestHandler
NewRestHandler new instance of RestHandler
func (*RestHandler) DeleteAsync ¶ added in v0.7.0
func (handler *RestHandler) DeleteAsync(url string, actionState *action.State, logEntry *logger.LogEntry, options *ReqOptions) *RestRequest
DeleteAsync send async DELETE request with options, using options=nil default options are used
func (*RestHandler) DeleteAsyncWithCallback ¶ added in v0.7.0
func (handler *RestHandler) DeleteAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, headers map[string]string, options *ReqOptions, callback func(err error, req *RestRequest)) *RestRequest
DeleteAsyncWithCallback send async DELETE request with options and callback, using options=nil default options are used
func (*RestHandler) DeleteAsyncWithHeaders ¶ added in v0.7.0
func (handler *RestHandler) DeleteAsyncWithHeaders(url string, actionState *action.State, logEntry *logger.LogEntry, headers map[string]string, options *ReqOptions) *RestRequest
DeleteAsyncWithHeaders send async DELETE request with options and headers, using options=nil default options are used
func (*RestHandler) GetAsync ¶
func (handler *RestHandler) GetAsync(url string, actionState *action.State, logEntry *logger.LogEntry, options *ReqOptions) *RestRequest
GetAsync send async GET request with options, using options=nil default options are used
func (*RestHandler) GetAsyncOnce ¶ added in v0.15.1
func (handler *RestHandler) GetAsyncOnce(url string, actionState *action.State, sessionState *State, logEntry *logger.LogEntry, options *ReqOptions, uniqueString string) *RestRequest
GetAsyncOnce same as GetAsync but only called once in the same session
func (*RestHandler) GetAsyncWithCallback ¶
func (handler *RestHandler) GetAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, options *ReqOptions, callback func(err error, req *RestRequest)) *RestRequest
GetAsyncWithCallback send async GET request with options and callback, with options=nil default options are used
func (*RestHandler) GetSync ¶
func (handler *RestHandler) GetSync(url string, actionState *action.State, logEntry *logger.LogEntry, options *ReqOptions) (*RestRequest, error)
GetSync sends synchronous GET request with options, using options=nil default options are used
func (*RestHandler) GetSyncOnce ¶ added in v0.15.1
func (handler *RestHandler) GetSyncOnce(url string, actionState *action.State, sessionState *State, logEntry *logger.LogEntry, options *ReqOptions, uniqueString string) (*RestRequest, error)
GetSyncOnce same as GetSync but only called once in the same session
func (*RestHandler) GetSyncWithCallback ¶
func (handler *RestHandler) GetSyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, options *ReqOptions, callback func(err error, req *RestRequest)) (*RestRequest, error)
GetSyncWithCallback sends synchronous GET request with options and callback, using options=nil default options are used
func (*RestHandler) GetWithHeadersAsync ¶ added in v0.5.8
func (handler *RestHandler) GetWithHeadersAsync(url string, actionState *action.State, logEntry *logger.LogEntry, headers map[string]string, options *ReqOptions, callback func(err error, req *RestRequest)) *RestRequest
GetWithHeadersAsync send async GET request with headers and options, using options=nil default options are used
func (*RestHandler) HeadAsync ¶ added in v0.17.0
func (handler *RestHandler) HeadAsync(url string, actionState *action.State, logEntry *logger.LogEntry, options *ReqOptions) *RestRequest
HeadAsync send async HEAD request with options, using options=nil default options are used
func (*RestHandler) HeadAsyncWithCallback ¶ added in v0.17.0
func (handler *RestHandler) HeadAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, options *ReqOptions, callback func(err error, req *RestRequest)) *RestRequest
HeadAsyncWithCallback send async HEAD request with options and callback, with options=nil default options are used
func (*RestHandler) HeadSync ¶ added in v0.17.0
func (handler *RestHandler) HeadSync(url string, actionState *action.State, logEntry *logger.LogEntry, options *ReqOptions) (*RestRequest, error)
HeadSync sends synchronous HEAD request with options, using options=nil default options are used
func (*RestHandler) HeadSyncWithCallback ¶ added in v0.17.0
func (handler *RestHandler) HeadSyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, options *ReqOptions, callback func(err error, req *RestRequest)) (*RestRequest, error)
HeadSyncWithCallback sends synchronous HEAD request with options and callback, using options=nil default options are used
func (*RestHandler) HeadWithHeadersAsync ¶ added in v0.17.0
func (handler *RestHandler) HeadWithHeadersAsync(url string, actionState *action.State, logEntry *logger.LogEntry, headers map[string]string, options *ReqOptions, callback func(err error, req *RestRequest)) *RestRequest
HeadWithHeadersAsync send async HEAD request with headers and options, using options=nil default options are used
func (*RestHandler) OptionsAsync ¶ added in v0.18.14
func (handler *RestHandler) OptionsAsync(url string, actionState *action.State, logEntry *logger.LogEntry, headers map[string]string, options *ReqOptions) *RestRequest
OptionsAsync send async request with options, using options=nil default options are used
func (*RestHandler) OptionsAsyncWitCallback ¶ added in v0.18.14
func (handler *RestHandler) OptionsAsyncWitCallback(url string, actionState *action.State, logEntry *logger.LogEntry, headers map[string]string, options *ReqOptions, callback func(err error, req *RestRequest)) *RestRequest
OptionsAsyncWitCallback send async request with options and callback, using options=nil default options are used
func (*RestHandler) OptionsSync ¶ added in v0.18.14
func (handler *RestHandler) OptionsSync(url string, actionState *action.State, logEntry *logger.LogEntry, headers map[string]string, options *ReqOptions) (*RestRequest, error)
OptionsSync send sync request with options, using options=nil default options are used
func (*RestHandler) OptionsSyncWitCallback ¶ added in v0.18.14
func (handler *RestHandler) OptionsSyncWitCallback(url string, actionState *action.State, logEntry *logger.LogEntry, headers map[string]string, options *ReqOptions, callback func(err error, req *RestRequest)) (*RestRequest, error)
OptionsSyncWitCallback send sync request with options and callback, using options=nil default options are used
func (*RestHandler) PatchAsync ¶ added in v0.6.26
func (handler *RestHandler) PatchAsync(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, options *ReqOptions) *RestRequest
PatchAsync send async PATCH request with options, using options=nil default options are used
func (*RestHandler) PatchAsyncWithCallback ¶ added in v0.6.26
func (handler *RestHandler) PatchAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, headers map[string]string, options *ReqOptions, callback func(err error, req *RestRequest)) *RestRequest
PatchAsyncWithCallback send async PATCH request with options and callback, using options=nil default options are used
func (*RestHandler) PatchWithHeadersAsync ¶ added in v0.6.26
func (handler *RestHandler) PatchWithHeadersAsync(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, headers map[string]string, options *ReqOptions) *RestRequest
PatchWithHeadersAsync send async PATCH request with options and headers, using options=nil default options are used
func (*RestHandler) PostAsync ¶
func (handler *RestHandler) PostAsync(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, options *ReqOptions) *RestRequest
PostAsync send async POST request with options, using options=nil default options are used
func (*RestHandler) PostAsyncWithCallback ¶
func (handler *RestHandler) PostAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, headers map[string]string, options *ReqOptions, callback func(err error, req *RestRequest)) *RestRequest
PostAsyncWithCallback send async POST request with options and callback, using options=nil default options are used
func (*RestHandler) PostSync ¶ added in v0.18.14
func (handler *RestHandler) PostSync(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, options *ReqOptions) (*RestRequest, error)
PostSync send sync POST request with options, using options=nil default options are used
func (*RestHandler) PostSyncWithCallback ¶ added in v0.18.14
func (handler *RestHandler) PostSyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, headers map[string]string, options *ReqOptions, callback func(err error, req *RestRequest)) (*RestRequest, error)
PostSyncWithCallback send sync POST request with options and callback, using options=nil default options are used
func (*RestHandler) PostWithHeadersAsync ¶ added in v0.5.8
func (handler *RestHandler) PostWithHeadersAsync(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, headers map[string]string, options *ReqOptions) *RestRequest
PostWithHeadersAsync send async POST request with options and headers, using options=nil default options are used
func (*RestHandler) PutAsync ¶ added in v0.6.26
func (handler *RestHandler) PutAsync(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, options *ReqOptions) *RestRequest
PutAsync send async PUT request with options, using options=nil default options are used
func (*RestHandler) PutAsyncWithCallback ¶ added in v0.6.26
func (handler *RestHandler) PutAsyncWithCallback(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, headers map[string]string, options *ReqOptions, callback func(err error, req *RestRequest)) *RestRequest
PutAsyncWithCallback send async PUT request with options and callback, using options=nil default options are used
func (*RestHandler) PutWithHeadersAsync ¶ added in v0.6.26
func (handler *RestHandler) PutWithHeadersAsync(url string, actionState *action.State, logEntry *logger.LogEntry, content []byte, headers map[string]string, options *ReqOptions) *RestRequest
PutWithHeadersAsync send async PUT request with options and headers, using options=nil default options are used
func (*RestHandler) QueueRequest ¶
func (handler *RestHandler) QueueRequest(actionState *action.State, failOnError bool, request *RestRequest, logEntry *logger.LogEntry)
QueueRequest Async request
func (*RestHandler) QueueRequestWithCallback ¶
func (handler *RestHandler) QueueRequestWithCallback(actionState *action.State, failOnError bool, request *RestRequest, logEntry *logger.LogEntry, callback func(err error, req *RestRequest))
QueueRequestWithCallback Async request with callback, set warnOnError to log warning instead of registering error for request
func (*RestHandler) SetClient ¶
func (handler *RestHandler) SetClient(client *http.Client)
SetClient set HTTP client for this RestHandler
type RestMethod ¶
type RestMethod int
RestMethod method with which to execute request
const ( // GET RestMethod GET RestMethod = iota // POST RestMethod POST // DELETE RestMethod DELETE // PUT RestMethod PUT // PATCH RestMethod PATCH // HEAD RestMethod HEAD // OPTIONS RestMethod OPTIONS )
RestMethod values
func (RestMethod) MarshalJSON ¶
func (method RestMethod) MarshalJSON() ([]byte, error)
MarshalJSON marshal RestMethod
func (RestMethod) String ¶
func (method RestMethod) String() string
String implements fmt.Stringer interface
func (*RestMethod) UnmarshalJSON ¶
func (method *RestMethod) UnmarshalJSON(arg []byte) error
UnmarshalJSON unmarshal RestMethod
type RestRequest ¶
type RestRequest struct { Method RestMethod ContentType string Content []byte ContentReader io.Reader Destination string ResponseBody []byte ResponseStatus string ResponseStatusCode int ResponseHeaders http.Header ExtraHeaders map[string]string NoVirtualProxy bool // contains filtered or unexported fields }
RestRequest represents a REST request and its response
type SessionVariableTypeEnum ¶ added in v0.11.0
type SessionVariableTypeEnum int
const ( SessionVariableTypeUnknown SessionVariableTypeEnum = iota SessionVariableTypeString SessionVariableTypeInt SessionVariableTypeArray )
SessionVariableTypeEnum enumerations
func (SessionVariableTypeEnum) GetEnumMap ¶ added in v0.11.0
func (typ SessionVariableTypeEnum) GetEnumMap() *enummap.EnumMap
GetEnumMap return sessionVariableTypeEnumMap to GUI
func (SessionVariableTypeEnum) MarshalJSON ¶ added in v0.11.0
func (typ SessionVariableTypeEnum) MarshalJSON() ([]byte, error)
MarshalJSON SessionVariableTypeEnum type
func (SessionVariableTypeEnum) String ¶ added in v0.11.0
func (typ SessionVariableTypeEnum) String() string
String implements Stringer interface
func (*SessionVariableTypeEnum) UnmarshalJSON ¶ added in v0.11.0
func (typ *SessionVariableTypeEnum) UnmarshalJSON(arg []byte) error
UnmarshalJSON SessionVariableTypeEnum type
func (*SessionVariableTypeEnum) Validate ¶ added in v0.11.1
func (typ *SessionVariableTypeEnum) Validate() error
Validate SessionVariableTypeEnum type
type SessionVariables ¶
type SessionVariables struct { users.User Session uint64 Thread uint64 ScriptVars map[string]interface{} Local interface{} Artifacts *TemplateArtifactMap }
SessionVariables is used as a data carrier for session variables.
type State ¶
type State struct { Cookies http.CookieJar VirtualProxy string Connection IConnection ArtifactMap *ArtifactMap IDMap IDMap HeaderJar *HeaderJar Timeout time.Duration User *users.User OutputsDir string CurrentApp *ArtifactEntry Counters *statistics.ExecutionCounters // CurrentActionState will contain the state of the latest action to be started CurrentActionState *action.State LogEntry *logger.LogEntry EW statistics.ErrWarn Pending pending.Handler Rest *RestHandler RequestMetrics *requestmetrics.RequestMetrics ReconnectSettings ReconnectSettings Features Features // contains filtered or unexported fields }
State for user
func New ¶
func New(ctx context.Context, outputsDir string, timeout time.Duration, user *users.User, session, instance uint64, virtualProxy string, onlyInstanceSeed bool, counters *statistics.ExecutionCounters) *State
New instance of session state
func NewWithRandomizer ¶ added in v0.4.11
func NewWithRandomizer(ctx context.Context, outputsDir string, timeout time.Duration, user *users.User, virtualProxy string, rnd helpers.Randomizer, counters *statistics.ExecutionCounters) *State
NewWithRandomizer instance of session state with custom randomizer
func (*State) AddCustomState ¶ added in v0.9.0
AddCustomState add custom data handler to state object
func (*State) AwaitReconnect ¶ added in v0.5.7
func (state *State) AwaitReconnect()
AwaitReconnect awaits any reconnect lock to be released
func (*State) BaseContext ¶
BaseContext for state. Normally shouldn't be used. Use ReqContext for for context on Sense actions, or methods handling the context such as QueueRequest and SendRequest
func (*State) ClearObjectSubscriptions ¶ added in v0.6.10
func (state *State) ClearObjectSubscriptions()
ClearObjectSubscriptions and currently subscribed objects
func (*State) ClearSubscribedObjects ¶ added in v0.6.10
ClearSubscribedObjects unsubscribes from listed objects
func (*State) ContextChangeList ¶
func (state *State) ContextChangeList() (context.Context, *enigma.ChangeLists)
ContextChangeList create changeList object and context to be used for synchronizing changes
func (*State) ContextWithTimeout ¶
ContextWithTimeout new context based on ctx with default timeout
func (*State) CurrentSenseApp ¶ added in v0.5.7
func (state *State) CurrentSenseApp() (*senseobjects.App, error)
CurrentSenseApp returns currently set sense app or error if none found
func (*State) CurrentSenseUplink ¶ added in v0.5.7
func (state *State) CurrentSenseUplink() (*enigmahandlers.SenseUplink, error)
CurrentSenseUplink return currently set sense uplink or error if none found
func (*State) DeRegisterEvent ¶
DeRegisterEvent for handle
func (*State) DeRegisterEvents ¶
DeRegisterEvents for handles in list
func (*State) DeregisterAllEvents ¶
func (state *State) DeregisterAllEvents()
DeregisterAllEvents for session
func (*State) Disconnect ¶
func (state *State) Disconnect()
Disconnect de-registers all events and disconnects current connection
func (*State) EventWebsocket ¶ added in v0.6.0
func (state *State) EventWebsocket() *eventws.EventWebsocket
EventWebsocket returns current established event websocket or nil
func (*State) GetCustomState ¶ added in v0.9.0
GetCustomState data handler from state object
func (*State) GetEventFunc ¶ added in v0.17.10
func (state *State) GetEventFunc(handle int) func(ctx context.Context, actionState *action.State) error
GetEvent for handle
func (*State) GetObjectHandlerInstance ¶ added in v0.5.3
func (state *State) GetObjectHandlerInstance(id, typ string) ObjectHandlerInstance
GetObjectHandlerInstance for object ID and type
func (*State) GetReconnectError ¶ added in v0.5.7
GetReconnectError from latest finished reconnect attempt
func (*State) GetSessionVariable ¶
func (state *State) GetSessionVariable(localData interface{}) SessionVariables
GetSessionVariable populates and returns session variables struct
func (*State) GetSheet ¶ added in v0.5.7
func (state *State) GetSheet(actionState *action.State, upLink *enigmahandlers.SenseUplink, id string) (*enigmahandlers.Object, *senseobjects.Sheet, error)
GetSheet get sheet and add to object list
func (*State) GetSheetList ¶ added in v0.5.7
func (state *State) GetSheetList(actionState *action.State, uplink *enigmahandlers.SenseUplink)
GetSheetList create and update sheetlist session object if not existing
func (*State) IsAbortTriggered ¶
IsAbortTriggered check if abort has been flagged
func (*State) IsSenseWebsocketDisconnected ¶ added in v0.6.0
IsSenseWebsocketDisconnected checks if error is caused by websocket disconnect
func (*State) LogError ¶ added in v0.14.11
LogError error log using current LogEntry (remember normaly errors should be added to actionstate if available)
func (*State) LogTrafficMetric ¶ added in v0.14.11
func (state *State) LogTrafficMetric(responseTime int64, sent, received uint64, requestID int, method, params, trafficType, msg string)
LogTrafficMetric traffic metric log using current LogEntry
func (*State) Once ¶ added in v0.15.1
Once executes the function with matching string once (per session)
func (*State) QueueRequest ¶
func (state *State) QueueRequest(f func(ctx context.Context) error, actionState *action.State, failOnError bool, errMsg string)
QueueRequest Async request, add error to action state or log as warning depending on failOnError flag. This method adds timeout and ChangeList to ctx context and auto triggers changes. Thus ctx should not be used when having multiple request in a QueueRequest function, instead use SendRequest and SendRequestRaw internally in f. Changes can also be handled "manually" with the help of TriggerContextChanges.
func (*State) QueueRequestRaw ¶ added in v0.17.2
func (state *State) QueueRequestRaw(f func(ctx context.Context) (json.RawMessage, error), actionState *action.State, failOnError bool, errMsg string)
QueueRequestRaw same as QueueRequestAsync but accepts function returning (json.RawMessage, error), to be used when sending Raw functions where the response is not actually used
func (*State) QueueRequestWithCallback ¶
func (state *State) QueueRequestWithCallback(f func(ctx context.Context) error, actionState *action.State, failOnError bool, errMsg string, callback func(err error))
QueueRequestWithCallback Async request, add error to action state or log as warning depending on failOnError flag. This method adds timeout and ChangeList to ctx context and auto triggers changes. Thus ctx should not be used when having multiple request in a QueueRequest function, instead use SendRequest and SendRequestRaw internally in f. Changes can also be handled "manually" with the help of TriggerContextChanges.
func (*State) Randomizer ¶
func (state *State) Randomizer() helpers.Randomizer
Randomizer get randomizer for session
func (*State) ReOpenDoc ¶ added in v0.16.5
func (state *State) ReOpenDoc(actionState *action.State, upLink *enigmahandlers.SenseUplink) (*enigma.Doc, error)
ReOpenDoc get active doc from engine
func (*State) RegisterEvent ¶
func (state *State) RegisterEvent(handle int, event func(ctx context.Context, actionState *action.State) error, onClose func(), failOnError bool)
RegisterEvent register function to be executed on object change
func (*State) ReplaceSessionVariables ¶
ReplaceSessionVariables execute template and replace session variables, e.g. "my app ({{.UserName}})" -> "my app (user_1)"
func (*State) ReplaceSessionVariablesWithLocalData ¶
func (state *State) ReplaceSessionVariablesWithLocalData(input *synced.Template, localData interface{}) (string, error)
ReplaceSessionVariablesWithLocalData execute template and replace session variables, e.g. "my app ({{.UserName}})" -> "my app (user_1)", extra "local" data can be added in addition to the session variables
func (*State) ReqContext ¶
func (state *State) ReqContext() (context.Context, *enigma.ChangeLists, context.CancelFunc)
ReqContext context to be used on request, includes timeout and changeList to be used for synchronizing changes. A request context is automatically added when using QueueRequest functions.
func (*State) Reset ¶
Reset session, to be used when an existing session state enters a new "sequence"
func (*State) SendRequest ¶
SendRequest and trigger any object changes synchronously
func (*State) SendRequestRaw ¶
func (state *State) SendRequestRaw(actionState *action.State, f func(ctx context.Context) (json.RawMessage, error)) (json.RawMessage, error)
SendRequestRaw send request, trigger any object changes synchronously and return raw json response.
func (*State) SetLogEntry ¶
SetLogEntry set the log entry
func (*State) SetRandomizer ¶
func (state *State) SetRandomizer(rnd helpers.Randomizer, force bool)
SetRandomizer set randomizer for session, will not be set if already has a randomizer on concurrent sets, first instance to acquire lock will "win". When setting to nil, it will be automatically forced. Set force flag to have randomizer set even when a randomizer exists.
func (*State) SetReconnectFunc ¶ added in v0.5.7
SetReconnectFunc sets current app re-connect function
func (*State) SetTargetEnv ¶ added in v0.18.0
SetTargetEnv set current target environment
func (*State) SetVariableValue ¶ added in v0.11.0
SetVariableValue to session variable map
func (*State) SetupChangeChan ¶ added in v0.5.7
SetupChangeChan start listening to enigma change channel
func (*State) SetupEventWebsocketAsync ¶ added in v0.6.0
func (state *State) SetupEventWebsocketAsync(actionState *action.State, nurl neturl.URL, allowuntrusted bool)
SetupEventWebsocketAsync setup event websocket and listener
func (*State) TrafficLogger ¶
func (state *State) TrafficLogger() enigmahandlers.ITrafficLogger
TrafficLogger returns the current trafficLogger
func (*State) TriggerContextChanges ¶
TriggerContextChanges gets ChangeList from context and triggers changes
func (*State) TriggerEvents ¶
TriggerEvents from change and close lists
func (*State) UpdateFeatureMap ¶ added in v0.6.23
UpdateFeatureMap request features from server and updates feature map
type TabbedContainerChildReference ¶ added in v0.18.17
type TabbedContainerHandler ¶ added in v0.18.17
type TabbedContainerHandler struct{}
func (*TabbedContainerHandler) Instance ¶ added in v0.18.17
func (handler *TabbedContainerHandler) Instance(id string) ObjectHandlerInstance
Instance implements ObjectHandler interface
type TabbedContainerHandlerInstance ¶ added in v0.18.17
type TabbedContainerHandlerInstance struct { ID string ActiveID string DefaultID string CachedID string // contains filtered or unexported fields }
func (*TabbedContainerHandlerInstance) FirstShowableChild ¶ added in v0.18.17
func (handler *TabbedContainerHandlerInstance) FirstShowableChild() (*TabbedContainerChildReference, bool)
FirstShowableChild gets reference to first object from container which fulfills conditions, true if already active object
func (*TabbedContainerHandlerInstance) GetObjectDefinition ¶ added in v0.18.17
func (handler *TabbedContainerHandlerInstance) GetObjectDefinition(objectType string) (string, senseobjdef.SelectType, senseobjdef.DataDefType, error)
GetObjectDefinition implements ObjectHandlerInstance interface
func (*TabbedContainerHandlerInstance) SetObjectAndEvents ¶ added in v0.18.17
func (handler *TabbedContainerHandlerInstance) SetObjectAndEvents(sessionState *State, actionState *action.State, obj *enigmahandlers.Object, genObj *enigma.GenericObject)
SetObjectAndEvents implements ObjectHandlerInstance interface
func (*TabbedContainerHandlerInstance) SwitchActiveChild ¶ added in v0.18.17
func (handler *TabbedContainerHandlerInstance) SwitchActiveChild(sessionState *State, actionState *action.State, child *TabbedContainerChildReference)
func (*TabbedContainerHandlerInstance) UpdateChildren ¶ added in v0.18.17
func (handler *TabbedContainerHandlerInstance) UpdateChildren(layout *TabbedContainerLayout) error
type TabbedContainerLayout ¶ added in v0.18.17
type TabbedContainerLayout struct { Objects []TabbedContainerLayoutObjects `json:"objects"` ChildList TabbedContainerLayoutChildList `json:"qChildList"` DefaultTabId string `json:"defaultTabId"` ShowTabs bool `json:"showTabs"` CachedTabId string `json:"cachedTabId"` }
func GetTabbedContainerLayout ¶ added in v0.18.17
func GetTabbedContainerLayout(sessionState *State, actionState *action.State, containerObject *enigma.GenericObject) *TabbedContainerLayout
GetTabbedContainerLayout returns unmarshaled tabbed container layout, errors reported on action state
type TabbedContainerLayoutChildList ¶ added in v0.18.17
type TabbedContainerLayoutChildList struct {
Items []TabbedContainerLayoutChildListItems `json:"qItems"`
}
type TabbedContainerLayoutChildListItems ¶ added in v0.18.17
type TabbedContainerLayoutChildListItems struct { Info enigma.NxInfo `json:"qInfo"` Meta interface{} `json:"qMeta"` Data TabbedContainerLayoutChildListItemsData `json:"qData"` }
type TabbedContainerLayoutChildListItemsData ¶ added in v0.18.17
type TabbedContainerLayoutObjects ¶ added in v0.18.17
type TemplateArtifactMap ¶ added in v0.17.13
type TemplateArtifactMap struct {
// contains filtered or unexported fields
}
func (*TemplateArtifactMap) GetIDByTypeAndName ¶ added in v0.17.13
func (artifacts *TemplateArtifactMap) GetIDByTypeAndName(artifactType, name string) (string, error)
func (*TemplateArtifactMap) GetNameByTypeAndID ¶ added in v0.17.13
func (artifacts *TemplateArtifactMap) GetNameByTypeAndID(artifactType, id string) (string, error)