senseobjects

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	GUID   string
	Doc    *enigma.Doc
	Layout *enigma.NxAppLayout
	// contains filtered or unexported fields
}

App sense app object

func (*App) GetAggregatedSelectionFields

func (app *App) GetAggregatedSelectionFields() string

func (*App) GetBookmarkList

func (app *App) GetBookmarkList(sessionState SessionState, actionState *action.State) (*BookmarkList, error)

GetBookmarkList update bookmark list for app

func (*App) GetBookmarkObject added in v0.5.2

func (app *App) GetBookmarkObject(sessionState SessionState, actionState *action.State, id string) (*enigma.GenericBookmark, error)

func (*App) GetCurrentSelections

func (app *App) GetCurrentSelections(sessionState SessionState, actionState *action.State) (*CurrentSelections, error)

GetCurrentSelections create current selection session object and add to list

func (*App) GetLocaleInfo

func (app *App) GetLocaleInfo(ctx context.Context) (*enigma.LocaleInfo, error)

GetLocaleInfo send get locale info request

func (*App) GetSheetList

func (app *App) GetSheetList(sessionState SessionState, actionState *action.State) (*SheetList, error)

GetSheetList update sheet list for app

type AppObjectList

type AppObjectList struct {
	Items []*AppObjectListItem `json:"qItems"`
}

type AppObjectListItem

type AppObjectListItem struct {
	Info *AppObjectListItemInfo `json:"qInfo"`
	Meta *AppObjectListItemMeta `json:"qMeta"`
	Data *AppObjectListItemData `json:"qData"`
}

type AppObjectListItemData

type AppObjectListItemData struct {
	OdagLinkRef string `json:"odagLinkRef"`
}

type AppObjectListItemInfo

type AppObjectListItemInfo struct {
	Id   string `json:"qId"`
	Type string `json:"qType"`
}

type AppObjectListItemMeta

type AppObjectListItemMeta struct {
	Name string `json:"qName"`
}

type BookmarkData

type BookmarkData struct {
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	SheetId     string `json:"sheetId,omitempty"`
}

BookmarkData data for a bookmark

type BookmarkList

type BookmarkList struct {
	// contains filtered or unexported fields
}

BookmarkList container with bookmarks

func CreateBookmarkListObject

func CreateBookmarkListObject(ctx context.Context, doc *enigma.Doc) (*BookmarkList, error)

CreateBookmarkListObject create bookmarklist session object

func (*BookmarkList) GetBookmarks

func (bookmarkList *BookmarkList) GetBookmarks() []*BookmarkNxContainerEntry

GetBookmarks for bookmarkList

func (*BookmarkList) UpdateLayout

func (bookmarkList *BookmarkList) UpdateLayout(ctx context.Context) error

UpdateLayout get and set a new layout for bookmarklist

func (*BookmarkList) UpdateProperties

func (bookmarkList *BookmarkList) UpdateProperties(ctx context.Context) error

UpdateProperties get and set properties for bookmarklist

type BookmarkListAppObjectList

type BookmarkListAppObjectList struct {
	enigma.AppObjectList
	Items []*BookmarkNxContainerEntry `json:"qItems,omitempty"`
}

type BookmarkListLayout

type BookmarkListLayout struct {
	enigma.GenericObjectLayout
	BookmarkList *BookmarkListAppObjectList `json:"qBookmarkList,omitempty"`
}

type BookmarkListProperties

type BookmarkListProperties struct {
	Info    enigma.NxInfo            `json:"qInfo,omitempty"`
	MetaDef enigma.NxMetaDef         `json:"qMetaDef,omitempty"`
	Data    *SheetListPropertiesData `json:"qData,omitempty"`
}

BookmarkListProperties bookmarklist properties

type BookmarkListPropertiesData

type BookmarkListPropertiesData struct {
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Cells       string `json:"cells,omitempty"`
}

BookmarkListPropertiesData properties of bookmarklist

type BookmarkNxContainerEntry

type BookmarkNxContainerEntry struct {
	enigma.NxContainerEntry
	Data *BookmarkData `json:"qData,omitempty"`
}

