Documentation ¶
Index ¶
- Constants
- Variables
- func CreateChild(doc *enigma.Doc, parentInfo enigma.NxInfo, prop json.RawMessage) (reflect.Value, error)
- func CreateObject(doc *enigma.Doc, qtype string, prop json.RawMessage) (reflect.Value, error)
- func DestroyObject(doc *enigma.Doc, qtype string, qid string) (reflect.Value, error)
- func GetCurrentSelection(doc *enigma.Doc, stateName string) (*enigma.SelectionObject, *util.Result)
- func GetHyperCubeData(obj *enigma.GenericObject, sz enigma.Size) ([]*enigma.NxDataPage, *util.Result)
- func GetHyperCubePivotData(obj *enigma.GenericObject, sz enigma.Size) ([]*enigma.NxPivotPage, *util.Result)
- func GetListObject(doc *enigma.Doc, stateName, fieldName string) (*enigma.ListObject, *util.Result)
- func GetObject(doc *enigma.Doc, qtype string, qid string) (reflect.Value, error)
- func GetTitle(parentInfo *enigma.NxInfo, obj *ObjectPropeties, logger *zerolog.Logger) (*string, *string)
- func GetTitleEx(obj enigma.GenericObject, objLayout ObjectLayoutEx) (*string, *string, *util.Result)
- func HasMethodOn(any reflect.Value, name string) bool
- func Invoke(any interface{}, name string, args ...interface{}) (Results []reflect.Value, err error)
- func Invoke1ErrOn(any reflect.Value, name string, args ...interface{}) error
- func Invoke1Res1Err(any interface{}, name string, args ...interface{}) (Result reflect.Value, err error)
- func Invoke1Res1ErrOn(any reflect.Value, name string, args ...interface{}) (Result reflect.Value, err error)
- func InvokeOn(any reflect.Value, name string, args ...interface{}) (Results []reflect.Value, err error)
- func Paging(rect enigma.Rect) []*enigma.NxPage
- func PivotPaging(rect enigma.Rect) []*enigma.NxPage
- func RecursiveCreateObject(doc *enigma.Doc, prop ObjectPropeties, parent *enigma.NxInfo) (*enigma.GenericObject, *util.Result)
- func SetStringVariable(doc *enigma.Doc, name string, value string) error
- func SetVariable(doc *enigma.Doc, name string, value string) error
- type AppLayoutMeta
- type AppMeta
- type AppObjectList
- type AuditLogEntry
- type AuditLogTimeStamp
- type AuthMethod
- type BookmarkEntry
- type BookmarkList
- type BookmarkMeta
- type ColumnInfo
- type Config
- type Conn
- type ContainerChildInfo
- type ContainerChildItem
- type DimensionList
- type HubUri
- type MeasureList
- type NxContainerEntry
- type NxMeta
- type ObjectChildEx
- type ObjectLayoutEx
- type ObjectLayoutTotals
- type ObjectPropeties
- type ServerType
- type SessionBookmark
- type SessionObjectLayout
- type VariableList
Constants ¶
View Source
const ( AUTH_MODE_JWT AuthMethod = "jwt" AUTH_MODE_CERT AuthMethod = "cert" AUTH_MODE_DESKTOP AuthMethod = "desktop" ST_ON_PREM ServerType = "on_prem" ST_CLOUD ServerType = "cloud" )
View Source
const ( MASTER_OBJECT string = "masterobject" STORY string = "story" CONNECTION string = "connection" )
Variables ¶
View Source
var ( GetObjMethods = map[string]string{ "sheet": "GetObject", "measure": "GetMeasure", "dimension": "GetDimension", "variable": "GetVariableById", "bookmark": "GetBookmark", } CreateObjMethods = map[string]string{ "sheet": "CreateObjectRaw", "measure": "CreateMeasureRaw", "dimension": "CreateDimensionRaw", "variable": "CreateVariableExRaw", "bookmark": "CreateBookmarkRaw", } DestroyObjMethods = map[string]string{ "sheet": "DestroyObject", "measure": "DestroyMeasure", "dimension": "DestroyDimension", "variable": "DestroyVariableById", "bookmark": "DestroyBookmark", } SessionObjDef = []byte(` { "qInfo": { "qId": "", "qType": "SessionLists" }, "qAppObjectListDef": { "qType": "sheet", "qData": { "id": "/qInfo/qId" } }, "qDimensionListDef": { "qType": "dimension", "qData": { "id": "/qInfo/qId" } }, "qMeasureListDef": { "qType": "measure", "qData": { "id": "/qInfo/qId" } }, "qBookmarkListDef": { "qType": "bookmark", "qData": { "id": "/qInfo/qId" } }, "qVariableListDef": { "qType": "variable", "qData": { "id": "/qInfo/qId" } } } `) SessionDimListDefData = []byte(` { "title": "/qMetaDef/title", "tags": "/qMetaDef/tags", "grouping": "/qDim/qGrouping", "info": "/qDimInfos", "labelExpression": "/qDim/qLabelExpression" }`) )
View Source
var ( // ConnCtx is used for Engine requests per session/connection; ConnCtx context.Context )
View Source
var (
PAGE_MAX_CELLS int = 4096
)
View Source
var SessionBookmarkListDef = []byte(`
{
"qInfo": {
"qId": "BookmarkList",
"qType": "BookmarkList"
},
"qBookmarkListDef": {
"qType": "bookmark",
"qData": {
"sheetId": "/sheetId",
"selectionFields": "/selectionFields",
"creationDate": "/creationDate"
}
}
}
`)
Functions ¶
func CreateChild ¶
func CreateChild(doc *enigma.Doc, parentInfo enigma.NxInfo, prop json.RawMessage) (reflect.Value, error)
func CreateObject ¶
func DestroyObject ¶
func GetCurrentSelection ¶
func GetHyperCubeData ¶
func GetHyperCubePivotData ¶
func GetListObject ¶
func GetTitle ¶
func GetTitle(parentInfo *enigma.NxInfo, obj *ObjectPropeties, logger *zerolog.Logger) (*string, *string)
return title, description
func GetTitleEx ¶
func GetTitleEx(obj enigma.GenericObject, objLayout ObjectLayoutEx) (*string, *string, *util.Result)
func Invoke1Res1Err ¶
func Invoke1Res1ErrOn ¶
func PivotPaging ¶
func PivotPaging(rect enigma.Rect) []*enigma.NxPage
func RecursiveCreateObject ¶
func RecursiveCreateObject(doc *enigma.Doc, prop ObjectPropeties, parent *enigma.NxInfo) (*enigma.GenericObject, *util.Result)
func SetStringVariable ¶
func SetVariable ¶
Types ¶
type AppLayoutMeta ¶
type AppLayoutMeta struct { ID string `json:"id,omitempty"` CreatedDate string `json:"createdDate,omitempty"` ModifiedDate string `json:"modifiedDate,omitempty"` Published bool `json:"published"` PublishTime string `json:"publishTime,omitempty"` Privileges []string `json:"privileges,omitempty"` DynamicColor string `json:"dynamicColor,omitempty"` Title string `json:"qTitle,omitempty"` FileName string `json:"qFileName,omitempty"` LastReloadTime string `json:"qLastReloadTime,omitempty"` Modified bool `json:"qModified,omitempty"` HasScript bool `json:"qHasScript,omitempty"` StateNames []string `json:"qStateNames,omitempty"` Meta *AppMeta `json:"qMeta,omitempty"` LocaleInfo *enigma.LocaleInfo `json:"qLocaleInfo,omitempty"` HasData bool `json:"qHasData,omitempty"` ReadOnly bool `json:"qReadOnly,omitempty"` IsOpenedWithoutData bool `json:"qIsOpenedWithoutData,omitempty"` IsSessionApp bool `json:"qIsSessionApp,omitempty"` Thumbnail *enigma.StaticContentUrl `json:"qThumbnail,omitempty"` IsBDILiveMode bool `json:"qIsBDILiveMode,omitempty"` Prop *enigma.NxAppProperties `json:"qProp,omitempty"` }
type AppMeta ¶
type AppMeta struct { Name string `json:"qName,omitempty"` Prop *enigma.NxAppProperties `json:"qProp,omitempty"` }
type AppObjectList ¶
type AppObjectList struct {
Items []*NxContainerEntry `json:"qItems,omitempty"`
}
type AuditLogEntry ¶
type AuditLogEntry struct { ProductVersion string `csv:"ProductVersion"` Timestamp AuditLogTimeStamp `csv:"Timestamp"` Hostname string `csv:"Hostname"` Id string `csv:"Id"` EngineTimestamp AuditLogTimeStamp `csv:"EngineTimestamp"` EngineVersion string `csv:"EngineVersion"` Description string `csv:"Description"` ProxySessionId string `csv:"ProxySessionId"` ProxyPackageId string `csv:"ProxyPackageId"` RequestSequenceId string `csv:"RequestSequenceId"` UserDirectory string `csv:"UserDirectory"` UserId string `csv:"UserId"` SessionId string `csv:"SessionId"` ObjectId string `csv:"ObjectId"` ObjectName string `csv:"ObjectName"` Service string `csv:"Service"` Origin string `csv:"Origin"` Context string `csv:"Context"` Command string `csv:"Command"` Result string `csv:"Result"` Message string `csv:"Message"` Id2 string `csv:"Id2"` }
func ReadAuditLogFile ¶
func ReadAuditLogFile(file string) ([]AuditLogEntry, *util.Result)
type AuditLogTimeStamp ¶
func (*AuditLogTimeStamp) UnmarshalCSV ¶
func (date *AuditLogTimeStamp) UnmarshalCSV(csv string) (err error)
type AuthMethod ¶
type AuthMethod string
type BookmarkEntry ¶
type BookmarkEntry struct { Info *enigma.NxInfo `json:"qInfo,omitempty"` Meta *BookmarkMeta `json:"qMeta,omitempty"` Data json.RawMessage `json:"qData,omitempty"` }
func GetBookmarks ¶
func GetBookmarks(doc *enigma.Doc) ([]*BookmarkEntry, *util.Result)
type BookmarkList ¶
type BookmarkList struct {
Items []*NxContainerEntry `json:"qItems,omitempty"`
}
type BookmarkMeta ¶
type BookmarkMeta struct {
Title string `json:"title,omitempty"`
}
type ColumnInfo ¶
type ColumnInfo struct { FallbackTitle string ApprMaxGlyphCount int NumFormat *enigma.FieldAttributes AttrExprInfo []*enigma.NxAttrExprInfo AttrDimInfo []*enigma.NxAttrDimInfo Error *enigma.NxValidationError }
func NewColumnInfoFromDimension ¶
func NewColumnInfoFromDimension(dim *enigma.NxDimensionInfo) *ColumnInfo
func NewColumnInfoFromMeasure ¶
func NewColumnInfoFromMeasure(m *enigma.NxMeasureInfo) *ColumnInfo
type Config ¶
type Config struct { EngineURI string `json:"engine_uri,omitempty" yaml:"engine_uri,omitempty" bson:"engine_uri,omitempty"` AppID string `json:"app_id,omitempty" yaml:"app_id,omitempty" bson:"app_id,omitempty"` QRSBaseURI string `json:"qrs_base_uri,omitempty" yaml:"qrs_base_uri,omitempty" bson:"qrs_base_uri,omitempty"` //if ServerType is ST_CLOUD, this field is base URL of the QCS tenant e.g. https://tenant.eu.qlikcloud.com HubURI *HubUri `json:"hub_uri,omitempty" yaml:"hub_uri,omitempty" bson:"hub_uri,omitempty"` UserName string `json:"user_id,omitempty" yaml:"user_id,omitempty" bson:"user_name,omitempty"` UserDirectory string `json:"user_ad,omitempty" yaml:"user_ad,omitempty" bson:"user_directory,omitempty"` AuthMode AuthMethod `json:"auth_mode,omitempty" yaml:"auth_mode,omitempty" bson:"auth_mode,omitempty"` ServerType ServerType `json:"server_type,omitempty" yaml:"server_type,omitempty" bson:"server_type,omitempty"` JWT string `json:"jwt,omitempty" yaml:"jwt,omitempty" bson:"jwt,omitempty"` Certs crypto.Certificates `json:"certs,omitempty" yaml:"certs,omitempty" bson:"certs,omitempty"` RandomProxySession bool `json:"random_proxy_session" yaml:"random_proxy_session" bson:"random_proxy_session"` }
Config contains connection info used to make wss to Engine.
type Conn ¶
type Conn struct { Global *enigma.Global `json:"-"` Cfg Config `json:"config"` }
Conn creates wss connection to Engine
type ContainerChildInfo ¶
type ContainerChildItem ¶
type ContainerChildItem struct { Entry *enigma.NxContainerEntry Info *ContainerChildInfo }
type DimensionList ¶
type DimensionList struct {
Items []*NxContainerEntry `json:"qItems,omitempty"`
}
func GetDimensionList ¶
func GetDimensionList(doc *enigma.Doc) (*DimensionList, *util.Result)
type HubUri ¶
type HubUri struct { Host string `json:"host,omitempty" yaml:"host,omitempty" bson:"host,omitempty"` Port int `json:"port,omitempty" yaml:"port,omitempty" bson:"port,omitempty"` Prefix string `json:"prefix,omitempty" yaml:"prefix,omitempty" bson:"prefix,omitempty"` IsSecure bool `json:"isSecure,omitempty" yaml:"isSecure,omitempty" bson:"isSecure,omitempty"` }
type MeasureList ¶
type MeasureList struct { // Information about the list of measures. Items []*NxContainerEntry `json:"qItems,omitempty"` }
type NxContainerEntry ¶
type NxContainerEntry struct { Info *enigma.NxInfo `json:"qInfo,omitempty"` Meta *NxMeta `json:"qMeta,omitempty"` Data json.RawMessage `json:"qData,omitempty"` }
func GetObjectList ¶
func GetObjectList(doc *enigma.Doc, ctx context.Context, objType string) ([]*NxContainerEntry, error)
type NxMeta ¶
type NxMeta struct { Title *string `json:"title,omitempty"` Description *string `json:"description,omitempty"` CreatedDate *string `json:"createdDate,omitempty"` ModifiedDate *string `json:"modifiedDate,omitempty"` Published bool `json:"published,omitempty"` PublishTime *string `json:"publishTime,omitempty"` Privileges []string `json:"privileges,omitempty"` Approved bool `json:"approved,omitempty"` DynamicColor *string `json:"dynamicColor,omitempty"` }
type ObjectChildEx ¶
type ObjectLayoutEx ¶
type ObjectLayoutEx struct { enigma.GenericObjectLayout Children []*ObjectChildEx `json:"children"` Footnote string `json:"footnote"` Title string `json:"title"` Subtitle string `json:"subtitle"` Totals *ObjectLayoutTotals `json:"totals,omitempty"` ColumnInfos []*ColumnInfo `json:"-"` }
func GetObjectLayoutEx ¶
func GetObjectLayoutEx(obj *enigma.GenericObject) (*ObjectLayoutEx, *util.Result)
type ObjectLayoutTotals ¶
type ObjectPropeties ¶
type ObjectPropeties struct { Info *enigma.NxInfo `json:"qInfo"` Meta *NxMeta `json:"qMeta"` Properties json.RawMessage `json:"qProperties"` ChildInfos []*ObjectPropeties `json:"qChildInfos"` }
func GetSheetsObjectProperties ¶
func GetSheetsObjectProperties(doc *enigma.Doc) ([]*ObjectPropeties, *util.Result)
func RecursiveGetProperties ¶
func RecursiveGetProperties(doc *enigma.Doc, entry NxContainerEntry) (*ObjectPropeties, error)
func (*ObjectPropeties) GetChild ¶
func (p *ObjectPropeties) GetChild(id string) (*ObjectPropeties, bool)
type ServerType ¶
type ServerType string
type SessionBookmark ¶
type SessionBookmark struct { Info *enigma.NxInfo `json:"qInfo,omitempty"` Meta *NxMeta `json:"qMeta,omitempty"` SheetId string `json:"sheetId,omitempty"` SelectionFields string `json:"selectionFields,omitempty"` Bookmark *enigma.NxBookmark `json:"qBookmark,omitempty"` }
func GetSessionBookmarks ¶
func GetSessionBookmarks(doc *enigma.Doc) ([]SessionBookmark, *util.Result)
type SessionObjectLayout ¶
type SessionObjectLayout struct { Info *enigma.NxInfo `json:"qInfo,omitempty"` Meta *NxMeta `json:"qMeta,omitempty"` ExtendsId string `json:"qExtendsId,omitempty"` HasSoftPatches bool `json:"qHasSoftPatches,omitempty"` Error *enigma.NxLayoutErrors `json:"qError,omitempty"` SelectionInfo *enigma.NxSelectionInfo `json:"qSelectionInfo,omitempty"` StateName string `json:"qStateName,omitempty"` AppObjectList *AppObjectList `json:"qAppObjectList,omitempty"` BookmarkList *BookmarkList `json:"qBookmarkList,omitempty"` DimensionList *DimensionList `json:"qDimensionList,omitempty"` MeasureList *MeasureList `json:"qMeasureList,omitempty"` VariableList *VariableList `json:"qVariableList,omitempty"` MediaList *enigma.MediaList `json:"qMediaList,omitempty"` NxLibraryDimension *enigma.NxLibraryDimension `json:"qNxLibraryDimension,omitempty"` NxLibraryMeasure *enigma.NxLibraryMeasure `json:"qNxLibraryMeasure,omitempty"` SelectionObject *enigma.SelectionObject `json:"qSelectionObject,omitempty"` StaticContentUrl *enigma.StaticContentUrl `json:"qStaticContentUrl,omitempty"` TreeData *enigma.TreeData `json:"qTreeData,omitempty"` UndoInfo *enigma.UndoInfo `json:"qUndoInfo,omitempty"` ChildList *enigma.ChildList `json:"qChildList,omitempty"` EmbeddedSnapshot *enigma.EmbeddedSnapshot `json:"qEmbeddedSnapshot,omitempty"` ExtensionList *enigma.ExtensionList `json:"qExtensionList,omitempty"` FieldList *enigma.FieldList `json:"qFieldList,omitempty"` HyperCube *enigma.HyperCube `json:"qHyperCube,omitempty"` ListObject *enigma.ListObject `json:"qListObject,omitempty"` }
func GetSessionObjectLayout ¶
func GetSessionObjectLayout(doc *enigma.Doc) (*SessionObjectLayout, *util.Result)
type VariableList ¶
type VariableList struct { // List of the variables. Items []*NxContainerEntry `json:"qItems,omitempty"` }
Click to show internal directories.
Click to hide internal directories.