Package gotm1 provides an idiomatic golang implementation of IBM TM1 Planning Analytics REST API, allowing clients to manage processes, and query data that is stored in the model.
To use this library effectively, you must be familiar with the following areas:
- TM1 and the TM1 architecture
- Dimensional data and modeling terminology and concepts
- Go (golang) programming language
This library has no other dependency so you can go get
like so:
$ go get -u https://github.com/tarcisio/gotm1
This project is compatible with go modules
.
The main package is github.com/tarcisio/gotm1
, to make it nicely decoupled
and make easier to test, the http client was created.
import (
"fmt"
"log"
"github.com/tarcisio/gotm1"
"github.com/tarcisio/gotm1/http"
)
tm1 := gotm1.New(
http.NewSimpleHTTPClient(
http.WithHost("tm1.example.com"),
http.WithPort(8091),
http.WithUsername("c6548654"),
http.WithPassword("p@$$w0rd"),
http.WithNamespace("CompanyLDAP"),
http.WithCognosIntegratedLogin(),
http.WithTimeoutConnection(5),
),
)
defer tm1.Logout()
cubes, err := tm1.GetCubes()
for _, cube := range cubes {
fmt.Println(cube.Name)
}