BookmarkNxContainerEntry container bookmark data

type CurrentSelectionLayout

type CurrentSelectionLayout struct {
	NxInfo          enigma.NxInfo          `json:"qInfo,omitempty"`
	NxSelectionInfo enigma.NxSelectionInfo `json:"qNxSelectionInfo,omitempty"`
	SelectionObject enigma.SelectionObject `json:"qSelectionObject,omitempty"`
}

CurrentSelectionLayout layout object

type CurrentSelectionProperties

type CurrentSelectionProperties struct {
	Info               enigma.NxInfo             `json:"qInfo"`
	MetaDef            enigma.NxMetaDef          `json:"qMetaDef"`
	SelectionObjectDef enigma.SelectionObjectDef `json:"qSelectionObjectDef"`
}

CurrentSelectionProperties properties object

type CurrentSelections

type CurrentSelections struct {
	// contains filtered or unexported fields
}

CurrentSelections object containing current selection state

func CreateCurrentSelections

func CreateCurrentSelections(ctx context.Context, doc *enigma.Doc) (*CurrentSelections, error)

CreateCurrentSelections create current selections session object

func (*CurrentSelections) Layout

Layout for current selections

func (*CurrentSelections) Properties

Properties for current selections

func (*CurrentSelections) UpdateLayout

func (cs *CurrentSelections) UpdateLayout(ctx context.Context) error

UpdateLayout for current selections

func (*CurrentSelections) UpdateProperties

func (cs *CurrentSelections) UpdateProperties(ctx context.Context) error

UpdateProperties for current selections

type DynamicAppViewList

type DynamicAppViewList struct {
	// contains filtered or unexported fields
}

DynamicAppViewList container with dav list in sense app

func CreateDynamicAppViewList

func CreateDynamicAppViewList(ctx context.Context, doc *enigma.Doc) (*DynamicAppViewList, error)

CreateDynamicAppViewList create dav session object

func (*DynamicAppViewList) Layout

func (davlist *DynamicAppViewList) Layout() *DynamicAppViewListLayout

Layout for DynamicAppViewList

func (*DynamicAppViewList) UpdateLayout

func (davlist *DynamicAppViewList) UpdateLayout(ctx context.Context) error

UpdateLayout get and set a new layout for sheetlist

type DynamicAppViewListLayout

type DynamicAppViewListLayout struct {
	enigma.GenericObjectLayout
	AppObjectList *AppObjectList `json:"qAppObjectList"`
}

type FieldList added in v0.5.7

type FieldList struct {
	// contains filtered or unexported fields
}

func CreateFieldListObject added in v0.5.7

func CreateFieldListObject(ctx context.Context, doc *enigma.Doc) (*FieldList, error)

CreateFieldListObject create fieldlist session object

func (*FieldList) Layout added in v0.5.7

func (fieldlist *FieldList) Layout() *enigma.GenericObjectLayout

Layout of fieldlist object

func (*FieldList) Properties added in v0.5.7

func (fieldlist *FieldList) Properties() *enigma.GenericObjectProperties

Properties of fieldlist object

func (*FieldList) UpdateLayout added in v0.5.7

func (fieldlist *FieldList) UpdateLayout(ctx context.Context) error

UpdateLayout update object with new layout from engine

func (*FieldList) UpdateProperties added in v0.5.7

func (fieldlist *FieldList) UpdateProperties(ctx context.Context) error

UpdateProperties update object with new properties from engine

type ListBox

type ListBox struct {
	// contains filtered or unexported fields
}

ListBox container with listbox in sense app

func CreateListBoxObject

func CreateListBoxObject(ctx context.Context, doc *enigma.Doc, name string) (*ListBox, error)

CreateListBoxObject create listbox session object

func (*ListBox) GetListObjectData

func (listBox *ListBox) GetListObjectData(ctx context.Context) ([]*enigma.NxDataPage, error)

GetListObjectData get datapages

func (*ListBox) Layout

func (listBox *ListBox) Layout() *ListBoxLayout

Layout for listBox

func (*ListBox) UpdateLayout

