glik

package module
v0.0.0-...-d4cf1c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2016 License: Apache-2.0 Imports: 17 Imported by: 0

README

glik

go (golang) client api for the Qlik Sense family of products

I'm going to move to a "generated" API based on the JSON API spec shortly.

Documentation

Index

Constants

View Source
const CRLF = "\r\n"
View Source
const DEFAULT_AUTH_PORT = 4243
View Source
const DEFAULT_DIR = "WIN8-VBOX"
View Source
const DEFAULT_QRS_PORT = 4242
View Source
const DEFAULT_SERVER = "192.168.99.5"
View Source
const DEFAULT_USER = "atscale"
View Source
const DEFAULT_WEBSOCKET_PORT = 4747
View Source
const DELETE = "DELETE"
View Source
const GET = "GET"
View Source
const POST = "POST"
View Source
const PUT = "PUT"

Variables

View Source
var API_VERSION = "2.2"
View Source
var ErrDoesNotExist = errors.New("Does Not Exist")

Functions

This section is empty.

Types

type API

type API struct {
	Server              string
	QrsPort             int
	AuthPort            int
	WebsocketPort       int
	Version             string
	Directory           string
	QlikUser            string
	ClientKey           string
	ClientCert          string
	XrfKey              string
	CertAuth            string
	WebsocketConnection *websocket.Conn
}

func DefaultApi

func DefaultApi() API

func NewAPI

func NewAPI(server string, directory, user string, qrsPort, authPort, websocketPort int) API

func (*API) CloseWebSocket

func (api *API) CloseWebSocket() error

func (*API) CreateSheet

func (api *API) CreateSheet(handle int, title, description, thumbnail, id string, rows, columns, rank int) (Response, error)

func (*API) DoReload

func (api *API) DoReload(handle int) (Response, error)

func (*API) DoSave

func (api *API) DoSave(handle int) (Response, error)

func (*API) GetProgress

func (api *API) GetProgress(handle int, id int) (Response, error)

func (*API) GetScript

func (api *API) GetScript(handle int) (Response, error)

func (*API) ListStreams

func (api *API) ListStreams() (Response, error)

func (*API) OpenWebSocket

func (api *API) OpenWebSocket() error

func (*API) SetTLSItemLocations

func (api *API) SetTLSItemLocations(certLocation, keyLocation, caFile string) error

type About

type About struct {
	BuildVersion     string `json:"buildVersion,omitempty"`
	BuildDate        string `json:"buildDate,omitempty"`
	DatabaseProvider string `json:"databaseProvider,omitempty"`
	NodeType         int    `json:"nodeType,omitempty"`
	SchemaPath       string `json:"schemaPath,omitempty"`
}

type ApplicationResult

type ApplicationResult struct {
	Id                    string           `json:"id,omitempty"`
	CreatedDate           string           `json:"createdDate,omitempty"`
	ModifiedDate          string           `json:"modifiedDate,omitempty"`
	ModifiedByUserName    string           `json:"modifiedByUserName,omitempty"`
	CustomProperties      []CustomProperty `json:"customProperites,omitempty"`
	Owner                 *Owner           `json:"owner,omitempty"`
	Name                  string           `json:"name,omitempty"`
	AppId                 string           `json:"appId,omitempty"`
	PublishTime           string           `json:"publishTime,omitempty"`
	Published             bool             `json:"published,omitempty"`
	Tags                  []string         `json:"tags,omitempty"`
	Description           string           `json:"description,omitempty"`
	Stream                *Stream          `json:"stream,omitempty"`
	FileSize              int              `json:"fileSize,omitempty"`
	LastReloadTime        string           `json:"lastReloadTime,omitempty"`
	Thumbnail             string           `json:"thumbnail,omitempty"`
	SavedInProductVersion string           `json:"savedInProductVersion,omitempty"`
	MigrationHash         string           `json:"migrationHash,omitempty"`
	Privileges            *Privileges      `json:"privileges,omitempty"`
	SchemaPath            string           `json:"schemaPath,omitempty"`
}

type ChildListDef

type ChildListDef struct {
	Data *Data `json:"qData,omitempty"`
}

type CreateAppParms

type CreateAppParms struct {
	Params
}

type CustomProperty

type CustomProperty struct {
}

type Data

type Data struct {
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Meta        string `json:"meta,omitempty"`
	Order       string `json:"order,omitempty"`
	Type        string `json:"type,omitempty"`
	Id          string `json:"id,omitempty"`
	Lb          string `json:"lb,omitempty"`
	Hc          string `json:"hc,omitempty"`
}

type EngineStream

type EngineStream struct {
	Id   string `json:"qId,omitempty"`
	Name string `json:"qName,omitempty"`
}

type Info

