Documentation ¶
Index ¶
- Constants
- Variables
- func CapSize(sz *enigma.Size, cap enigma.Size)
- 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 FlattenObject[T any](obj *ObjWalkResult[T], m ListWalkResult[T])
- func GetCurrentSelection(doc *enigma.Doc, stateName string) (*enigma.SelectionObject, *util.Result)
- func GetHyperCube(obj *enigma.GenericObject, sz enigma.Size) (*enigma.HyperCube, *util.Result)
- func GetHyperCubeData(obj *enigma.GenericObject, sz enigma.Size, pagingFuncs ...PagingMethod) ([]*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 HyperCubeDiff(path string, from, to *enigma.HyperCube) (*util.Diff, *util.Result)
- 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 AppProperties
- type AppWalkResult
- func AppSnapshotDiff(from, to AppWalkResult[ObjectSnapshot]) (AppWalkResult[util.Diff], *util.Result)
- func RecursiveGetSnapshots(doc *enigma.Doc, cfg MixedConfig, opts *WalkOptions, _logger *zerolog.Logger) (AppWalkResult[ObjectSnapshot], *util.Result)
- func WalkApp[T any](doc *enigma.Doc, cfg MixedConfig, opts *WalkOptions, ...) (AppWalkResult[T], *util.Result)
- type AppWalker
- type AppsHealthInfo
- type AuditLogEntry
- type AuditLogTimeStamp
- type AuthMethod
- type BookmarkEntry
- type BookmarkList
- type BookmarkMeta
- type CPUHealthInfo
- type CacheHealthInfo
- type Cluster
- type ColumnInfo
- type Config
- type Conn
- type ContainerChildInfo
- type ContainerChildItem
- type DimensionList
- type FilterOptions
- type HealthInfo
- type HttpClient
- func (c *HttpClient) Do(method string, endpoint string, params map[string]string, body interface{}) ([]byte, *util.Result)
- func (c *HttpClient) DoRequest(req *http.Request) ([]byte, *util.Result)
- func (c *HttpClient) Get(endpoint string, params map[string]string) ([]byte, *util.Result)
- func (c *HttpClient) GetHealthInfo() (*HealthInfo, *util.Result)
- func (c *HttpClient) GetUrl(endpoint string) string
- func (c *HttpClient) NewRequest(method string, endpoint string, params map[string]string, body interface{}) (*http.Request, *util.Result)
- type HubUri
- type ListWalkFuncMap
- type ListWalkResult
- type MeasureList
- type MemHealthInfo
- type MixedConfig
- type NxContainerEntry
- type NxMeta
- type ObjWalkEntry
- type ObjWalkFunc
- type ObjWalkResult
- type ObjWalker
- type ObjectChildEx
- type ObjectLayoutEx
- type ObjectLayoutTotals
- type ObjectPropeties
- type ObjectSnapshot
- type PagingMethod
- type ServerType
- type SessionBookmark
- type SessionDimensionData
- type SessionDimensionLayout
- type SessionHealthInfo
- type SessionMeasureData
- type SessionMeasureLayout
- type SessionObjectLayout
- type UsersHealthInfo
- type VariableList
- type WalkOptions
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 ( RandomMethod string = "random" HashAppMethod string = "hash_app" HashUserMethod string = "hash_user" InMemAppMethod string = "in_mem_app" )
View Source
const ( MASTER_OBJECT string = "masterobject" STORY string = "story" CONNECTION string = "connection" ANY_LIST string = "AnyList" SHEET_LIST string = "AppObjectList" BM_LIST string = "BookmarkList" DIM_LIST string = "DimensionList" MEASURE_LIST string = "MeasureList" VAR_LIST string = "VariableList" )
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", } ObjectListNameMap = map[string]string{ "AppObjectList": "AppObject", "BookmarkList": "Bookmark", "connection": "Connection", "DimensionList": "Dimension", "masterobject": "MasterObject", "MeasureList": "Measure", "story": "Story", "VariableList": "Variable", } )
View Source
var ( 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(`{"qDim": "/qDim", "qDimInfos": "/qDimInfos"}`) SessionMeasureListDefData = []byte(`{"qMeasure": "/qMeasure"}`) )
View Source
var ( // ConnCtx is used for Engine requests per session/connection; ConnCtx context.Context )
View Source
var (
PAGE_MAX_CELLS int = 8192
)
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 FlattenObject ¶ added in v0.5.1
func FlattenObject[T any](obj *ObjWalkResult[T], m ListWalkResult[T])
func GetCurrentSelection ¶
func GetHyperCube ¶ added in v0.5.1
sz contains size cap when get hypercube data if sz.Cx or sz.Cy is greater than 0, it sets upper limit of column/row to get
func GetHyperCubeData ¶
func GetHyperCubeData(obj *enigma.GenericObject, sz enigma.Size, pagingFuncs ...PagingMethod) ([]*enigma.NxDataPage, *util.Result)
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 HyperCubeDiff ¶ added in v0.7.5
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"` }
func (*AppLayoutMeta) RemoveVolatileFields ¶ added in v0.5.0
func (l *AppLayoutMeta) RemoveVolatileFields()
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 AppProperties ¶ added in v0.5.0
type AppProperties struct { CreatedDate *string `json:"createdDate,omitempty"` ModifiedDate *string `json:"modifiedDate,omitempty"` enigma.NxAppProperties }
func (*AppProperties) RemoveVolatileFields ¶ added in v0.5.0
func (p *AppProperties) RemoveVolatileFields()
type AppWalkResult ¶ added in v0.5.0
type AppWalkResult[T any] map[string]ListWalkResult[T] // listName => Objects Infos of list
func AppSnapshotDiff ¶ added in v0.5.1
func AppSnapshotDiff(from, to AppWalkResult[ObjectSnapshot]) (AppWalkResult[util.Diff], *util.Result)
func RecursiveGetSnapshots ¶ added in v0.5.0
func RecursiveGetSnapshots(doc *enigma.Doc, cfg MixedConfig, opts *WalkOptions, _logger *zerolog.Logger) (AppWalkResult[ObjectSnapshot], *util.Result)
func WalkApp ¶ added in v0.5.0
func WalkApp[T any](doc *enigma.Doc, cfg MixedConfig, opts *WalkOptions, walkers ListWalkFuncMap[T], _logger *zerolog.Logger) (AppWalkResult[T], *util.Result)
type AppWalker ¶ added in v0.5.0
type AppWalker[T any] struct { Walkers ListWalkFuncMap[T] Logger *zerolog.Logger }
func (*AppWalker[T]) Walk ¶ added in v0.5.0
func (w *AppWalker[T]) Walk(doc *enigma.Doc, cfg MixedConfig, opts *WalkOptions) (AppWalkResult[T], *util.Result)
func (*AppWalker[T]) WalkSheets ¶ added in v0.5.0
func (w *AppWalker[T]) WalkSheets(doc *enigma.Doc, cfg MixedConfig, opts *WalkOptions, walker ObjWalkFunc[T]) (AppWalkResult[T], *util.Result)
type AppsHealthInfo ¶ added in v0.7.5
type AppsHealthInfo struct { ActiveDocs []string `json:"active_docs,omitempty" yaml:"active_docs,omitempty"` LoadedDocs []string `json:"loaded_docs,omitempty" yaml:"loaded_docs,omitempty"` InMemoryDocs []string `json:"in_memory_docs,omitempty" yaml:"in_memory_docs,omitempty"` Calls int64 `json:"calls" yaml:"calls"` Selections int64 `json:"selections" yaml:"selections"` }
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 CPUHealthInfo ¶ added in v0.7.5
type CPUHealthInfo struct {
Total int `json:"total" yaml:"total"`
}
type CacheHealthInfo ¶ added in v0.7.5
type Cluster ¶ added in v0.7.3
type Cluster struct { Method string `json:"method" yaml:"method"` Nodes []*Config `json:"nodes" yaml:"nodes"` Logger *zerolog.Logger // contains filtered or unexported fields }
func (Cluster) PickOneFor ¶ added in v0.7.3
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_id,omitempty"` UserDirectory string `json:"user_directory,omitempty" yaml:"user_directory,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"` Cookie http.CookieJar `json:"-" yaml:"-" bson:"-"` // used when connect to cloud }
Config contains connection info used to make wss to Engine.
func (Config) GetHttpsBaseUrl ¶ added in v0.7.5
type Conn ¶
type Conn struct { Global *enigma.Global `json:"-"` Cfg Config `json:"config"` }
Conn creates wss connection to Engine
func NewConnFromCluster ¶ added in v0.7.5
func NewConnFromRAC ¶ added in v0.7.5
type ContainerChildInfo ¶
type ContainerChildItem ¶
type ContainerChildItem struct { Entry *enigma.NxContainerEntry Info *ContainerChildInfo }
type DimensionList ¶
type DimensionList struct {
Items []*NxContainerEntry `json:"qItems,omitempty"`
}
type FilterOptions ¶ added in v0.7.5
type FilterOptions struct { SheetBlackList []string `json:"sheet_black_list,omitempty" yaml:"sheet_black_list"` ObjectBlackList []string `json:"object_black_list,omitempty" yaml:"object_black_list"` ObjectWhiteList []string `json:"object_white_list,omitempty" yaml:"object_white_list"` // contains filtered or unexported fields }
func (*FilterOptions) BuildMap ¶ added in v0.7.5
func (f *FilterOptions) BuildMap()
func (*FilterOptions) IsObjectBlackListed ¶ added in v0.7.5
func (f *FilterOptions) IsObjectBlackListed(object string) bool
func (*FilterOptions) IsObjectWhiteListed ¶ added in v0.7.5
func (f *FilterOptions) IsObjectWhiteListed(object string) bool
func (*FilterOptions) IsSheetBlackListed ¶ added in v0.7.5
func (f *FilterOptions) IsSheetBlackListed(sheet string) bool
type HealthInfo ¶ added in v0.7.5
type HealthInfo struct { Version string `json:"version" yaml:"version"` Started string `json:"started" yaml:"started"` Mem MemHealthInfo `json:"mem" yaml:"mem"` Cpu CPUHealthInfo `json:"cpu" yaml:"cpu"` Session SessionHealthInfo `json:"session" yaml:"session"` Apps AppsHealthInfo `json:"apps" yaml:"apps"` Users UsersHealthInfo `json:"users" yaml:"users"` Cache CacheHealthInfo `json:"cache" yaml:"cache"` Saturated bool `json:"saturated" yaml:"saturated"` }
type HttpClient ¶ added in v0.7.5
type HttpClient struct { BaseUrl *url.URL ExtraHeaders http.Header Logger *zerolog.Logger // contains filtered or unexported fields }
func NewHttpClient ¶ added in v0.7.5
func NewHttpClient(cfg Config) (*HttpClient, *util.Result)
func (*HttpClient) GetHealthInfo ¶ added in v0.7.5
func (c *HttpClient) GetHealthInfo() (*HealthInfo, *util.Result)
func (*HttpClient) GetUrl ¶ added in v0.7.5
func (c *HttpClient) GetUrl(endpoint string) string
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 ListWalkFuncMap ¶ added in v0.5.0
type ListWalkFuncMap[T any] map[string]ObjWalkFunc[T] // listName => ObjWalkFunc
type ListWalkResult ¶ added in v0.5.0
type ListWalkResult[T any] map[string]*ObjWalkResult[T] // objectId => Object Info
func FlattenList ¶ added in v0.5.1
func FlattenList[T any](list ListWalkResult[T]) ListWalkResult[T]
type MeasureList ¶
type MeasureList struct { // Information about the list of measures. Items []*NxContainerEntry `json:"qItems,omitempty"` }
type MemHealthInfo ¶ added in v0.7.5
type MixedConfig ¶ added in v0.7.5
type MixedConfig struct { AppId string `json:"app_id" yaml:"app_id" bson:"app_id"` OnPrem *Config `json:"on_prem,omitempty" yaml:"on_prem,omitempty" bson:"on_prem,omitempty"` OnPremCluster *Cluster `json:"on_prem_cluster,omitempty" yaml:"on_prem_cluster,omitempty" bson:"on_prem_cluster,omitempty"` QCS *rac.Config `json:"qcs,omitempty" yaml:"qcs,omitempty" bson:"qcs,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 ObjWalkEntry ¶ added in v0.7.0
type ObjWalkEntry struct { *WalkOptions Config *MixedConfig AppId *string Doc *enigma.Doc Item *NxContainerEntry SheetId string SheetName string Info *enigma.NxInfo Parent *enigma.NxInfo Logger *zerolog.Logger }
type ObjWalkFunc ¶ added in v0.5.0
type ObjWalkFunc[T any] func(e ObjWalkEntry) (*ObjWalkResult[T], *util.Result)
func NewRecurObjWalkFunc ¶ added in v0.5.0
func NewRecurObjWalkFunc[T any](walker ObjWalkFunc[T]) ObjWalkFunc[T]
func NewRecurObjWalkFuncSync ¶ added in v0.7.5
func NewRecurObjWalkFuncSync[T any](walker ObjWalkFunc[T]) ObjWalkFunc[T]
type ObjWalkResult ¶ added in v0.5.0
type ObjWalkResult[T any] struct { SheetId string `json:"sheet_id" yaml:"sheet_id"` SheetName string `json:"sheet_name" yaml:"sheet_name"` ObjectTitle *string `json:"object_title" yaml:"object_title"` Info *enigma.NxInfo `json:"info,omitempty" yaml:"info,omitempty"` Parent *enigma.NxInfo `json:"parent,omitempty" yaml:"parent,omitempty"` Meta *NxMeta `json:"meta,omitempty" yaml:"meta,omitempty"` Result *T `json:"result,omitempty" yaml:"result,omitempty"` ChildResults []*ObjWalkResult[T] `json:"child_results,omitempty" yaml:"child_results,omitempty"` }
func ObjSnapshoter ¶ added in v0.5.1
func ObjSnapshoter(e ObjWalkEntry) (*ObjWalkResult[ObjectSnapshot], *util.Result)
func RecurWalkObject ¶ added in v0.5.0
func RecurWalkObject[T any](e ObjWalkEntry, walker ObjWalkFunc[T]) (*ObjWalkResult[T], *util.Result)
func RecurWalkObjectSync ¶ added in v0.7.5
func RecurWalkObjectSync[T any](e ObjWalkEntry, walker ObjWalkFunc[T]) (*ObjWalkResult[T], *util.Result)
type ObjWalker ¶ added in v0.5.0
type ObjWalker[T any] struct { Walker ObjWalkFunc[T] Entry ObjWalkEntry }
func (*ObjWalker[T]) Walk ¶ added in v0.5.0
func (w *ObjWalker[T]) Walk(doc *enigma.Doc, info *enigma.NxInfo) (*ObjWalkResult[T], *util.Result)
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)
func (*ObjectPropeties) RemoveVolatileFields ¶ added in v0.5.0
func (p *ObjectPropeties) RemoveVolatileFields()
type ObjectSnapshot ¶ added in v0.5.0
type ObjectSnapshot struct { Title *string `json:"title,omitempty"` Description *string `json:"description,omitempty"` Properties json.RawMessage `json:"properties,omitempty"` HyperCube *enigma.HyperCube `json:"hypercube,omitempty"` Digest string `json:"digest,omitempty"` }
func (*ObjectSnapshot) Diff ¶ added in v0.5.1
func (from *ObjectSnapshot) Diff(to *ObjectSnapshot) (*util.Diff, *util.Result)
type PagingMethod ¶ added in v0.6.0
type PagingMethod func(rect enigma.Rect) []*enigma.NxPage
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 SessionDimensionData ¶ added in v0.4.0
type SessionDimensionData struct { Dim *enigma.NxLibraryDimension `json:"qDim,omitempty"` DimInfos []*enigma.GenericDimensionInfo `json:"qDimInfos,omitempty"` Title *string `json:"qTitle,omitempty"` }
type SessionDimensionLayout ¶ added in v0.4.0
type SessionDimensionLayout struct { Info *enigma.NxInfo `json:"qInfo,omitempty"` Meta *NxMeta `json:"qMeta,omitempty"` Dim *enigma.NxLibraryDimension `json:"qDim,omitempty"` DimInfos []*enigma.GenericDimensionInfo `json:"qDimInfos,omitempty"` }
func GetDimensionList ¶
func GetDimensionList(doc *enigma.Doc) ([]*SessionDimensionLayout, *util.Result)
type SessionHealthInfo ¶ added in v0.7.5
type SessionMeasureData ¶ added in v0.4.0
type SessionMeasureData struct { Measure *enigma.NxLibraryMeasure `json:"qMeasure,omitempty"` Title *string `json:"qTitle,omitempty"` }
type SessionMeasureLayout ¶ added in v0.4.0
type SessionMeasureLayout struct { Info *enigma.NxInfo `json:"qInfo,omitempty"` Measure *enigma.NxLibraryMeasure `json:"qMeasure,omitempty"` Meta *NxMeta `json:"qMeta,omitempty"` }
func GetMeasureList ¶ added in v0.4.0
func GetMeasureList(doc *enigma.Doc) ([]*SessionMeasureLayout, *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 UsersHealthInfo ¶ added in v0.7.5
type VariableList ¶
type VariableList struct { // List of the variables. Items []*NxContainerEntry `json:"qItems,omitempty"` }
type WalkOptions ¶ added in v0.7.5
type WalkOptions struct { Sync bool `json:"sync" yaml:"sync"` MaxWorkers int `json:"max_workers" yaml:"max_workers"` IgnoreError bool `json:"ignore_error" yaml:"ignore_error"` OpendocRetries int `json:"opendoc_retries" yaml:"opendoc_retries"` RetryDelay int `json:"retry_delay" yaml:"retry_delay"` Filter *FilterOptions `json:"filter" yaml:"filter"` }
func DefaultWalkOptions ¶ added in v0.7.5
func DefaultWalkOptions() *WalkOptions
func WalkOptionsForHuge ¶ added in v0.7.5
func WalkOptionsForHuge() *WalkOptions
Click to show internal directories.
Click to hide internal directories.