func (listBox *ListBox) UpdateLayout(ctx context.Context) error

UpdateLayout get and set a new layout for listbox

func (*ListBox) UpdateProperties

func (listBox *ListBox) UpdateProperties(ctx context.Context) error

UpdateProperties get and set properties for listBox

type ListBoxLayout

type ListBoxLayout struct {
	enigma.GenericObjectLayout
	AppObjectList *enigma.ListObject `json:"qListBox,omitempty"`
}

ListBoxLayout listbox layout

type ListBoxProperties

type ListBoxProperties struct {
	Info    enigma.NxInfo    `json:"qInfo,omitempty"`
	MetaDef enigma.NxMetaDef `json:"qMetaDef,omitempty"`
}

ListBoxProperties listbox properties

type OdagToolbarNavpoint added in v0.5.4

type OdagToolbarNavpoint struct {
	// contains filtered or unexported fields
}

OdagToolbarNavpoint container with odag-toolbar-navpoint in sense app

func CreateOdagToolbarNavpoint added in v0.5.4

func CreateOdagToolbarNavpoint(ctx context.Context, doc *enigma.Doc, name string) (*OdagToolbarNavpoint, error)

CreateOdagToolbarNavpoint create odag-toolbar-navpoint session object

func (*OdagToolbarNavpoint) GetHypercubeData added in v0.5.4

func (otn *OdagToolbarNavpoint) GetHypercubeData(ctx context.Context) ([]*enigma.NxDataPage, error)

GetHypercubeData get datapages

func (*OdagToolbarNavpoint) Layout added in v0.5.4

Layout for odag-toolbar-navpoint

func (*OdagToolbarNavpoint) UpdateLayout added in v0.5.4

func (otn *OdagToolbarNavpoint) UpdateLayout(ctx context.Context) error

UpdateLayout get and set a new layout for odag-toolbar-navpoint

type OdagToolbarNavpointLayout added in v0.5.4

type OdagToolbarNavpointLayout struct {
	enigma.GenericObjectLayout
}

OdagToolbarNavpointLayout odag-toolbar-navpoint layout

type SessionState

type SessionState interface {
	BaseContext() context.Context
	QueueRequest(f func(ctx context.Context) error, actionState *action.State, failOnError bool, errMsg string)
	SendRequest(actionState *action.State, f func(ctx context.Context) error) error
	RegisterEvent(handle int,
		onEvent func(ctx context.Context, actionState *action.State) error,
		onClose func(),
		failOnError bool)
	DeRegisterEvent(handle int)
}

SessionState temporary session interface to avoid circular dependencies

type Sheet

type Sheet struct {
	*enigma.GenericObject
	ID         string
	Properties *SheetProperties
	Layout     *SheetLayout
}

Sheet Sense sheet object

func GetSheet

func GetSheet(ctx context.Context, app *App, id string) (*Sheet, error)

GetSheet in sense app

func (*Sheet) GetLayout

func (sheet *Sheet) GetLayout(ctx context.Context) (*SheetLayout, error)

GetLayout for sheet

func (*Sheet) GetProperties

func (sheet *Sheet) GetProperties(ctx context.Context) (*SheetProperties, error)

GetProperties for sheet

func (*Sheet) SetProperties

func (sheet *Sheet) SetProperties(ctx context.Context) error

SetProperties send updates properties to Sense

type SheetCells

type SheetCells struct {
	Name    string `json:"name"`
	Type    string `json:"type"`
	Col     int    `json:"col,omitempty"`
	Row     int    `json:"row,omitempty"`
	Colspan int    `json:"colspan,omitempty"`
	Rowspan int    `json:"rowspan,omitempty"`
}

SheetCells cells on sheet

type SheetData

type SheetData struct {
	Cells []struct {
		Name string `json:"name,omitempty"`
		Type string `json:"type,omitempty"`
	} `json:"cells,omitempty"`
	Title       string      `json:"title,omitempty"`
	Description string      `json:"description,omitempty"`
	Rank        interface{} `json:"rank,omitempty"`
}

SheetData data for a sheet

type SheetLayout