type Info struct {
	ID   string `json:"qId,omitempty"`
	Type string `json:"qType,omitempty"`
}

type MetaDef

type MetaDef struct {
	Title        string        `json:"title,omitempty"`
	Description  string        `json:"description,omitempty"`
	ChildListDef *ChildListDef `json:"qChildListDef,omitempty"`
}

type Owner

type Owner struct {
	UserId        string `json:"userId,omitempty"`
	UserDirectory string `json:"userDirectory,omitempty"`
	Name          string `json:"name,omitempty"`
	Id            string `json:"id,omitempty"`
}

type Params

type Params struct {
	QID                        string `json:"qId,omitempty"`
	AppName                    string `json:"qAppName,omitempty"`
	LocalizedScriptMainSection string `json:"qLocalizedScriptMainSection,omitempty"`
}

type Privileges

type Privileges struct {
}

type Request

type Request struct {
	JsonRPCVersion string      `json:"jsonrpc,omitempty"`
	Id             int         `json:"id,omitempty"`
	Method         string      `json:"method,omitempty"`
	Handle         int         `json:"handle,omitempty"`
	Delta          bool        `json:"delta,omitempty"`
	Params         interface{} `json:"params"`
}

func CreateApp

func CreateApp(name string) Request

func CreateAppEx

func CreateAppEx(name string) Request

func CreateSheet

func CreateSheet(handle int, params SheetParams) Request

func DoReload

func DoReload(handle int) Request

func DoSave

func DoSave(handle int) Request

func GetActiveDoc

func GetActiveDoc() Request

func GetProgress

func GetProgress(handle int, id int) Request

func GetScript

func GetScript(handle int) Request

func GetStreamList

func GetStreamList() Request

func NewRequest

func NewRequest(id int, method string, handle int, params interface{}) Request

func OpenDoc

func OpenDoc(name string, user, directory string) Request

func SetScript

func SetScript(handle int, script string) Request

func (*Request) Json

func (r *Request) Json() string

type Response

type Response struct {
	JsonRPCVersion string          `json:"jsonrpc,omitempty"`
	Id             int             `json:"id"`
	Result         *Result         `json:"result,omitempty"`
	Error          *WebsocketError `json:"error,omitempty"`
	Change         []int           `json:"change"`
}

func (*Response) Json

func (r *Response) Json() string

type Result

type Result struct {
	Success    bool           `json:"qSuccess,omitempty"`
	AppId      string         `json:"qAppId,omitempty"`
	Type       string         `json:"qType,omitempty"`
	Handle     int            `json:"qHandle,omitempty"`
	Script     string         `json:"qScript,omitempty"`
	StreamList []EngineStream `json:"qStreamList,omitempty"`
	Return     Return         `json:"qReturn,omitempty"`
}

type Return

type Return struct {
	Type   string `json:"qType,omitempty"`
	Handle int    `json:"qHandle,omitempty"`
}

type SheetParams

type SheetParams struct {
	MetaDef   *MetaDef   `json:"qMetaDef,omitempty"`
	Rank      int        `json:"rank,omitempty"`
	Thumbnail *Thumbnail `json:"thumbnail,omitempty"`
	Columns   int        `json:"columns,omitempty"`
	Rows      int        `json:"rows,omitempty"`
	Cells     []string   `json:"cells"`
	Info      *Info      `json:"qInfo,omitempty"`
}

func CreateSheetParams

func CreateSheetParams(title, description, thumbnail, id string, rows, columns, rank int) SheetParams

type SheetParamsEx

type SheetParamsEx struct {
	Title        string        `json:"title,omitempty"`
	Description  string        `json:"description,omitempty"`
	Info         *Info         `json:"qInfo,omitempty"`
	ChildListDef *ChildListDef `json:"qChildListDef,omitempty"`
}

func CreateSheetParamsEx

func CreateSheetParamsEx(title, description, id string) SheetParamsEx

type StaticContentUrlDef

type StaticContentUrlDef struct {
	Url string `json:"qUrl,omitempty"`
}

type Stream

type Stream struct {
	Name       string      `json:"name,omitempty"`
	Id         string      `json:"id,omitempty"`
	Privileges *Privileges `json:"privileges,omitempty"`
}

type Thumbnail

type Thumbnail struct {
	StaticContentUrlDef *StaticContentUrlDef `json:"qStaticContentUrlDef,omitempty"`
}

func NewThumbnail

func NewThumbnail(asset string) *Thumbnail

type WebsocketError

type WebsocketError struct {
	Code      int    `json:"code,omitempty"`
	Parameter string `json:"parameter,omitempty"`
	Message   string `json:"message,omitempty"`
}

func (*WebsocketError) GetError

func (e *WebsocketError) GetError() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL