Documentation ¶
Index ¶
- Constants
- Variables
- func AddGeneratedStringToCode(code string) string
- func AddURLParameters(baseURL string, params map[string]string) (string, error)
- func CellIsUpdateable(cell Cell) bool
- func ExtractCellUpdateableProperty(decimalValue int, cellProperty CellUpdateableProperty) bool
- func ExtractDimensionHierarchyFromString(input string) (string, string)
- func ExtractNamesFromContent(content Content) []string
- func ExtractNamesFromContents(contents []Content) []string
- func RandomString(n int) string
- func SliceContains[T comparable](slice []T, value T) bool
- func UniqueStrings(input []string) []string
- type ActiveConfiguration
- type Attribute
- type AuthenticationMode
- type BatchRequest
- type BatchResponse
- type BatchResponses
- type BatchService
- type Cell
- type CellService
- func (cs *CellService) CellGet(params ...string) (interface{}, error)
- func (cs *CellService) CellPut(params ...interface{}) error
- func (cs *CellService) CreateCellSet(mdx string, sandboxName string) (string, error)
- func (cs *CellService) DeleteCellSet(cellsetID string) error
- func (cs *CellService) ExecuteMDXViaBlob(mdx string, sandboxName string) (*DataFrame, error)
- func (cs *CellService) ExecuteMdxToDataframe(mdx string, sandboxName string) (*DataFrame, error)
- func (cs *CellService) ExtractCellSetCount(cellsetID string, sandboxName string) (int, error)
- func (cs *CellService) ExtractCellsetAxesAndCube(cellsetID string, sandboxName string) (*Cellset, error)
- func (cs *CellService) ExtractCellsetCellsAsync(cellsetID string, cellProperties []string, sandboxName string, maxWorkers int) ([]Cell, error)
- func (cs *CellService) ExtractCellsetCellsRaw(cellsetID string, cellProperties []string, top, skip int, ...) ([]Cell, error)
- func (cs *CellService) UpdateCellset(cellsetID string, values []interface{}, sandboxName string) error
- func (cs *CellService) UpdateCellsetAsync(cellsetID string, values []interface{}, sandboxName string, maxWorkers int) error
- func (cs *CellService) UpdateCellsetFromDataframe(cubeName string, df *DataFrame, sandboxName string) error
- func (cs *CellService) UpdateCellsetFromDataframeViaBlob(cubeName string, df *DataFrame, sandboxName string) error
- func (cs *CellService) UpdateCellsetMDX(mdx string, values []interface{}, sandboxName string) error
- type CellUpdateableProperty
- type Cellset
- type CellsetAxis
- type Configuration
- type ConfigurationService
- func (cs *ConfigurationService) GetActive() (ActiveConfiguration, error)
- func (cs *ConfigurationService) GetAdminHost() (string, error)
- func (cs *ConfigurationService) GetAll() (Configuration, error)
- func (cs *ConfigurationService) GetDataDirectory() (string, error)
- func (cs *ConfigurationService) GetProductVersion() (string, error)
- func (cs *ConfigurationService) GetServerName() (string, error)
- func (cs *ConfigurationService) GetStatic() (StaticConfiguration, error)
- func (cs *ConfigurationService) UpdateStatic(configuration map[string]interface{}) (*http.Response, error)
- type Content
- type Cube
- type CubeBody
- type CubeService
- func (cs *CubeService) CheckRules(cubeName string) ([]RuleSyntaxError, error)
- func (cs *CubeService) Create(cube Cube) error
- func (cs *CubeService) CubeSaveData(cubeName string) error
- func (cs *CubeService) Delete(cubeName string) error
- func (cs *CubeService) Exists(cube Cube) (bool, error)
- func (cs *CubeService) Get(cubeName string) (*Cube, error)
- func (cs *CubeService) GetAll() ([]Cube, error)
- func (cs *CubeService) GetAllNames(skipControlCube bool) ([]string, error)
- func (cs *CubeService) GetAllNamesWithRules(skipControlCube bool) ([]string, error)
- func (cs *CubeService) GetAllNamesWithoutRules(skipControlCube bool) ([]string, error)
- func (cs *CubeService) GetControlCubes() ([]Cube, error)
- func (cs *CubeService) GetDimensionNames(cubeName string) ([]string, error)
- func (cs *CubeService) GetLastDataUpdate(cubeName string) (string, error)
- func (cs *CubeService) GetMeasureDimension(cubeName string) (*Dimension, error)
- func (cs *CubeService) GetModelCubes() ([]Cube, error)
- func (cs *CubeService) GetNumberOfCubes(skipControlCube bool) (int, error)
- func (cs *CubeService) GetRandomIntersection(cubeName string, uniqueName bool) ([]string, error)
- func (cs *CubeService) GetStorageDimensionOrder(cubeName string) ([]string, error)
- func (cs *CubeService) Load(cubeName string) error
- func (cs *CubeService) Lock(cubeName string) error
- func (cs *CubeService) SearchForDimension(dimensionName string, skipControlCube bool) ([]string, error)
- func (cs *CubeService) SearchForDimensionSubstring(substring string, skipControlCube bool) (map[string][]string, error)
- func (cs *CubeService) SearchForRuleSubstring(substring string, skipControlCube bool, caseInsensitive bool, ...) ([]Cube, error)
- func (cs *CubeService) Unload(cubeName string) error
- func (cs *CubeService) Unlock(cubeName string) error
- func (cs *CubeService) Update(cube Cube) error
- func (cs *CubeService) UpdateOrCreate(cube Cube) error
- func (cs *CubeService) UpdateStorageDimensionOrder(cubeName string, dimensions []string) (float64, error)
- type DataFrame
- func (df *DataFrame) AddColumn(name string, values []interface{}) error
- func (df *DataFrame) AddRow(row []interface{}) error
- func (df *DataFrame) ClearData()
- func (df *DataFrame) ConvertToCSVBytes() ([]byte, error)
- func (df *DataFrame) DeleteRow(index int) error
- func (df *DataFrame) ExportToCSV(filename string) error
- func (df *DataFrame) FindUniformColumnIndices() []int
- func (df *DataFrame) FindUniformColumnIndicesParallel() []int
- func (df *DataFrame) RowCount() int
- func (df *DataFrame) SortByColumn(columnName string) error
- func (df *DataFrame) SortByColumns(columnNames []string) error
- func (df *DataFrame) ToMDX(cubeName string) (string, error)
- type Dimension
- type DimensionService
- func (ds *DimensionService) Create(dimension *Dimension) error
- func (ds *DimensionService) Delete(dimensionName string) error
- func (ds *DimensionService) Exists(dimensionName string) (bool, error)
- func (ds *DimensionService) Get(dimensionName string) (*Dimension, error)
- func (dx *DimensionService) GetAllNames() ([]string, error)
- func (ds *DimensionService) GetNumberOfDimensions(skipControlDims bool) (int, error)
- type Edge
- type Element
- type ElementAttribute
- type ElementService
- func (es *ElementService) AddEdges(dimensionName string, hierarchyName string, edges []Edge) error
- func (es *ElementService) AddElements(dimensionName string, hierarchyName string, elements []Element) error
- func (es *ElementService) AttributeCubeExists(dimensionName string, hierarchyName string) (bool, error)
- func (es *ElementService) Create(dimensionName string, hierarchyName string, element *Element) error
- func (es *ElementService) CreateElementAttribute(dimensionName string, hierarchyName string, elementAttribute *ElementAttribute) error
- func (es *ElementService) Delete(dimensionName string, hierarchyName string, elementName string) error
- func (es *ElementService) DeleteElementAttribute(dimensionName string, hierarchyName string, elementAttributeName string) error
- func (es *ElementService) ExecuteSetMDX(params MDXExecuteParams) (*CellsetAxis, error)
- func (es *ElementService) Exists(dimensionName string, hierarchyName string, elementName string) (bool, error)
- func (es *ElementService) Get(dimensionName string, hierarchyName string, elementName string) (*Element, error)
- func (es *ElementService) GetConsolidatedElementNames(dimensionName string, hierarchyName string) ([]string, error)
- func (es *ElementService) GetConsolidatedElements(dimensionName string, hierarchyName string) ([]Element, error)
- func (es *ElementService) GetEdges(dimensionName string, hierarchyName string) ([]Edge, error)
- func (es *ElementService) GetElementAttributes(dimensionName string, hierarchyName string) ([]ElementAttribute, error)
- func (es *ElementService) GetElementNames(dimensionName string, hierarchyName string) ([]string, error)
- func (es *ElementService) GetElements(dimensionName string, hierarchyName string) ([]Element, error)
- func (es *ElementService) GetLeafElementNames(dimensionName string, hierarchyName string) ([]string, error)
- func (es *ElementService) GetLeafElements(dimensionName string, hierarchyName string) ([]Element, error)
- func (es *ElementService) GetLevelNames(dimensionName string, hierarchyName string) ([]string, error)
- func (es *ElementService) GetLevelsCount(dimensionName string, hierarchyName string) (int, error)
- func (es *ElementService) GetNumberOfConsolidatedElements(dimensionName string, hierarchyName string) (int, error)
- func (es *ElementService) GetNumberOfElements(dimensionName string, hierarchyName string) (int, error)
- func (es *ElementService) GetNumberOfLeafElements(dimensionName string, hierarchyName string) (int, error)
- func (es *ElementService) GetNumberOfNumericElements(dimensionName string, hierarchyName string) (int, error)
- func (es *ElementService) GetNumberOfStringElements(dimensionName string, hierarchyName string) (int, error)
- func (es *ElementService) GetNumericElementNames(dimensionName string, hierarchyName string) ([]string, error)
- func (es *ElementService) GetNumericElements(dimensionName string, hierarchyName string) ([]Element, error)
- func (es *ElementService) GetStringElementNames(dimensionName string, hierarchyName string) ([]string, error)
- func (es *ElementService) GetStringElements(dimensionName string, hierarchyName string) ([]Element, error)
- func (es *ElementService) HierarchyExists(dimensionName string, hierarchyName string) (bool, error)
- func (es *ElementService) RemoveEdge(dimensionName string, hierarchyName string, parentName string, ...) error
- func (es *ElementService) Update(dimensionName string, hierarchyName string, element *Element) error
- func (es *ElementService) UpdateOrCreate(dimensionName string, hierarchyName string, element *Element) error
- type ElementType
- type ErrorLogFile
- type ErrorResponse
- type FileService
- func (fs *FileService) Create(fileName string, contentPath []string, file []byte) error
- func (fs *FileService) CreateCompressed(fileName string, contentPath []string, file []byte) error
- func (fs *FileService) Delete(fileName string, contentPath []string) error
- func (fs *FileService) Exists(fileName string, contentPath []string) (bool, error)
- func (fs *FileService) Get(fileName string, contentPath []string) ([]byte, error)
- func (fs *FileService) GetAllNames(numberOfLevels int) ([]string, error)
- func (fs *FileService) Update(fileName string, contentPath []string, file []byte) error
- func (fs *FileService) UpdateCompressed(fileName string, contentPath []string, file []byte) error
- func (fs *FileService) UpdateOrCreate(fileName string, contentPath []string, file []byte) error
- type Groups
- type Hierarchy
- type HierarchyService
- func (hs *HierarchyService) Create(hierarchy *Hierarchy) error
- func (hs *HierarchyService) Delete(dimensionName string, hierarchyName string) error
- func (hs *HierarchyService) Exists(dimensionName string, hierarchyName string) (bool, error)
- func (hs *HierarchyService) Get(dimensionName string, hierarchyName string) (*Hierarchy, error)
- func (hs *HierarchyService) GetAllNames(dimensionName string) ([]string, error)
- func (hs *HierarchyService) GetDefaultMember(dimensionName string, hierarchyName string) (*Member, error)
- func (hs *HierarchyService) IsBalanced(dimensionName string, hierarchyName string) (bool, error)
- func (hs *HierarchyService) RemoveAllEdges(dimensionName string, hierarchyName string) error
- func (hs *HierarchyService) UpdateDefaultMember(dimensionName string, hierarchyName string, memberName string) error
- func (hs *HierarchyService) UpdateDefaultMemberViaApi(dimensionName string, hierarchyName string, memberName string) error
- type Level
- type LocalizedAttribute
- type MDXAxis
- type MDXBuilder
- func (b *MDXBuilder) AddCube(cubeName string)
- func (b *MDXBuilder) AddExpressionOnColumns(expression string)
- func (b *MDXBuilder) AddExpressionOnRows(expression string)
- func (b *MDXBuilder) AddMemberOnColumns(dimension, hierarchy, name string)
- func (b *MDXBuilder) AddMemberOnRows(dimension, hierarchy, name string)
- func (b *MDXBuilder) AddMemberOnWhere(dimension, hierarchy, name string)
- func (b *MDXBuilder) AddWithStatement(member string)
- func (b *MDXBuilder) ToString() (string, error)
- type MDXExecuteParams
- type MDXMember
- type MDXTuple
- type MDXView
- type Member
- type NameValuePair
- type NativeView
- type NullableBool
- type ObjectService
- type Process
- type ProcessDataSource
- type ProcessErrorLog
- type ProcessExecuteResult
- type ProcessExecuteStatusCode
- type ProcessParameter
- type ProcessService
- func (ps *ProcessService) Compile(processName string) ([]ProcessSyntaxError, error)
- func (ps *ProcessService) CompileProcess(process Process) ([]ProcessSyntaxError, error)
- func (ps *ProcessService) Create(process *Process) error
- func (ps *ProcessService) Delete(processName string) error
- func (ps *ProcessService) Execute(processName string, parameters map[string]interface{}, timeout time.Duration) error
- func (ps *ProcessService) ExecuteProcessWithReturn(process *Process, parameters map[string]interface{}, timeout time.Duration) (*ProcessExecuteResult, error)
- func (ps *ProcessService) ExecuteTICode(prologCode string, epilogCode string) (*ProcessExecuteResult, error)
- func (ps *ProcessService) ExecuteWithReturn(processName string, parameters map[string]interface{}, timeout time.Duration) (*ProcessExecuteResult, error)
- func (ps *ProcessService) Exists(processName string) (bool, error)
- func (ps *ProcessService) Get(processName string) (*Process, error)
- func (ps *ProcessService) GetAll(skipControlProcesses bool) ([]Process, error)
- func (ps *ProcessService) GetAllNames(skipControlProcesses bool) ([]string, error)
- func (ps *ProcessService) GetErrorLogFileContent(filename string) (string, error)
- func (ps *ProcessService) GetErrorLogFilenams(processName string, top int, descending bool) ([]string, error)
- func (ps *ProcessService) GetLastMessageFromProcessErrorLog(processName string) (string, error)
- func (ps *ProcessService) GetProcessErrorLogs(processName string) ([]ProcessErrorLog, error)
- func (ps *ProcessService) SearchErrorLogFilenames(searchString string, top int, descending bool) ([]string, error)
- func (ps *ProcessService) SearchStringInCode(searchString string, skipControlProcesses bool) ([]string, error)
- func (ps *ProcessService) Update(process *Process) error
- type ProcessSyntaxError
- type ProcessVariable
- type RestService
- func (rs *RestService) DELETE(url string, customHeaders map[string]string, timeout time.Duration, ...) (*http.Response, error)
- func (rs *RestService) GET(url string, customHeaders map[string]string, timeout time.Duration, ...) (*http.Response, error)
- func (rs *RestService) IsDataAdmin() bool
- func (rs *RestService) IsOpsAdmin() bool
- func (rs *RestService) PATCH(url string, data string, customHeaders map[string]string, ...) (*http.Response, error)
- func (rs *RestService) POST(url string, data string, customHeaders map[string]string, ...) (*http.Response, error)
- func (rs *RestService) PUT(url string, data string, customHeaders map[string]string, ...) (*http.Response, error)
- type RuleSyntaxError
- type Sandbox
- type SandboxService
- type StaticConfiguration
- type Subset
- type SubsetService
- type TM1Service
- type TM1ServiceConfig
- type Tuple
- type Value
- type ValueArray
- type View
- type ViewService
- func (vs *ViewService) Create(cubeName string, view View, private bool) error
- func (vs *ViewService) Delete(cubeName, viewName string, private bool) error
- func (vs *ViewService) Execute(cubeName, viewName string, private bool) (string, error)
- func (vs *ViewService) Exists(cubeName, viewName string, private bool) (bool, error)
- func (vs *ViewService) Get(cubeName, viewName string, private bool) (View, error)
- func (vs *ViewService) GetAll(cubeName string, privateViews bool) ([]View, error)
- type ViewWrapper
Constants ¶
const ( TCPTCPKeepIdle = 30 TCPTCPKeepIntvl = 15 TCPTCPKeepCnt = 60 )
TCP socket options
const BeginGeneratedStatements = "#****Begin: Generated Statements***"
const DefaultConnectionPoolSize = 10
const EndGeneratedStatements = "#****End: Generated Statements****"
Variables ¶
var Headers = map[string]string{
"Connection": "keep-alive",
"User-Agent": "TM1go",
"Content-Type": "application/json; odata.streaming=true; charset=utf-8",
"Accept": "application/json;odata.metadata=none,text/plain",
"TM1-SessionContext": "TM1go",
}
Default HTTP headers
Functions ¶
func AddURLParameters ¶
func CellIsUpdateable ¶
Function to check if a cell is updateable
func ExtractCellUpdateableProperty ¶
func ExtractCellUpdateableProperty(decimalValue int, cellProperty CellUpdateableProperty) bool
Function to extract a specific property bit from a decimal value
func ExtractDimensionHierarchyFromString ¶
ExtractDimensionHierarchyFromString extracts the dimension and hierarchy from a string in the format [dimension].[hierarchy] or dimension:hierarchy
func ExtractNamesFromContent ¶
func RandomString ¶
RandomString generates a random string of length n using a specified character set
func SliceContains ¶
func SliceContains[T comparable](slice []T, value T) bool
SliceContains checks if a slice contains a value. It uses generics to work with any comparable type.
func UniqueStrings ¶
UniqueStrings returns a slice of unique strings from the input slice
Types ¶
type ActiveConfiguration ¶
type ActiveConfiguration struct { OdataContext string `json:"@odata.context"` ServerName string `json:"ServerName"` Access struct { Network struct { IPAddress interface{} `json:"IPAddress"` IPVersion string `json:"IPVersion"` NetRecvBlockingWaitLimit string `json:"NetRecvBlockingWaitLimit"` NetRecvMaxClientIOWaitWithinAPIs string `json:"NetRecvMaxClientIOWaitWithinAPIs"` IdleConnectionTimeOut string `json:"IdleConnectionTimeOut"` ReceiveProgressResponseTimeout string `json:"ReceiveProgressResponseTimeout"` } `json:"Network"` Authentication struct { SecurityPackageName string `json:"SecurityPackageName"` ServicePrincipalName string `json:"ServicePrincipalName"` IntegratedSecurityMode string `json:"IntegratedSecurityMode"` MaximumLoginAttempts int `json:"MaximumLoginAttempts"` } `json:"Authentication"` SSL struct { Enable bool `json:"Enable"` CertificateID interface{} `json:"CertificateID"` CertAuthority interface{} `json:"CertAuthority"` CertRevocationFile interface{} `json:"CertRevocationFile"` ClientExportServerKeyID interface{} `json:"ClientExportServerKeyID"` KeyFile string `json:"KeyFile"` KeyStashFile string `json:"KeyStashFile"` KeyLabel interface{} `json:"KeyLabel"` TLSCipherList interface{} `json:"TLSCipherList"` FIPSOperationMode string `json:"FIPSOperationMode"` NISTSP800131AMODE bool `json:"NIST_SP800_131A_MODE"` } `json:"SSL"` CAM struct { CAMUseSSL bool `json:"CAMUseSSL"` ClientURI interface{} `json:"ClientURI"` ServerURIs []interface{} `json:"ServerURIs"` PortalVariableFile interface{} `json:"PortalVariableFile"` ClientPingCAMPassport string `json:"ClientPingCAMPassport"` ServerCAMURIRetryAttempts int `json:"ServerCAMURIRetryAttempts"` CreateNewCAMClients bool `json:"CreateNewCAMClients"` } `json:"CAM"` LDAP struct { Enable bool `json:"Enable"` Host interface{} `json:"Host"` Port int `json:"Port"` UseServerAccount bool `json:"UseServerAccount"` VerifyCertServerName []interface{} `json:"VerifyCertServerName"` VerifyServerSSLCert bool `json:"VerifyServerSSLCert"` SkipSSLCertVerification bool `json:"SkipSSLCertVerification"` SkipSSLCRLVerification bool `json:"SkipSSLCRLVerification"` WellKnownUserName interface{} `json:"WellKnownUserName"` PasswordFile interface{} `json:"PasswordFile"` PasswordKeyFile interface{} `json:"PasswordKeyFile"` SearchBase interface{} `json:"SearchBase"` SearchField string `json:"SearchField"` } `json:"LDAP"` CAPI struct { Port int `json:"Port"` ClientMessagePort int `json:"ClientMessagePort"` MessageCompression bool `json:"MessageCompression"` ProgressMessage bool `json:"ProgressMessage"` ClientVersionMaximum int `json:"ClientVersionMaximum"` ClientVersionMinimum int `json:"ClientVersionMinimum"` ClientVersionPrecision int `json:"ClientVersionPrecision"` } `json:"CAPI"` HTTP struct { Port int `json:"Port"` SessionTimeout string `json:"SessionTimeout"` SessionMaxRequests int `json:"SessionMaxRequests"` RequestEntityMaxSizeInKB int `json:"RequestEntityMaxSizeInKB"` OriginAllowList []interface{} `json:"OriginAllowList"` } `json:"HTTP"` } `json:"Access"` Administration struct { ServerName string `json:"ServerName"` AdminHost interface{} `json:"AdminHost"` Language interface{} `json:"Language"` DataBaseDirectory string `json:"DataBaseDirectory"` UnicodeUpperLowerCase bool `json:"UnicodeUpperLowerCase"` MaskUserNameInServerTools bool `json:"MaskUserNameInServerTools"` AllowReadOnlyChoreReschedule bool `json:"AllowReadOnlyChoreReschedule"` DisableSandboxing bool `json:"DisableSandboxing"` RunningInBackground interface{} `json:"RunningInBackground"` StartupChores interface{} `json:"StartupChores"` PerformanceMonitorOn bool `json:"PerformanceMonitorOn"` PerfMonActive bool `json:"PerfMonActive"` EnableSandboxDimension bool `json:"EnableSandboxDimension"` Clients struct { PasswordMinimumLength int `json:"PasswordMinimumLength"` ClientPropertiesSyncInterval string `json:"ClientPropertiesSyncInterval"` RetainNonCAMGroupMembership interface{} `json:"RetainNonCAMGroupMembership"` } `json:"Clients"` AuditLog struct { Enable bool `json:"Enable"` UpdateInterval string `json:"UpdateInterval"` MaxFileSizeKilobytes int `json:"MaxFileSizeKilobytes"` MaxQueryMemoryKilobytes int `json:"MaxQueryMemoryKilobytes"` } `json:"AuditLog"` DebugLog struct { LoggingDirectory string `json:"LoggingDirectory"` } `json:"DebugLog"` ServerLog struct { Enable bool `json:"Enable"` LogReleaseLineCount int `json:"LogReleaseLineCount"` } `json:"ServerLog"` EventLog struct { Enable bool `json:"Enable"` ScanFrequency string `json:"ScanFrequency"` ThresholdForThreadRunningTime string `json:"ThresholdForThreadRunningTime"` ThresholdForThreadWaitingTime string `json:"ThresholdForThreadWaitingTime"` ThresholdForThreadBlockingNumber int `json:"ThresholdForThreadBlockingNumber"` ThresholdForPooledMemoryInMB int `json:"ThresholdForPooledMemoryInMB"` } `json:"EventLog"` TopLog struct { Enable bool `json:"Enable"` ScanMode string `json:"ScanMode"` ScanFrequency string `json:"ScanFrequency"` } `json:"TopLog"` Java struct { ClassPath interface{} `json:"ClassPath"` JVMPath interface{} `json:"JVMPath"` JVMArgs interface{} `json:"JVMArgs"` } `json:"Java"` ExternalDatabase struct { OracleErrorForceRowStatus interface{} `json:"OracleErrorForceRowStatus"` SQLFetchType interface{} `json:"SQLFetchType"` SQLRowsetSize int `json:"SQLRowsetSize"` ODBCLibraryPath interface{} `json:"ODBCLibraryPath"` TM1ConnectorforSAP bool `json:"TM1ConnectorforSAP"` UseNewConnectorforSAP bool `json:"UseNewConnectorforSAP"` ODBCTimeoutInSeconds int `json:"ODBCTimeoutInSeconds"` } `json:"ExternalDatabase"` TM1Web struct { ExcelWebPublishEnabled bool `json:"ExcelWebPublishEnabled"` } `json:"TM1Web"` FileRetry struct { FileRetryCount int `json:"FileRetryCount"` FileRetryDelayMilliseconds int `json:"FileRetryDelayMilliseconds"` FileRetryFileSpec []string `json:"FileRetryFileSpec"` } `json:"FileRetry"` DownTime string `json:"DownTime"` } `json:"Administration"` Modelling struct { MDXSelectCalculatedMemberInputs bool `json:"MDXSelectCalculatedMemberInputs"` DefaultMeasuresDimension bool `json:"DefaultMeasuresDimension"` UserDefinedCalculations bool `json:"UserDefinedCalculations"` EnableNewHierarchyCreation bool `json:"EnableNewHierarchyCreation"` Spreading struct { SpreadingPrecision float64 `json:"SpreadingPrecision"` ProportionSpreadToZeroCells bool `json:"ProportionSpreadToZeroCells"` } `json:"Spreading"` TI struct { CognosTM1InterfacePath interface{} `json:"CognosTM1InterfacePath"` UseExcelSerialDate bool `json:"UseExcelSerialDate"` MaximumTILockObjects int `json:"MaximumTILockObjects"` EnableTIDebugging bool `json:"EnableTIDebugging"` } `json:"TI"` Rules struct { AllowSeparateNandCRules bool `json:"AllowSeparateNandCRules"` AutomaticallyAddCubeDependencies bool `json:"AutomaticallyAddCubeDependencies"` RulesOverwriteCellsOnLoad bool `json:"RulesOverwriteCellsOnLoad"` ForceReevaluationOfFeedersForFedCellsOnDataChange bool `json:"ForceReevaluationOfFeedersForFedCellsOnDataChange"` } `json:"Rules"` Startup struct { PersistentFeeders bool `json:"PersistentFeeders"` SkipLoadingAliases interface{} `json:"SkipLoadingAliases"` MaximumCubeLoadThreads int `json:"MaximumCubeLoadThreads"` LoadPrivateSubsetsOnStartup bool `json:"LoadPrivateSubsetsOnStartup"` } `json:"Startup"` Synchronization struct { SyncUnitSize int `json:"SyncUnitSize"` MaximumSynchAttempts int `json:"MaximumSynchAttempts"` } `json:"Synchronization"` } `json:"Modelling"` Performance struct { PrivilegeGenerationOptimization bool `json:"PrivilegeGenerationOptimization"` Memory struct { ApplyMaximumViewSizeToEntireTransaction bool `json:"ApplyMaximumViewSizeToEntireTransaction"` DisableMemoryCache bool `json:"DisableMemoryCache"` CacheFriendlyMalloc bool `json:"CacheFriendlyMalloc"` MaximumViewSizeMB int `json:"MaximumViewSizeMB"` MaximumUserSandboxSizeMB int `json:"MaximumUserSandboxSizeMB"` MaximumMemoryForSubsetUndoKB int `json:"MaximumMemoryForSubsetUndoKB"` LockPagesInMemory bool `json:"LockPagesInMemory"` } `json:"Memory"` MTCubeLoad struct { Enabled bool `json:"Enabled"` Weight int `json:"Weight"` MinFileSize int `json:"MinFileSize"` UseBookmarkFiles bool `json:"UseBookmarkFiles"` } `json:"MTCubeLoad"` MTFeeders struct { Enabled bool `json:"Enabled"` AtStartup bool `json:"AtStartup"` } `json:"MTFeeders"` MTQ struct { UseAllThreads bool `json:"UseAllThreads"` NumberOfThreadsToUse int `json:"NumberOfThreadsToUse"` SingleCellConsolidation bool `json:"SingleCellConsolidation"` ImmediateCheckForSplit bool `json:"ImmediateCheckForSplit"` OperationProgressCheckSkipLoopSize int `json:"OperationProgressCheckSkipLoopSize"` MTFeeders bool `json:"MTFeeders"` MTFeedersAtStartup bool `json:"MTFeedersAtStartup"` MTQQuery bool `json:"MTQQuery"` } `json:"MTQ"` Locking struct { SubsetElementLockBreathing bool `json:"SubsetElementLockBreathing"` UseLocalCopiesForPublicDynamicSubsets bool `json:"UseLocalCopiesForPublicDynamicSubsets"` PullInvalidationSubsets bool `json:"PullInvalidationSubsets"` } `json:"Locking"` ViewCalculation struct { MagnitudeDifferenceToBeZero int `json:"MagnitudeDifferenceToBeZero"` CheckFeedersMaximumCells int `json:"CheckFeedersMaximumCells"` CalculationThresholdForStorage int `json:"CalculationThresholdForStorage"` ViewConsolidationOptimization bool `json:"ViewConsolidationOptimization"` ViewConsolidationOptimizationMethod string `json:"ViewConsolidationOptimizationMethod"` } `json:"ViewCalculation"` Stargate struct { ZeroWeightOptimization bool `json:"ZeroWeightOptimization"` AllRuleCalcStargateOptimization bool `json:"AllRuleCalcStargateOptimization"` UseStargateForRules bool `json:"UseStargateForRules"` } `json:"Stargate"` JobQueuing struct { Enable bool `json:"Enable"` ThreadSleepTime string `json:"ThreadSleepTime"` ThreadPoolSize int `json:"ThreadPoolSize"` MaxWaitTime string `json:"MaxWaitTime"` } `json:"JobQueuing"` } `json:"Performance"` }
type AuthenticationMode ¶
type AuthenticationMode int
AuthenticationMode is an enum for the different authentication modes
const ( BASIC AuthenticationMode = iota + 1 WIA CAM CAM_SSO IBM_CLOUD_API_KEY SERVICE_TO_SERVICE )
Authentication modes
func (AuthenticationMode) UseV12Auth ¶
func (mode AuthenticationMode) UseV12Auth() bool
Determines whether the authentication mode uses v12 authentication
type BatchRequest ¶
type BatchResponse ¶
type BatchResponses ¶
type BatchResponses struct {
Responses []BatchResponse `json:"responses"`
}
type BatchService ¶
type BatchService struct {
// contains filtered or unexported fields
}
func NewBatchService ¶
func NewBatchService(rest *RestService) *BatchService
func (*BatchService) Batch ¶
func (bs *BatchService) Batch(requests []BatchRequest) (*BatchResponses, error)
Batch - Execute a batch of requests Process body using the following example: rsp1 := tm1Go.SomeType{} bodyBytes := json.Marshal(response.Responses[i].Body) json.Unmarshal(bodyBytes, &rsp1)
type Cell ¶
type Cell struct { Ordinal int `json:"Ordinal,omitempty"` Status string `json:"Status,omitempty"` Value interface{} `json:"Value,omitempty"` FormatString string `json:"FormatString,omitempty"` FormattedValue string `json:"FormattedValue,omitempty"` Updateable int `json:"Updateable,omitempty"` RuleDerived bool `json:"RuleDerived,omitempty"` Annotated bool `json:"Annotated,omitempty"` Consolidated bool `json:"Consolidated,omitempty"` NullIntersected bool `json:"NullIntersected,omitempty"` Language int `json:"Language,omitempty"` HasPicklist bool `json:"HasPicklist,omitempty"` PicklistValues []interface{} `json:"PicklistValues,omitempty"` HasDrillthrough bool `json:"HasDrillthrough,omitempty"` Members []Member `json:"Members,omitempty"` DrillthroughScripts []interface{} `json:"DrillthroughScripts,omitempty"` Annotations []interface{} `json:"Annotations,omitempty"` }
type CellService ¶
type CellService struct {
// contains filtered or unexported fields
}
Service for reading and writing TM1 cube cells
func NewCellService ¶
func NewCellService(rest *RestService, cube *CubeService, file *FileService, process *ProcessService) *CellService
NewCellService creates a new cell service
func (*CellService) CellGet ¶
func (cs *CellService) CellGet(params ...string) (interface{}, error)
CellGet retrieves a cell First parameter is the cube name followed by the element names
func (*CellService) CellPut ¶
func (cs *CellService) CellPut(params ...interface{}) error
CellPut updates a cell First parameter is the value, second parameter is the cube name followed by the element names
func (*CellService) CreateCellSet ¶
func (cs *CellService) CreateCellSet(mdx string, sandboxName string) (string, error)
CreateCellSet creates a cellset
func (*CellService) DeleteCellSet ¶
func (cs *CellService) DeleteCellSet(cellsetID string) error
DeleteCellSet deletes a cellset
func (*CellService) ExecuteMDXViaBlob ¶
func (cs *CellService) ExecuteMDXViaBlob(mdx string, sandboxName string) (*DataFrame, error)
Read via blob
func (*CellService) ExecuteMdxToDataframe ¶
func (cs *CellService) ExecuteMdxToDataframe(mdx string, sandboxName string) (*DataFrame, error)
ExecuteMdxToDataframe executes an MDX query and returns the result as a dataframe
func (*CellService) ExtractCellSetCount ¶
func (cs *CellService) ExtractCellSetCount(cellsetID string, sandboxName string) (int, error)
ExtractCellSetCount extracts the number of cells in a cellset
func (*CellService) ExtractCellsetAxesAndCube ¶
func (cs *CellService) ExtractCellsetAxesAndCube(cellsetID string, sandboxName string) (*Cellset, error)
ExtractCellsetCells extracts cells from a cellset
func (*CellService) ExtractCellsetCellsAsync ¶
func (cs *CellService) ExtractCellsetCellsAsync(cellsetID string, cellProperties []string, sandboxName string, maxWorkers int) ([]Cell, error)
ExtractCellsetCellsAsync extracts cells from a cellset asynchronously
func (*CellService) ExtractCellsetCellsRaw ¶
func (cs *CellService) ExtractCellsetCellsRaw(cellsetID string, cellProperties []string, top, skip int, skipZeros, skipConsolidatedCells, skipRuleDerivedCells bool, sandboxName string) ([]Cell, error)
ExtractCellsetCells extracts cells from a cellset
func (*CellService) UpdateCellset ¶
func (cs *CellService) UpdateCellset(cellsetID string, values []interface{}, sandboxName string) error
UpdateCellset updates values inside a cellset
func (*CellService) UpdateCellsetAsync ¶
func (cs *CellService) UpdateCellsetAsync(cellsetID string, values []interface{}, sandboxName string, maxWorkers int) error
UpdateCellsetAsync updates values inside a cellset asynchronously
func (*CellService) UpdateCellsetFromDataframe ¶
func (cs *CellService) UpdateCellsetFromDataframe(cubeName string, df *DataFrame, sandboxName string) error
UpdateCellsetFromDataframe updates values inside a cellset using dataframe
func (*CellService) UpdateCellsetFromDataframeViaBlob ¶
func (cs *CellService) UpdateCellsetFromDataframeViaBlob(cubeName string, df *DataFrame, sandboxName string) error
UpdateCellsetFromDataframeViaBlob Writes data to a cube via blob. Numeric valus only.
func (*CellService) UpdateCellsetMDX ¶
func (cs *CellService) UpdateCellsetMDX(mdx string, values []interface{}, sandboxName string) error
UpdateCellsetMDX updates values inside a cellset using MDX
type CellUpdateableProperty ¶
type CellUpdateableProperty int
const ( SECURITY_RESTRICTED CellUpdateableProperty = iota + 1 UPDATE_CUBE_APPLICABLE RULE_IS_APPLIED PICKLIST_EXISTS SANDBOX_VALUE_IS_DIFFERENT_TO_BASE NO_SPREADING_HOLD LEAF_HOLD CONSOLIDATION_SPREADING_HOLD TEMPORARY_SPREADING_HOLD CELL_IS_NOT_UPDATEABLE = 29 )
type Cellset ¶
type Cellset struct { Cube Cube `json:"Cube,omitempty"` Cells []Cell `json:"Cells,omitempty"` Axes []CellsetAxis `json:"Axes,omitempty"` ID string `json:"ID,omitempty"` }
type CellsetAxis ¶
type Configuration ¶
type Configuration struct { ODataContext string `json:"@odata.context"` ServerName string `json:"ServerName"` AdminHost string `json:"AdminHost"` ProductVersion string `json:"ProductVersion"` PortNumber int `json:"PortNumber"` ClientMessagePortNumber int `json:"ClientMessagePortNumber"` HTTPPortNumber int `json:"HTTPPortNumber"` IntegratedSecurityMode bool `json:"IntegratedSecurityMode"` SecurityMode string `json:"SecurityMode"` PrincipalName string `json:"PrincipalName"` SecurityPackageName string `json:"SecurityPackageName"` ClientCAMURIs []string `json:"ClientCAMURIs"` WebCAMURI string `json:"WebCAMURI"` ClientPingCAMPassport int `json:"ClientPingCAMPassport"` ServerCAMURI string `json:"ServerCAMURI"` AllowSeparateNandCRules bool `json:"AllowSeparateNandCRules"` DistributedOutputDir string `json:"DistributedOutputDir"` DisableSandboxing bool `json:"DisableSandboxing"` JobQueuing bool `json:"JobQueuing"` ForceReevaluationOfFeedersForFedCellsOnDataChange bool `json:"ForceReevaluationOfFeedersForFedCellsOnDataChange"` DataBaseDirectory string `json:"DataBaseDirectory"` UnicodeUpperLowerCase bool `json:"UnicodeUpperLowerCase"` }
Configuration struct to hold the configuration settings
type ConfigurationService ¶
type ConfigurationService struct {
// contains filtered or unexported fields
}
ConfigurationService struct to hold any dependencies for configuration operations
func NewConfigurationService ¶
func NewConfigurationService(rest *RestService) *ConfigurationService
NewConfigurationService creates a new ConfigurationService with the provided RestClient
func (*ConfigurationService) GetActive ¶
func (cs *ConfigurationService) GetActive() (ActiveConfiguration, error)
GetActive reads effective TM1 config settings as dictionary from TM1 Server. Requires Ops Admin privilege.
func (*ConfigurationService) GetAdminHost ¶
func (cs *ConfigurationService) GetAdminHost() (string, error)
GetAdminHost is deprecated in version 12.0.0
func (*ConfigurationService) GetAll ¶
func (cs *ConfigurationService) GetAll() (Configuration, error)
GetAll retrieves all configuration settings, removing the @odata context entry
func (*ConfigurationService) GetDataDirectory ¶
func (cs *ConfigurationService) GetDataDirectory() (string, error)
GetDataDirectory is deprecated in version 12.0.0
func (*ConfigurationService) GetProductVersion ¶
func (cs *ConfigurationService) GetProductVersion() (string, error)
GetProductVersion asks the TM1 Server for its version.
func (*ConfigurationService) GetServerName ¶
func (cs *ConfigurationService) GetServerName() (string, error)
GetServerName asks the TM1 Server for its name
func (*ConfigurationService) GetStatic ¶
func (cs *ConfigurationService) GetStatic() (StaticConfiguration, error)
GetStatic reads TM1 config settings as dictionary from TM1 Server. Requires Ops Admin privilege.
func (*ConfigurationService) UpdateStatic ¶
func (cs *ConfigurationService) UpdateStatic(configuration map[string]interface{}) (*http.Response, error)
UpdateStatic updates the .cfg file and triggers TM1 to re-read the file. Requires Ops Admin privilege.
type Content ¶
type Content struct { OdataType string `json:"@odata.type,omitempty"` ID string `json:"ID,omitempty"` Name string `json:"Name,omitempty"` Size int `json:"Size,omitempty"` LastUpdated string `json:"LastUpdated,omitempty"` MediaContentType string `json:"Content@odata.mediaContentType,omitempty"` Contents []Content `json:"Contents,omitempty"` }
type Cube ¶
type Cube struct { OdataContext string `json:"@odata.context"` OdataEtag string `json:"@odata.etag"` Name string `json:"Name"` Rules string `json:"Rules"` DrillthroughRules string `json:"DrillthroughRules"` LastSchemaUpdate time.Time `json:"LastSchemaUpdate"` LastDataUpdate time.Time `json:"LastDataUpdate"` Dimensions []Dimension `json:"Dimensions"` Views []View `json:"Views"` PrivateViews []View `json:"PrivateViews"` }
type CubeService ¶
type CubeService struct {
// contains filtered or unexported fields
}
func NewCubeService ¶
func NewCubeService(rest *RestService, object *ObjectService, dimension *DimensionService) *CubeService
func (*CubeService) CheckRules ¶
func (cs *CubeService) CheckRules(cubeName string) ([]RuleSyntaxError, error)
Check rules syntax for a TM1 cube
func (*CubeService) CubeSaveData ¶
func (cs *CubeService) CubeSaveData(cubeName string) error
Serializes a cube by saving data updates
func (*CubeService) Exists ¶
func (cs *CubeService) Exists(cube Cube) (bool, error)
Exists checks if a cube exists in TM1
func (*CubeService) Get ¶
func (cs *CubeService) Get(cubeName string) (*Cube, error)
Get cube from tm1
func (*CubeService) GetAll ¶
func (cs *CubeService) GetAll() ([]Cube, error)
func (*CubeService) GetAllNames ¶
func (cs *CubeService) GetAllNames(skipControlCube bool) ([]string, error)
Get the list of all cube names in TM1
func (*CubeService) GetAllNamesWithRules ¶
func (cs *CubeService) GetAllNamesWithRules(skipControlCube bool) ([]string, error)
func (*CubeService) GetAllNamesWithoutRules ¶
func (cs *CubeService) GetAllNamesWithoutRules(skipControlCube bool) ([]string, error)
Get a list of cubes without rules
func (*CubeService) GetControlCubes ¶
func (cs *CubeService) GetControlCubes() ([]Cube, error)
Get all Cubes with } prefix from TM1 Server as TM1py.Cube instances
func (*CubeService) GetDimensionNames ¶
func (cs *CubeService) GetDimensionNames(cubeName string) ([]string, error)
Get a list of a cube dimensions names
func (*CubeService) GetLastDataUpdate ¶
func (cs *CubeService) GetLastDataUpdate(cubeName string) (string, error)
func (*CubeService) GetMeasureDimension ¶
func (cs *CubeService) GetMeasureDimension(cubeName string) (*Dimension, error)
func (*CubeService) GetModelCubes ¶
func (cs *CubeService) GetModelCubes() ([]Cube, error)
Get all Cubes without } prefix from TM1 Server as TM1py.Cube instances
func (*CubeService) GetNumberOfCubes ¶
func (cs *CubeService) GetNumberOfCubes(skipControlCube bool) (int, error)
Get number of model cubes in TM1
func (*CubeService) GetRandomIntersection ¶
func (cs *CubeService) GetRandomIntersection(cubeName string, uniqueName bool) ([]string, error)
func (*CubeService) GetStorageDimensionOrder ¶
func (cs *CubeService) GetStorageDimensionOrder(cubeName string) ([]string, error)
Get list of dimensions names in storage order
func (*CubeService) Lock ¶
func (cs *CubeService) Lock(cubeName string) error
Lock cube to prevent any modification by the users
func (*CubeService) SearchForDimension ¶
func (cs *CubeService) SearchForDimension(dimensionName string, skipControlCube bool) ([]string, error)
Get list of cubes that contain dimension name provided
func (*CubeService) SearchForDimensionSubstring ¶
func (cs *CubeService) SearchForDimensionSubstring(substring string, skipControlCube bool) (map[string][]string, error)
Get a list of cubes which dimensions names match the substring
func (*CubeService) SearchForRuleSubstring ¶
func (cs *CubeService) SearchForRuleSubstring(substring string, skipControlCube bool, caseInsensitive bool, spaceInsensitive bool) ([]Cube, error)
Get a list of cubes which rules contain the substring
func (*CubeService) Unload ¶
func (cs *CubeService) Unload(cubeName string) error
Unload cube into memory
func (*CubeService) Unlock ¶
func (cs *CubeService) Unlock(cubeName string) error
Unlock cube to prevent any modification by the users
func (*CubeService) Update ¶
func (cs *CubeService) Update(cube Cube) error
Update existing cube in TM1
func (*CubeService) UpdateOrCreate ¶
func (cs *CubeService) UpdateOrCreate(cube Cube) error
Update if exists else create
func (*CubeService) UpdateStorageDimensionOrder ¶
func (cs *CubeService) UpdateStorageDimensionOrder(cubeName string, dimensions []string) (float64, error)
Update internal dimension storage order. The function returns percentage of memory saved
type DataFrame ¶
func CellSetToDataFrame ¶
Convert cellset to dataframe
func NewDataFrame ¶
func NewDataFromCSV ¶
NewDataFromCSV creates new dataframe from CSV file
func (*DataFrame) AddColumn ¶
AddColumn adds a new column to the DataFrame with the provided name and values. If the number of values doesn't match the number of rows in the DataFrame, it returns an error without adding the column.
func (*DataFrame) ConvertToCSVBytes ¶
ExportToCSV exports the DataFrame to a CSV and returns it as []byte
func (*DataFrame) DeleteRow ¶
DeleteRow deletes the row at the specified index from the DataFrame If the index is out of range, it returns an error
func (*DataFrame) ExportToCSV ¶
ExportToCSV exports the DataFrame to a CSV file with the given filename
func (*DataFrame) FindUniformColumnIndices ¶
FindUniformColumnIndices searches for uniform columns
func (*DataFrame) FindUniformColumnIndicesParallel ¶
FindUniformColumnIndicesParallel finds indices of uniform columns using multiple Go routines
func (*DataFrame) SortByColumn ¶
SortByColumn sorts the DataFrame based on the specified column
func (*DataFrame) SortByColumns ¶
SortByColumns sorts the DataFrame based on the specified columns
type Dimension ¶
type Dimension struct { OdataContext string `json:"@odata.context,omitempty"` OdataEtag string `json:"@odata.etag,omitempty"` Name string `json:"Name,omitempty"` UniqueName string `json:"UniqueName,omitempty"` AllLeavesHierarchyName string `json:"AllLeavesHierarchyName,omitempty"` Attributes map[string]interface{} `json:"Attributes,omitempty"` Hierarchies []Hierarchy `json:"Hierarchies,omitempty"` }
type DimensionService ¶
type DimensionService struct {
// contains filtered or unexported fields
}
func NewDimensionService ¶
func NewDimensionService(rest *RestService, object *ObjectService, hierarchy *HierarchyService) *DimensionService
NewDimensionService creates a new instance of DimensionService
func (*DimensionService) Create ¶
func (ds *DimensionService) Create(dimension *Dimension) error
Create a new dimension
func (*DimensionService) Delete ¶
func (ds *DimensionService) Delete(dimensionName string) error
Delete a dimension
func (*DimensionService) Exists ¶
func (ds *DimensionService) Exists(dimensionName string) (bool, error)
Exists checks if a dimension exists
func (*DimensionService) Get ¶
func (ds *DimensionService) Get(dimensionName string) (*Dimension, error)
Get retrieves a dimension
func (*DimensionService) GetAllNames ¶
func (dx *DimensionService) GetAllNames() ([]string, error)
GetAllNames retrieves all dimension names
func (*DimensionService) GetNumberOfDimensions ¶
func (ds *DimensionService) GetNumberOfDimensions(skipControlDims bool) (int, error)
GetNumberOfDimensions retrieves the number of dimensions
type Element ¶
type Element struct { Name string `json:"Name,omitempty"` UniqueName string `json:"UniqueName,omitempty"` Type ElementType `json:"Type,omitempty"` Level int `json:"Level,omitempty"` Index int `json:"Index,omitempty"` Attributes map[string]interface{} `json:"Attributes,omitempty"` Hierarchy Hierarchy `json:"Hierarchy,omitempty"` }
type ElementAttribute ¶
type ElementService ¶
type ElementService struct {
// contains filtered or unexported fields
}
func NewElementService ¶
func NewElementService(rest *RestService, object *ObjectService) *ElementService
func (*ElementService) AddEdges ¶
func (es *ElementService) AddEdges(dimensionName string, hierarchyName string, edges []Edge) error
AddEdge adds an edge to the specified dimension and hierarchy
func (*ElementService) AddElements ¶
func (es *ElementService) AddElements(dimensionName string, hierarchyName string, elements []Element) error
AddElements adds an element to the specified dimension and hierarchy
func (*ElementService) AttributeCubeExists ¶
func (es *ElementService) AttributeCubeExists(dimensionName string, hierarchyName string) (bool, error)
AttributeExists checks if an attribute cube exists for the specified dimension and hierarchy
func (*ElementService) Create ¶
func (es *ElementService) Create(dimensionName string, hierarchyName string, element *Element) error
Create creates a new element in the specified dimension and hierarchy
func (*ElementService) CreateElementAttribute ¶
func (es *ElementService) CreateElementAttribute(dimensionName string, hierarchyName string, elementAttribute *ElementAttribute) error
CreateElementAttribute creates a new element attribute in the specified dimension and hierarchy
func (*ElementService) Delete ¶
func (es *ElementService) Delete(dimensionName string, hierarchyName string, elementName string) error
Delete deletes an element from the specified dimension and hierarchy
func (*ElementService) DeleteElementAttribute ¶
func (es *ElementService) DeleteElementAttribute(dimensionName string, hierarchyName string, elementAttributeName string) error
DeleteElementAttribute deletes an element attribute from the specified dimension and hierarchy
func (*ElementService) ExecuteSetMDX ¶
func (es *ElementService) ExecuteSetMDX(params MDXExecuteParams) (*CellsetAxis, error)
ExecuteSetMDX executes an MDX query and returns the result as a CellsetAxis
func (*ElementService) Exists ¶
func (es *ElementService) Exists(dimensionName string, hierarchyName string, elementName string) (bool, error)
Exists checks if an element exists in the specified dimension and hierarchy
func (*ElementService) Get ¶
func (es *ElementService) Get(dimensionName string, hierarchyName string, elementName string) (*Element, error)
Get returns an element from the specified dimension and hierarchy
func (*ElementService) GetConsolidatedElementNames ¶
func (es *ElementService) GetConsolidatedElementNames(dimensionName string, hierarchyName string) ([]string, error)
GetConsolidatedElementNames returns the names of all consolidated elements from the specified dimension and hierarchy
func (*ElementService) GetConsolidatedElements ¶
func (es *ElementService) GetConsolidatedElements(dimensionName string, hierarchyName string) ([]Element, error)
GetConsolidatedElements returns all consolidated elements from the specified dimension and hierarchy
func (*ElementService) GetEdges ¶
func (es *ElementService) GetEdges(dimensionName string, hierarchyName string) ([]Edge, error)
GetEdges returns all edges from the specified dimension and hierarchy
func (*ElementService) GetElementAttributes ¶
func (es *ElementService) GetElementAttributes(dimensionName string, hierarchyName string) ([]ElementAttribute, error)
GetElementAttributes returns all element attributes from the specified dimension and hierarchy
func (*ElementService) GetElementNames ¶
func (es *ElementService) GetElementNames(dimensionName string, hierarchyName string) ([]string, error)
GetElementNames returns the names of all elements from the specified dimension and hierarchy
func (*ElementService) GetElements ¶
func (es *ElementService) GetElements(dimensionName string, hierarchyName string) ([]Element, error)
GetElements returns all elements from the specified dimension and hierarchy
func (*ElementService) GetLeafElementNames ¶
func (es *ElementService) GetLeafElementNames(dimensionName string, hierarchyName string) ([]string, error)
GetLeafElementNames returns the names of all leaf elements from the specified dimension and hierarchy
func (*ElementService) GetLeafElements ¶
func (es *ElementService) GetLeafElements(dimensionName string, hierarchyName string) ([]Element, error)
GetElement returns an element from the specified dimension and hierarchy
func (*ElementService) GetLevelNames ¶
func (es *ElementService) GetLevelNames(dimensionName string, hierarchyName string) ([]string, error)
Getlevelnames returns the names of all levels from the specified dimension and hierarchy
func (*ElementService) GetLevelsCount ¶
func (es *ElementService) GetLevelsCount(dimensionName string, hierarchyName string) (int, error)
GetLevelCount returns the number of levels in the specified dimension and hierarchy
func (*ElementService) GetNumberOfConsolidatedElements ¶
func (es *ElementService) GetNumberOfConsolidatedElements(dimensionName string, hierarchyName string) (int, error)
GetNumberOfElementsByType returns the number of elements of the specified type in the specified dimension and hierarchy
func (*ElementService) GetNumberOfElements ¶
func (es *ElementService) GetNumberOfElements(dimensionName string, hierarchyName string) (int, error)
GetElementCount returns the number of elements in the specified dimension and hierarchy
func (*ElementService) GetNumberOfLeafElements ¶
func (es *ElementService) GetNumberOfLeafElements(dimensionName string, hierarchyName string) (int, error)
GetNumberOfLeafElements returns the number of leaf elements in the specified dimension and hierarchy
func (*ElementService) GetNumberOfNumericElements ¶
func (es *ElementService) GetNumberOfNumericElements(dimensionName string, hierarchyName string) (int, error)
GetNumberOfConsolidatedElements returns the number of consolidated elements in the specified dimension and hierarchy
func (*ElementService) GetNumberOfStringElements ¶
func (es *ElementService) GetNumberOfStringElements(dimensionName string, hierarchyName string) (int, error)
GetNumberOfStringElements returns the number of string elements in the specified dimension and hierarchy
func (*ElementService) GetNumericElementNames ¶
func (es *ElementService) GetNumericElementNames(dimensionName string, hierarchyName string) ([]string, error)
GetNumericElementNames returns the names of all numeric elements from the specified dimension and hierarchy
func (*ElementService) GetNumericElements ¶
func (es *ElementService) GetNumericElements(dimensionName string, hierarchyName string) ([]Element, error)
GetNumericElements returns all numeric elements from the specified dimension and hierarchy
func (*ElementService) GetStringElementNames ¶
func (es *ElementService) GetStringElementNames(dimensionName string, hierarchyName string) ([]string, error)
GetStringElementNames returns the names of all string elements from the specified dimension and hierarchy
func (*ElementService) GetStringElements ¶
func (es *ElementService) GetStringElements(dimensionName string, hierarchyName string) ([]Element, error)
GetStringElements returns all string elements from the specified dimension and hierarchy
func (*ElementService) HierarchyExists ¶
func (es *ElementService) HierarchyExists(dimensionName string, hierarchyName string) (bool, error)
HierarchyExists checks if a hierarchy exists in the specified dimension
func (*ElementService) RemoveEdge ¶
func (es *ElementService) RemoveEdge(dimensionName string, hierarchyName string, parentName string, componentName string) error
RemoveEdge removes an edge from the specified dimension and hierarchy
func (*ElementService) Update ¶
func (es *ElementService) Update(dimensionName string, hierarchyName string, element *Element) error
Update updates an element in the specified dimension and hierarchy
func (*ElementService) UpdateOrCreate ¶
func (es *ElementService) UpdateOrCreate(dimensionName string, hierarchyName string, element *Element) error
UpdateOrCreate updates or creates an element in the specified dimension and hierarchy
type ElementType ¶
type ElementType int
Define ElementType
const ( Numeric ElementType = iota + 1 String Consolidated )
Enum values for ElementType
func (ElementType) String ¶
func (e ElementType) String() string
type ErrorLogFile ¶
type ErrorResponse ¶
type FileService ¶
type FileService struct {
// contains filtered or unexported fields
}
func NewFileService ¶
func NewFileService(rest *RestService, object *ObjectService) *FileService
func (*FileService) Create ¶
func (fs *FileService) Create(fileName string, contentPath []string, file []byte) error
Create a new file If contentPath is empty, the file will be created in the root folder
func (*FileService) CreateCompressed ¶
func (fs *FileService) CreateCompressed(fileName string, contentPath []string, file []byte) error
Create compresses file content and creates a new file entity
func (*FileService) Delete ¶
func (fs *FileService) Delete(fileName string, contentPath []string) error
Delete a file
func (*FileService) Exists ¶
func (fs *FileService) Exists(fileName string, contentPath []string) (bool, error)
Exists checks if a file exists If contentPath is empty, the file will be checked in the root folder
func (*FileService) Get ¶
func (fs *FileService) Get(fileName string, contentPath []string) ([]byte, error)
Get retrieves a file If contentPath is empty, the file will be retrieved from the root folder
func (*FileService) GetAllNames ¶
func (fs *FileService) GetAllNames(numberOfLevels int) ([]string, error)
GetAllNames retrieves all names
func (*FileService) Update ¶
func (fs *FileService) Update(fileName string, contentPath []string, file []byte) error
Update a file If contentPath is empty, the file will be updated in the root folder
func (*FileService) UpdateCompressed ¶
func (fs *FileService) UpdateCompressed(fileName string, contentPath []string, file []byte) error
UpdateCompressed compresses file content and updates a file If contentPath is empty, the file will be updated in the root folder
func (*FileService) UpdateOrCreate ¶
func (fs *FileService) UpdateOrCreate(fileName string, contentPath []string, file []byte) error
UpdateOrCreate updates a file if it exists, otherwise creates it If contentPath is empty, the file will be updated in the root folder
type Hierarchy ¶
type Hierarchy struct { Name string `json:"Name"` UniqueName string `json:"UniqueName,omitempty"` Elements []Element `json:"Elements,omitempty"` Edges []Edge `json:"Edges,omitempty"` Visible bool `json:"Visible,omitempty"` Cardinality int `json:"Cardinality,omitempty"` Attributes map[string]interface{} `json:"Attributes,omitempty"` Dimension Dimension `json:"Dimension,omitempty"` Subsets []Subset `json:"Subset,omitempty"` PrivateSubsets []Subset `json:"PrivateSubsets,omitempty"` SessionSubsets []Subset `json:"SessionSubsets,omitempty"` Members []Member `json:"Members,omitempty"` AllMember []Member `json:"AllMember,omitempty"` DefaultMember Member `json:"DefaultMember,omitempty"` Levels []Level `json:"Levels,omitempty"` ElementAttributes []ElementAttribute `json:"ElementAttributes,omitempty"` }
type HierarchyService ¶
type HierarchyService struct {
// contains filtered or unexported fields
}
func NewHierarchyService ¶
func NewHierarchyService(rest *RestService, object *ObjectService) *HierarchyService
NewHierarchyService creates a new instance of HierarchyService
func (*HierarchyService) Create ¶
func (hs *HierarchyService) Create(hierarchy *Hierarchy) error
Create creates a new hierarchy in the dimension
func (*HierarchyService) Delete ¶
func (hs *HierarchyService) Delete(dimensionName string, hierarchyName string) error
Update updates the hierarchy in the dimension
func (*HierarchyService) Exists ¶
func (hs *HierarchyService) Exists(dimensionName string, hierarchyName string) (bool, error)
Exists checks if the hierarchy exists in the dimension
func (*HierarchyService) Get ¶
func (hs *HierarchyService) Get(dimensionName string, hierarchyName string) (*Hierarchy, error)
Get retrieves a hierarchy from the dimension
func (*HierarchyService) GetAllNames ¶
func (hs *HierarchyService) GetAllNames(dimensionName string) ([]string, error)
GetAll retrieves all hierarchies from the dimension
func (*HierarchyService) GetDefaultMember ¶
func (hs *HierarchyService) GetDefaultMember(dimensionName string, hierarchyName string) (*Member, error)
GetDefaultMember retrieves the default member in the hierarchy in the dimension
func (*HierarchyService) IsBalanced ¶
func (hs *HierarchyService) IsBalanced(dimensionName string, hierarchyName string) (bool, error)
IsBalanced checks if the hierarchy in the dimension is balanced
func (*HierarchyService) RemoveAllEdges ¶
func (hs *HierarchyService) RemoveAllEdges(dimensionName string, hierarchyName string) error
RemoveAllEdges removes all edges from the hierarchy in the dimension
func (*HierarchyService) UpdateDefaultMember ¶
func (hs *HierarchyService) UpdateDefaultMember(dimensionName string, hierarchyName string, memberName string) error
UpdateDefaultMember updates the default member in the hierarchy in the dimension
func (*HierarchyService) UpdateDefaultMemberViaApi ¶
func (hs *HierarchyService) UpdateDefaultMemberViaApi(dimensionName string, hierarchyName string, memberName string) error
UpdateDefaultMemberViaApi updates the default member in the hierarchy in the dimension
type LocalizedAttribute ¶
type MDXAxis ¶
type MDXBuilder ¶
func NewMDXBuilder ¶
func NewMDXBuilder(cube string) *MDXBuilder
func (*MDXBuilder) AddCube ¶
func (b *MDXBuilder) AddCube(cubeName string)
func (*MDXBuilder) AddExpressionOnColumns ¶
func (b *MDXBuilder) AddExpressionOnColumns(expression string)
func (*MDXBuilder) AddExpressionOnRows ¶
func (b *MDXBuilder) AddExpressionOnRows(expression string)
func (*MDXBuilder) AddMemberOnColumns ¶
func (b *MDXBuilder) AddMemberOnColumns(dimension, hierarchy, name string)
func (*MDXBuilder) AddMemberOnRows ¶
func (b *MDXBuilder) AddMemberOnRows(dimension, hierarchy, name string)
func (*MDXBuilder) AddMemberOnWhere ¶
func (b *MDXBuilder) AddMemberOnWhere(dimension, hierarchy, name string)
func (*MDXBuilder) AddWithStatement ¶
func (b *MDXBuilder) AddWithStatement(member string)
func (*MDXBuilder) ToString ¶
func (b *MDXBuilder) ToString() (string, error)
type MDXExecuteParams ¶
type MDXExecuteParams struct { MDX string TopRecords *int MemberProperties []string ParentProperties []string ElementProperties []string }
MDXExecuteParams is a struct for MDX query parameters
type MDXView ¶
type MDXView struct { Cube Cube `json:"Cube,omitempty"` Type string `json:"@odata.type"` Name string `json:"Name"` MDX string `json:"MDX"` Meta struct { Aliases map[string]string `json:"Aliases"` ContextSets map[string]map[string]string `json:"ContextSets"` ExpandAboves map[string]bool `json:"ExpandAboves"` } `json:"Meta,omitempty"` }
type Member ¶
type Member struct { Name string `json:"Name"` UniqueName string `json:"UniqueName"` Type string `json:"Type"` Ordinal int `json:"Ordinal"` IsPlaceholder bool `json:"IsPlaceholder"` Weight int `json:"Weight"` Attributes map[string]interface{} `json:"Attributes"` DisplayInfo int `json:"DisplayInfo"` DisplayInfoAbove int `json:"DisplayInfoAbove"` }
type NameValuePair ¶
type NameValuePair struct { Name string `json:"Name,omitempty"` Value interface{} `json:"Value,omitempty"` }
type NativeView ¶
type NativeView struct { Type string `json:"@odata.type,omitempty"` Cube Cube `json:"Cube,omitempty"` Name string `json:"Name"` Columns []struct { Subset Subset `json:"Subset,omitempty"` } `json:"Columns,omitempty"` Rows []struct { Subset Subset `json:"Subset,omitempty"` } `json:"Rows,omitempty"` Titles []struct { Subset Subset `json:"Subset,omitempty"` Selected Element `json:"Selected,omitempty"` } `json:"Titles,omitempty"` SuppressEmptyColumns bool `json:"SuppressEmptyColumns,omitempty"` SuppressEmptyRows bool `json:"SuppressEmptyRows,omitempty"` FormatString string `json:"FormatString,omitempty"` }
func (*NativeView) GetName ¶
func (v *NativeView) GetName() string
func (*NativeView) GetType ¶
func (v *NativeView) GetType() string
type NullableBool ¶
type NullableBool int
Nullable bool
const ( TRUE NullableBool = iota FALSE NULL )
type ObjectService ¶
type ObjectService struct {
// contains filtered or unexported fields
}
func NewObjectService ¶
func NewObjectService(rest *RestService) *ObjectService
type Process ¶
type Process struct { Name string `json:"Name"` // The name of a TurboIntegrator process. HasSecurityAccess bool `json:"HasSecurityAccess,omitempty"` // A Boolean that indicates whether the user security access to run this process. PrologProcedure string `json:"PrologProcedure,omitempty"` // The code that is executed during the Prolog stage of the process. MetadataProcedure string `json:"MetadataProcedure,omitempty"` // The code that is executed during the Metadata stage of the process. DataProcedure string `json:"DataProcedure,omitempty"` // The code that is executed during the Data stage of the process. EpilogProcedure string `json:"EpilogProcedure,omitempty"` // The code that is executed during the Epilog stage of the process. DataSource ProcessDataSource `json:"DataSource,omitempty"` // The source of the data for the process. Assuming tm1.ProcessDataSource is a string for simplicity. Parameters []ProcessParameter `json:"Parameters,omitempty"` // Parameters used by the process. Assuming Collection(tm1.ProcessParameter) is a slice of strings for simplicity. Variables []ProcessVariable `json:"Variables,omitempty"` // Variables used by the process. Assuming Collection(tm1.ProcessVariable) is a slice of strings for simplicity. Attributes Attribute `json:"Attributes,omitempty"` // The attributes of the process. Assuming tm1.Attributes is a string for simplicity. LocalizedAttributes []LocalizedAttribute `json:"LocalizedAttributes,omitempty"` // Translated string values for properties of the process. ErrorLogs []ProcessErrorLog `json:"ErrorLogs,omitempty"` // A collection of error logs for the process. UIData string `json:"UIData,omitempty"` // string "CubeAction=1511\fDataAction=1503\fCubeLogChanges=0\f" VariablesUIData []interface{} `json:"VariablesUIData,omitempty"` }
Process represents a TurboIntegrator process that can be used to manipulate TM1 data and metadata.
func NewProcess ¶
func (*Process) AddParameter ¶
func (*Process) GetParameter ¶
func (p *Process) GetParameter(name string) *ProcessParameter
func (*Process) RemoveParameter ¶
type ProcessDataSource ¶
type ProcessDataSource struct { Type string `json:"Type,omitempty"` AsciiDecimalSeparator string `json:"asciiDecimalSeparator,omitempty"` AsciiDelimiterChar string `json:"asciiDelimiterChar,omitempty"` AsciiDelimiterType string `json:"asciiDelimiterType,omitempty"` // "Character" or "FixedWidth" AsciiHeaderRecords int `json:"asciiHeaderRecords,omitempty"` AsciiQuoteCharacter string `json:"asciiQuoteCharacter,omitempty"` AsciiThousandSeparator string `json:"asciiThousandSeparator,omitempty"` DataSourceNameForClient string `json:"dataSourceNameForClient,omitempty"` DataSourceNameForServer string `json:"dataSourceNameForServer,omitempty"` UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` Query string `json:"query,omitempty"` UsesUnicode string `json:"usesUnicode,omitempty"` View string `json:"view,omitempty"` Subset string `json:"subset,omitempty"` }
type ProcessErrorLog ¶
type ProcessErrorLog struct { Timestamp time.Time `json:"Timestamp,omitempty"` // The date and time of the process error. Content []byte `json:"Content,omitempty"` // The content of the process error. }
ProcessErrorLog represents a collection of error logs for the process.
type ProcessExecuteResult ¶
type ProcessExecuteResult struct { ProcessExecuteStatusCode ProcessExecuteStatusCode `json:"ProcessExecuteStatusCode"` ErrorLogFile ErrorLogFile `json:"ErrorLogFile"` }
type ProcessExecuteStatusCode ¶
type ProcessExecuteStatusCode int
ProcessExecuteStatusCode is the custom type for the enum.
const ( // Enum values with their corresponding integer representations. CompletedSuccessfully ProcessExecuteStatusCode = iota Aborted HasMinorErrors QuitCalled CompletedWithMessages RollbackCalled )
func (ProcessExecuteStatusCode) ToString ¶
func (p ProcessExecuteStatusCode) ToString() string
ToString maps enum values to their corresponding string names.
func (*ProcessExecuteStatusCode) UnmarshalJSON ¶
func (p *ProcessExecuteStatusCode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type ProcessParameter ¶
type ProcessParameter struct { Name string `json:"Name,omitempty"` // The name of the parameter, cannot be null. Prompt string `json:"Prompt,omitempty"` // The prompt text for the parameter. Value interface{} `json:"Value,omitempty"` // The value of the parameter, can be Edm.Double or Edm.String. Use interface{} to accommodate both types. Type string `json:"Type,omitempty"` // The type of the process variable, cannot be null. Assuming tm1.ProcessVariableType is represented as a string. }
ProcessParameter represents a parameter used by the process, which can have a value of different types.
type ProcessService ¶
type ProcessService struct {
// contains filtered or unexported fields
}
func NewProcessService ¶
func NewProcessService(rest *RestService, object *ObjectService) *ProcessService
func (*ProcessService) Compile ¶
func (ps *ProcessService) Compile(processName string) ([]ProcessSyntaxError, error)
Compile process in TM1
func (*ProcessService) CompileProcess ¶
func (ps *ProcessService) CompileProcess(process Process) ([]ProcessSyntaxError, error)
Compile unbound process
func (*ProcessService) Create ¶
func (ps *ProcessService) Create(process *Process) error
Create process in TM1
func (*ProcessService) Delete ¶
func (ps *ProcessService) Delete(processName string) error
Delete process from TM1
func (*ProcessService) Execute ¶
func (ps *ProcessService) Execute(processName string, parameters map[string]interface{}, timeout time.Duration) error
Execute process
func (*ProcessService) ExecuteProcessWithReturn ¶
func (ps *ProcessService) ExecuteProcessWithReturn(process *Process, parameters map[string]interface{}, timeout time.Duration) (*ProcessExecuteResult, error)
Execute unboud process
func (*ProcessService) ExecuteTICode ¶
func (ps *ProcessService) ExecuteTICode(prologCode string, epilogCode string) (*ProcessExecuteResult, error)
Execute TI code
func (*ProcessService) ExecuteWithReturn ¶
func (ps *ProcessService) ExecuteWithReturn(processName string, parameters map[string]interface{}, timeout time.Duration) (*ProcessExecuteResult, error)
Execute process with return
func (*ProcessService) Exists ¶
func (ps *ProcessService) Exists(processName string) (bool, error)
Exists checks if the process exists in TM1
func (*ProcessService) Get ¶
func (ps *ProcessService) Get(processName string) (*Process, error)
Get retrieves a process from TM1
func (*ProcessService) GetAll ¶
func (ps *ProcessService) GetAll(skipControlProcesses bool) ([]Process, error)
GetAll retrieves all processes from TM1
func (*ProcessService) GetAllNames ¶
func (ps *ProcessService) GetAllNames(skipControlProcesses bool) ([]string, error)
GetAllNames retrieves all process names from TM1
func (*ProcessService) GetErrorLogFileContent ¶
func (ps *ProcessService) GetErrorLogFileContent(filename string) (string, error)
func (*ProcessService) GetErrorLogFilenams ¶
func (*ProcessService) GetLastMessageFromProcessErrorLog ¶
func (ps *ProcessService) GetLastMessageFromProcessErrorLog(processName string) (string, error)
func (*ProcessService) GetProcessErrorLogs ¶
func (ps *ProcessService) GetProcessErrorLogs(processName string) ([]ProcessErrorLog, error)
Get all ProcessErrorLog entries for a process
func (*ProcessService) SearchErrorLogFilenames ¶
func (ps *ProcessService) SearchErrorLogFilenames(searchString string, top int, descending bool) ([]string, error)
Search error log filenames for given search string like a datestamp e.g. 20231201
func (*ProcessService) SearchStringInCode ¶
func (ps *ProcessService) SearchStringInCode(searchString string, skipControlProcesses bool) ([]string, error)
SearchStringInCode searches for a string in the code of all processes in TM1
func (*ProcessService) Update ¶
func (ps *ProcessService) Update(process *Process) error
Update process in TM1
type ProcessSyntaxError ¶
type ProcessVariable ¶
type ProcessVariable struct { Name string `json:"Name"` // The name of the process variable, cannot be null. Type string `json:"Type"` // The type of the process variable, cannot be null. Position int `json:"Position,omitempty"` // The position of the variable in the data source. StartByte int `json:"StartByte,omitempty"` // The starting byte position of the variable in the data source. EndByte int `json:"EndByte,omitempty"` // The ending byte position of the variable in the data source. }
type RestService ¶
type RestService struct { Address string // The address of the target server or service Port int // The HTTP port number for communication SSL bool // Indicates whether SSL/TLS encryption is enabled Instance string // The name of the specific instance or system Database string // The name of the database or data source BaseURL string // The base URL for API endpoints AuthURL string // The URL for authentication services User string // The username or user identifier Password string // The user's password DecodeB64 bool // Specifies if the password is base64 encoded Namespace string // An optional namespace for access control CAMPassport string // The CAM (Cognos Access Manager) passport SessionID map[string]string // The unique session identifier ApplicationClientID string // The client ID for application integration ApplicationClientSecret string // The client secret for application integration APIKey string // The API Key for authentication IAMURL string // The IBM Cloud IAM (Identity and Access Management) URL PAURL string // The URL for the Planning Analytics Engine Tenant string // The tenant identifier SessionContext string // The name of the application context Verify bool // Logging bool // Specifies whether verbose HTTP logging is enabled Timeout float64 // The maximum time to wait for the first byte in seconds CancelAtTimeout bool // Indicates whether operations should be aborted on timeout AsyncRequestsMode bool // Enables a mode to avoid 60s timeouts on IBM Cloud TCPKeepAlive bool // Maintains the TCP connection continuously ConnectionPoolSize int // Size of the connection pool in a multi-threaded environment IntegratedLogin bool // Enables IntegratedSecurityMode3 IntegratedLoginDomain string // The NT Domain name for integrated login IntegratedLoginService string // The Kerberos Service type for remote Service Principal Name IntegratedLoginHost string // The host name for Service Principal Name IntegratedLoginDelegate bool // Indicates whether user credentials are delegated to the server Impersonate string // The name of the user to impersonate ReconnectOnSessionTimeout bool // Attempts to reconnect once if the session times out Proxies map[string]string // A dictionary of proxy settings MaxRetryAttempts int // The maximum number of times to retry a request Gateway string AuthMode AuthenticationMode // The authentication mode for the connection VerifyCertPath string // The path to a certificate file for verification // contains filtered or unexported fields }
RestService is a struct that contains the configuration for a TM1 REST API connection
func NewRestClient ¶
func NewRestClient(config TM1ServiceConfig) *RestService
Constructor for RestService
func (*RestService) IsDataAdmin ¶
func (rs *RestService) IsDataAdmin() bool
isDataAdmin checks if the active user is a data admin.
func (*RestService) IsOpsAdmin ¶
func (rs *RestService) IsOpsAdmin() bool
IsOpsAdmin checks if the active user is an operations admin.
type RuleSyntaxError ¶
type SandboxService ¶
type SandboxService struct {
// contains filtered or unexported fields
}
func NewSandboxService ¶
func NewSandboxService(rest *RestService) *SandboxService
type StaticConfiguration ¶
type StaticConfiguration struct { OdataContext string `json:"@odata.context"` ServerName string `json:"ServerName"` Access struct { Network struct { IPAddress interface{} `json:"IPAddress"` IPVersion string `json:"IPVersion"` NetRecvBlockingWaitLimit interface{} `json:"NetRecvBlockingWaitLimit"` NetRecvMaxClientIOWaitWithinAPIs interface{} `json:"NetRecvMaxClientIOWaitWithinAPIs"` IdleConnectionTimeOut interface{} `json:"IdleConnectionTimeOut"` ReceiveProgressResponseTimeout interface{} `json:"ReceiveProgressResponseTimeout"` } `json:"Network"` Authentication struct { SecurityPackageName string `json:"SecurityPackageName"` ServicePrincipalName interface{} `json:"ServicePrincipalName"` IntegratedSecurityMode string `json:"IntegratedSecurityMode"` MaximumLoginAttempts interface{} `json:"MaximumLoginAttempts"` } `json:"Authentication"` SSL struct { Enable bool `json:"Enable"` CertificateID interface{} `json:"CertificateID"` CertAuthority interface{} `json:"CertAuthority"` CertRevocationFile interface{} `json:"CertRevocationFile"` ClientExportServerKeyID interface{} `json:"ClientExportServerKeyID"` KeyFile interface{} `json:"KeyFile"` KeyStashFile interface{} `json:"KeyStashFile"` KeyLabel interface{} `json:"KeyLabel"` TLSCipherList interface{} `json:"TLSCipherList"` FIPSOperationMode interface{} `json:"FIPSOperationMode"` NISTSP800131AMODE interface{} `json:"NIST_SP800_131A_MODE"` } `json:"SSL"` CAM struct { CAMUseSSL interface{} `json:"CAMUseSSL"` ClientURI interface{} `json:"ClientURI"` ServerURIs interface{} `json:"ServerURIs"` PortalVariableFile interface{} `json:"PortalVariableFile"` ClientPingCAMPassport interface{} `json:"ClientPingCAMPassport"` ServerCAMURIRetryAttempts interface{} `json:"ServerCAMURIRetryAttempts"` CreateNewCAMClients interface{} `json:"CreateNewCAMClients"` } `json:"CAM"` LDAP struct { Enable bool `json:"Enable"` Host interface{} `json:"Host"` Port interface{} `json:"Port"` UseServerAccount interface{} `json:"UseServerAccount"` VerifyCertServerName interface{} `json:"VerifyCertServerName"` VerifyServerSSLCert interface{} `json:"VerifyServerSSLCert"` SkipSSLCertVerification interface{} `json:"SkipSSLCertVerification"` SkipSSLCRLVerification interface{} `json:"SkipSSLCRLVerification"` WellKnownUserName interface{} `json:"WellKnownUserName"` PasswordFile interface{} `json:"PasswordFile"` PasswordKeyFile interface{} `json:"PasswordKeyFile"` SearchBase interface{} `json:"SearchBase"` SearchField interface{} `json:"SearchField"` } `json:"LDAP"` CAPI struct { Port int `json:"Port"` ClientMessagePort int `json:"ClientMessagePort"` MessageCompression interface{} `json:"MessageCompression"` ProgressMessage bool `json:"ProgressMessage"` ClientVersionMaximum interface{} `json:"ClientVersionMaximum"` ClientVersionMinimum interface{} `json:"ClientVersionMinimum"` ClientVersionPrecision interface{} `json:"ClientVersionPrecision"` } `json:"CAPI"` HTTP struct { Port int `json:"Port"` SessionTimeout interface{} `json:"SessionTimeout"` SessionMaxRequests interface{} `json:"SessionMaxRequests"` RequestEntityMaxSizeInKB interface{} `json:"RequestEntityMaxSizeInKB"` OriginAllowList []interface{} `json:"OriginAllowList"` } `json:"HTTP"` } `json:"Access"` Administration struct { ServerName string `json:"ServerName"` AdminHost string `json:"AdminHost"` Language interface{} `json:"Language"` DataBaseDirectory string `json:"DataBaseDirectory"` UnicodeUpperLowerCase interface{} `json:"UnicodeUpperLowerCase"` MaskUserNameInServerTools interface{} `json:"MaskUserNameInServerTools"` AllowReadOnlyChoreReschedule interface{} `json:"AllowReadOnlyChoreReschedule"` DisableSandboxing interface{} `json:"DisableSandboxing"` RunningInBackground interface{} `json:"RunningInBackground"` StartupChores interface{} `json:"StartupChores"` PerformanceMonitorOn interface{} `json:"PerformanceMonitorOn"` PerfMonActive interface{} `json:"PerfMonActive"` EnableSandboxDimension interface{} `json:"EnableSandboxDimension"` Clients struct { PasswordMinimumLength interface{} `json:"PasswordMinimumLength"` ClientPropertiesSyncInterval interface{} `json:"ClientPropertiesSyncInterval"` RetainNonCAMGroupMembership interface{} `json:"RetainNonCAMGroupMembership"` } `json:"Clients"` AuditLog struct { Enable bool `json:"Enable"` UpdateInterval string `json:"UpdateInterval"` MaxFileSizeKilobytes int `json:"MaxFileSizeKilobytes"` MaxQueryMemoryKilobytes interface{} `json:"MaxQueryMemoryKilobytes"` } `json:"AuditLog"` DebugLog struct { LoggingDirectory interface{} `json:"LoggingDirectory"` } `json:"DebugLog"` ServerLog struct { Enable bool `json:"Enable"` LogReleaseLineCount interface{} `json:"LogReleaseLineCount"` } `json:"ServerLog"` EventLog struct { Enable interface{} `json:"Enable"` ScanFrequency interface{} `json:"ScanFrequency"` ThresholdForThreadRunningTime interface{} `json:"ThresholdForThreadRunningTime"` ThresholdForThreadWaitingTime interface{} `json:"ThresholdForThreadWaitingTime"` ThresholdForThreadBlockingNumber interface{} `json:"ThresholdForThreadBlockingNumber"` ThresholdForPooledMemoryInMB interface{} `json:"ThresholdForPooledMemoryInMB"` } `json:"EventLog"` TopLog struct { Enable interface{} `json:"Enable"` ScanMode interface{} `json:"ScanMode"` ScanFrequency interface{} `json:"ScanFrequency"` } `json:"TopLog"` Java struct { ClassPath interface{} `json:"ClassPath"` JVMPath interface{} `json:"JVMPath"` JVMArgs interface{} `json:"JVMArgs"` } `json:"Java"` ExternalDatabase struct { OracleErrorForceRowStatus interface{} `json:"OracleErrorForceRowStatus"` SQLFetchType interface{} `json:"SQLFetchType"` SQLRowsetSize interface{} `json:"SQLRowsetSize"` ODBCLibraryPath interface{} `json:"ODBCLibraryPath"` TM1ConnectorforSAP interface{} `json:"TM1ConnectorforSAP"` UseNewConnectorforSAP interface{} `json:"UseNewConnectorforSAP"` ODBCTimeoutInSeconds interface{} `json:"ODBCTimeoutInSeconds"` } `json:"ExternalDatabase"` TM1Web struct { ExcelWebPublishEnabled interface{} `json:"ExcelWebPublishEnabled"` } `json:"TM1Web"` FileRetry struct { FileRetryCount interface{} `json:"FileRetryCount"` FileRetryDelayMilliseconds interface{} `json:"FileRetryDelayMilliseconds"` FileRetryFileSpec interface{} `json:"FileRetryFileSpec"` } `json:"FileRetry"` DownTime string `json:"DownTime"` } `json:"Administration"` Modelling struct { MDXSelectCalculatedMemberInputs interface{} `json:"MDXSelectCalculatedMemberInputs"` DefaultMeasuresDimension interface{} `json:"DefaultMeasuresDimension"` UserDefinedCalculations interface{} `json:"UserDefinedCalculations"` EnableNewHierarchyCreation bool `json:"EnableNewHierarchyCreation"` Spreading struct { SpreadingPrecision interface{} `json:"SpreadingPrecision"` ProportionSpreadToZeroCells interface{} `json:"ProportionSpreadToZeroCells"` } `json:"Spreading"` TI struct { CognosTM1InterfacePath interface{} `json:"CognosTM1InterfacePath"` UseExcelSerialDate interface{} `json:"UseExcelSerialDate"` MaximumTILockObjects interface{} `json:"MaximumTILockObjects"` EnableTIDebugging bool `json:"EnableTIDebugging"` } `json:"TI"` Rules struct { AllowSeparateNandCRules bool `json:"AllowSeparateNandCRules"` AutomaticallyAddCubeDependencies interface{} `json:"AutomaticallyAddCubeDependencies"` RulesOverwriteCellsOnLoad interface{} `json:"RulesOverwriteCellsOnLoad"` ForceReevaluationOfFeedersForFedCellsOnDataChange bool `json:"ForceReevaluationOfFeedersForFedCellsOnDataChange"` } `json:"Rules"` Startup struct { PersistentFeeders bool `json:"PersistentFeeders"` SkipLoadingAliases interface{} `json:"SkipLoadingAliases"` MaximumCubeLoadThreads interface{} `json:"MaximumCubeLoadThreads"` LoadPrivateSubsetsOnStartup interface{} `json:"LoadPrivateSubsetsOnStartup"` } `json:"Startup"` Synchronization struct { SyncUnitSize interface{} `json:"SyncUnitSize"` MaximumSynchAttempts interface{} `json:"MaximumSynchAttempts"` } `json:"Synchronization"` } `json:"Modelling"` Performance struct { PrivilegeGenerationOptimization interface{} `json:"PrivilegeGenerationOptimization"` Memory struct { ApplyMaximumViewSizeToEntireTransaction interface{} `json:"ApplyMaximumViewSizeToEntireTransaction"` DisableMemoryCache interface{} `json:"DisableMemoryCache"` CacheFriendlyMalloc interface{} `json:"CacheFriendlyMalloc"` MaximumViewSizeMB interface{} `json:"MaximumViewSizeMB"` MaximumUserSandboxSizeMB interface{} `json:"MaximumUserSandboxSizeMB"` MaximumMemoryForSubsetUndoKB interface{} `json:"MaximumMemoryForSubsetUndoKB"` LockPagesInMemory interface{} `json:"LockPagesInMemory"` } `json:"Memory"` MTCubeLoad struct { Enabled interface{} `json:"Enabled"` Weight interface{} `json:"Weight"` MinFileSize interface{} `json:"MinFileSize"` UseBookmarkFiles interface{} `json:"UseBookmarkFiles"` } `json:"MTCubeLoad"` MTFeeders struct { Enabled interface{} `json:"Enabled"` AtStartup interface{} `json:"AtStartup"` } `json:"MTFeeders"` MTQ struct { UseAllThreads interface{} `json:"UseAllThreads"` NumberOfThreadsToUse interface{} `json:"NumberOfThreadsToUse"` SingleCellConsolidation interface{} `json:"SingleCellConsolidation"` ImmediateCheckForSplit interface{} `json:"ImmediateCheckForSplit"` OperationProgressCheckSkipLoopSize interface{} `json:"OperationProgressCheckSkipLoopSize"` MTFeeders interface{} `json:"MTFeeders"` MTFeedersAtStartup interface{} `json:"MTFeedersAtStartup"` MTQQuery interface{} `json:"MTQQuery"` } `json:"MTQ"` Locking struct { SubsetElementLockBreathing interface{} `json:"SubsetElementLockBreathing"` UseLocalCopiesForPublicDynamicSubsets interface{} `json:"UseLocalCopiesForPublicDynamicSubsets"` PullInvalidationSubsets interface{} `json:"PullInvalidationSubsets"` } `json:"Locking"` ViewCalculation struct { MagnitudeDifferenceToBeZero interface{} `json:"MagnitudeDifferenceToBeZero"` CheckFeedersMaximumCells interface{} `json:"CheckFeedersMaximumCells"` CalculationThresholdForStorage interface{} `json:"CalculationThresholdForStorage"` ViewConsolidationOptimization interface{} `json:"ViewConsolidationOptimization"` ViewConsolidationOptimizationMethod interface{} `json:"ViewConsolidationOptimizationMethod"` } `json:"ViewCalculation"` Stargate struct { ZeroWeightOptimization interface{} `json:"ZeroWeightOptimization"` AllRuleCalcStargateOptimization interface{} `json:"AllRuleCalcStargateOptimization"` UseStargateForRules interface{} `json:"UseStargateForRules"` } `json:"Stargate"` JobQueuing struct { Enable interface{} `json:"Enable"` ThreadSleepTime interface{} `json:"ThreadSleepTime"` ThreadPoolSize interface{} `json:"ThreadPoolSize"` MaxWaitTime interface{} `json:"MaxWaitTime"` } `json:"JobQueuing"` } `json:"Performance"` }
type Subset ¶
type Subset struct { Name string `json:"Name,omitempty"` UniqueName string `json:"UniqueName,omitempty"` Expression string `json:"Expression,omitempty"` Attributes map[string]interface{} `json:"Attributes,omitempty"` Alias string `json:"Alias,omitempty"` Hierarchy Hierarchy `json:"Hierarchy,omitempty"` Elements []Element `json:"Elements,omitempty"` ExpandAbove bool `json:"ExpandAbove,omitempty"` }
type SubsetService ¶
type SubsetService struct {
// contains filtered or unexported fields
}
func NewSubsetService ¶
func NewSubsetService(rest *RestService) *SubsetService
type TM1Service ¶
type TM1Service struct { ConfigurationService *ConfigurationService CubeService *CubeService ObjectService *ObjectService DimensionService *DimensionService ElementService *ElementService BatchService *BatchService HierarchyService *HierarchyService SubsetService *SubsetService ProcessService *ProcessService CellService *CellService FileService *FileService SandboxService *SandboxService ViewService *ViewService // contains filtered or unexported fields }
TM1Service is a service for interacting with TM1
func NewTM1Service ¶
func NewTM1Service(config TM1ServiceConfig) *TM1Service
NewTM1Service creates a new TM1Service instance
func (*TM1Service) Connect ¶
func (s *TM1Service) Connect() bool
Connect connects to the TM1 service
type TM1ServiceConfig ¶
type TM1ServiceConfig struct { Address string `json:"Address,omitempty"` // The address of the target server or service Port int `json:"Port,omitempty"` // The HTTP port number for communication SSL bool `json:"SS,omitempty"` // Indicates whether SSL/TLS encryption is enabled Instance string `json:"Instance,omitempty"` // The name of the specific instance or system Database string `json:"Database,omitempty"` // The name of the database or data source BaseURL string `json:"BaseURL,omitempty"` // The base URL for API endpoints AuthURL string `json:"AuthURL,omitempty"` // The URL for authentication services User string `json:"User,omitempty"` // The username or user identifier Password string `json:"Password,omitempty"` // The user's password DecodeB64 bool `json:"DecodeB64,omitempty"` // Specifies if the password is base64 encoded Namespace string `json:"Namespace,omitempty"` // An optional namespace for access control CAMPassport string `json:"CAMPassport,omitempty"` // The CAM (Cognos Access Manager) passport SessionID map[string]string `json:"SessionID,omitempty"` // The unique session identifier ApplicationClientID string `json:"ApplicationClientID,omitempty"` // The client ID for application integration ApplicationClientSecret string `json:"ApplicationClientSecret,omitempty"` // The client secret for application integration APIKey string `json:"APIKey,omitempty"` // The API Key for authentication IAMURL string `json:"IAMURL,omitempty"` // The IBM Cloud IAM (Identity and Access Management) URL PAURL string `json:"PAURL,omitempty"` // The URL for the Planning Analytics Engine Tenant string `json:"Tenant,omitempty"` // The tenant identifier SessionContext string `json:"SessionContext,omitempty"` // The name of the application context Verify bool `json:"Verify,omitempty"` // VerifyCertPath string `json:"VerifyCertPath,omitempty"` // The path to a certificate file for verification Logging bool `json:"Logging,omitempty"` // Specifies whether verbose HTTP logging is enabled Timeout float64 `json:"Timeout,omitempty"` // The maximum time to wait for the first byte in seconds CancelAtTimeout bool `json:"CancelAtTimeout,omitempty"` // Indicates whether operations should be aborted on timeout AsyncRequestsMode bool `json:"AsyncRequestsMode,omitempty"` // Enables a mode to avoid 60s timeouts on IBM Cloud TCPKeepAlive bool `json:"TCPKeepAlive,omitempty"` // Maintains the TCP connection continuously ConnectionPoolSize int `json:"ConnectionPoolSize,omitempty"` // Size of the connection pool in a multi-threaded environment IntegratedLogin bool `json:"IntegratedLogin,omitempty"` // Enables IntegratedSecurityMode3 IntegratedLoginDomain string `json:"IntegratedLoginDomain,omitempty"` // The NT Domain name for integrated login IntegratedLoginService string `json:"IntegratedLoginService,omitempty"` // The Kerberos Service type for remote Service Principal Name IntegratedLoginHost string `json:"IntegratedLoginHost,omitempty"` // The host name for Service Principal Name IntegratedLoginDelegate bool `json:"IntegratedLoginDelegate,omitempty"` // Indicates whether user credentials are delegated to the server Impersonate string `json:"Impersonate,omitempty"` // The name of the user to impersonate ReconnectOnSessionTimeout bool `json:"ReconnectOnSessionTimeout,omitempty"` // Attempts to reconnect once if the session times out Proxies map[string]string `json:"Proxies,omitempty"` // A dictionary of proxy settings Gateway string `json:"Gateway,omitempty"` Headers map[string]string `json:"Headers,omitempty"` Session interface{} `json:"Session,omitempty"` }
TM1ServiceConfig is a configuration for TM1Service
func (*TM1ServiceConfig) Load ¶
func (c *TM1ServiceConfig) Load(filePath string) error
Load loads the TM1ServiceConfig from a file
func (*TM1ServiceConfig) Save ¶
func (c *TM1ServiceConfig) Save(filePath string) error
Save saves the TM1ServiceConfig to a file
type ValueArray ¶
type ViewService ¶
type ViewService struct {
// contains filtered or unexported fields
}
func NewViewService ¶
func NewViewService(rest *RestService, object *ObjectService) *ViewService
func (*ViewService) Create ¶
func (vs *ViewService) Create(cubeName string, view View, private bool) error
Create a new view
func (*ViewService) Delete ¶
func (vs *ViewService) Delete(cubeName, viewName string, private bool) error
Delete a view
func (*ViewService) Execute ¶
func (vs *ViewService) Execute(cubeName, viewName string, private bool) (string, error)
Execute a view. Returns cellset id
func (*ViewService) Exists ¶
func (vs *ViewService) Exists(cubeName, viewName string, private bool) (bool, error)
Exists checks if a view exists
type ViewWrapper ¶
type ViewWrapper struct {
View View
}
func (*ViewWrapper) UnmarshalJSON ¶
func (vw *ViewWrapper) UnmarshalJSON(data []byte) error
Source Files ¶
- Attribute.go
- Batch.go
- BatchService.go
- Cell.go
- CellService.go
- Cellset.go
- CellsetAxis.go
- ConfigurationService.go
- Content.go
- Cube.go
- CubeService.go
- Dataframe.go
- Dimension.go
- DimensionService.go
- Edge.go
- Element.go
- ElementAttribute.go
- ElementService.go
- Error.go
- FileService.go
- Helper.go
- Hierarchy.go
- HierarchyService.go
- Level.go
- MDXBuilder.go
- MDXView.go
- Member.go
- MonitoringService.go
- NativeView.go
- ObjectService.go
- Process.go
- ProcessService.go
- RestService.go
- Sandbox.go
- SandboxService.go
- Subset.go
- SubsetService.go
- TM1Service.go
- Tuple.go
- ValueArray.go
- View.go
- ViewService.go