type SheetLayout struct {
	Info *enigma.NxInfo `json:"qInfo"`
	Meta struct {
		Description  string      `json:"description"`
		Rank         int         `json:"rank"`
		Title        string      `json:"title"`
		Resourcetype string      `json:"_resourcetype"`
		Objecttype   string      `json:"_objecttype"`
		ID           string      `json:"id"`
		Approved     bool        `json:"approved"`
		Published    bool        `json:"published"`
		Owner        interface{} `json:"owner"` // string in QSEoK but struct in QSEfW
		OwnerID      string      `json:"ownerId"`
		CreatedDate  string      `json:"createdDate"`
		ModifiedDate string      `json:"modifiedDate"`
		Privileges   []string    `json:"privileges"`
	} `json:"qMeta"`
	SelectionInfo struct {
	} `json:"qSelectionInfo"`
	Cells []interface{} `json:"cells"`
}

SheetLayout layout of sense sheet

type SheetList

type SheetList struct {
	// contains filtered or unexported fields
}

SheetList container with sheet in sense app

func CreateSheetListObject

func CreateSheetListObject(ctx context.Context, doc *enigma.Doc) (*SheetList, error)

CreateSheetListObject create sheetlist session object

func (*SheetList) GetSheetEntry

func (sheetList *SheetList) GetSheetEntry(sheetid string) (*SheetNxContainerEntry, error)

GetSheetEntry Get sheet entry from sheet list

func (*SheetList) Layout

func (sheetList *SheetList) Layout() *SheetListLayout

Layout for sheetlist

func (*SheetList) Properties

func (sheetList *SheetList) Properties() *SheetListProperties

Properties for sheetlist

func (*SheetList) UpdateLayout

func (sheetList *SheetList) UpdateLayout(ctx context.Context) error

UpdateLayout get and set a new layout for sheetlist

func (*SheetList) UpdateProperties

func (sheetList *SheetList) UpdateProperties(ctx context.Context) error

UpdateProperties get and set properties for sheetlist

type SheetListAppObjectList

type SheetListAppObjectList struct {
	enigma.AppObjectList
	Items []*SheetNxContainerEntry `json:"qItems,omitempty"`
}

SheetListAppObjectList sheetlist app object list

type SheetListLayout

type SheetListLayout struct {
	enigma.GenericObjectLayout
	AppObjectList *SheetListAppObjectList `json:"qAppObjectList,omitempty"`
}

SheetListLayout sheetlist layout

type SheetListProperties

type SheetListProperties struct {
	Info    enigma.NxInfo            `json:"qInfo,omitempty"`
	MetaDef enigma.NxMetaDef         `json:"qMetaDef,omitempty"`
	Data    *SheetListPropertiesData `json:"qData,omitempty"`
}

SheetListProperties SheetList properties

type SheetListPropertiesData

type SheetListPropertiesData struct {
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Cells       string `json:"cells,omitempty"`
}

SheetListPropertiesData properties of sheetlist

type SheetMetaDef

type SheetMetaDef struct {
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
}

SheetMetaDef sheet meta information

type SheetNxContainerEntry

type SheetNxContainerEntry struct {
	enigma.NxContainerEntry
	Data *SheetData `json:"qData,omitempty"`
}

SheetNxContainerEntry container sheet data

type SheetProperties

type SheetProperties struct {
	Info      *enigma.NxInfo  `json:"qInfo"`
	MetaDef   *SheetMetaDef   `json:"qMetaDef"`
	Rank      float64         `json:"rank,omitempty"`
	Thumbnail *SheetThumbnail `json:"thumbnail,omitempty"`
	Columns   int             `json:"columns,omitempty"`
	Rows      int             `json:"rows,omitempty"`
	Cells     []*SheetCells   `json:"cells"`
}

SheetProperties properties of sense sheet

type SheetThumbnail

type SheetThumbnail struct {
	StaticContentURLef *enigma.StaticContentUrlDef `json:"qStaticContentUrlDef,omitempty"`
}

SheetThumbnail thumbnail object of sheet properties

Jump to

Keyboard shortcuts

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