appstructure

package
v0.18.6 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ObjectTypeEnumMap enum of known object types which needs special handling
	ObjectTypeEnumMap = enummap.NewEnumMapOrPanic(map[string]int{
		"dimension":        int(ObjectTypeDimension),
		"measure":          int(ObjectTypeMeasure),
		"bookmark":         int(ObjectTypeBookmark),
		"masterobject":     int(ObjectTypeMasterObject),
		"auto-chart":       int(ObjectTypeAutoChart),
		"sheet":            int(ObjectSheet),
		"loadmodel":        int(ObjectLoadModel),
		"appprops":         int(ObjectAppprops),
		"snapshotlist":     int(ObjectSnapshotList),
		"snapshot":         int(ObjectSnapshot),
		"embeddedsnapshot": int(ObjectEmbeddedSnapshot),
		"story":            int(ObjectStory),
		"slide":            int(ObjectSlide),
		"slideitem":        int(ObjectSlideItem),
		"alertbookmark":    int(ObjectAlertBookmark),
		"hiddenbookmark":   int(ObjectHiddenBookmark),
	})
)

Functions

This section is empty.

Types

type AppObjectDef

type AppObjectDef struct {
	// Id of object
	Id string `json:"id"`
	// Type of Sense object
	Type string `json:"type"`
}

AppObjectDef title and ID of a Sense object

type AppStructure

type AppStructure struct {
	AppMeta AppStructureAppMeta `json:"meta"`
	// Objects in Sense app
	Objects map[string]AppStructureObject `json:"objects"`
	// Bookmark list of bookmarks in the app
	Bookmarks map[string]AppStructureBookmark `json:"bookmarks"`
	// Fields list of all fields in the app
	Fields map[string]AppStructureField `json:"fields"`
	// StoryObjects
	StoryObjects map[string]AppStructureStoryObject `json:"storyobjects"`
}

AppStructure of Sense app

func (*AppStructure) GetAllActive added in v0.6.10

func (structure *AppStructure) GetAllActive(rootID string) ([]AppStructureObject, error)

GetAllActive objects including root and all children

func (*AppStructure) GetSelectables

func (structure *AppStructure) GetSelectables(rootID string) ([]AppStructureObject, error)

GetSelectables get selectable objects from app structure

type AppStructureAppMeta

type AppStructureAppMeta struct {
	// Title of the app
	Title string `json:"title"`
	// Guid of the app
	Guid string `json:"guid"`
}

AppStructureAppMeta meta information about the app

type AppStructureBookmark

type AppStructureBookmark struct {
	// ID of bookmark
	ID string `json:"id"`
	// Title of bookmark
	Title string `json:"title"`
	// Description of bookmark
	Description string `json:"description"`
	// SheetId connected sheet ID, null if none
	SheetId *string `json:"sheetId,omitempty"`
	// SelectionFields fields bookmark would select in
	SelectionFields interface{} `json:"selectionFields"`
	// RawProperties of Bookmark object
	RawProperties json.RawMessage `json:"rawProperties,omitempty"`
}

AppStructureBookmark list of bookmarks in the app

type AppStructureDimensionMeta

type AppStructureDimensionMeta struct {
	// Meta information, only included for library items
	Meta *MetaDef `json:"meta,omitempty"`
	// LibraryId connects dimension to separately defined dimension
	LibraryId string `json:"libraryId,omitempty"`
	// LabelExpression optional parameter with label expression
	LabelExpression string `json:"labelExpression,omitempty"`
	// Defs definitions of dimension
	Defs []string `json:"defs,omitempty"`
	// Labels of dimension
	Labels []string `json:"labels,omitempty"`
}

type AppStructureField added in v0.5.7

type AppStructureField struct {
	enigma.NxFieldDescription
}

AppStructureField list of fields in the app

type AppStructureMeasureMeta

type AppStructureMeasureMeta struct {
	// Meta information, only included for library items
	Meta *MetaDef `json:"meta,omitempty"`
	// LibraryId connects measure to separately defined measure
	LibraryId string `json:"libraryId,omitempty"`
	// Label of on measure
	Label string `json:"label,omitempty"`
	// Def the actual measure definition
	Def string `json:"def,omitempty"`
}

type AppStructureNoScenarioActionsError

type AppStructureNoScenarioActionsError struct{}

func (AppStructureNoScenarioActionsError) Error

Error no applicable actions found in scenario

type AppStructureObject

type AppStructureObject struct {
	AppObjectDef
	MetaDef
	*SheetObjectMeta
	AppStructureObjectChildren
	// RawBaseProperties of Sense object
	RawBaseProperties json.RawMessage `json:"rawBaseProperties,omitempty"`
	// RawExtendedProperties of extended Sense object
	RawExtendedProperties json.RawMessage `json:"rawExtendedProperties,omitempty"`
	// RawGeneratedProperties inner generated properties of auto-chart
	RawGeneratedProperties json.RawMessage `json:"rawGeneratedProperties,omitempty"`
	// Selectable true if select can be done in object
	Selectable bool `json:"selectable"`
	// Dimensions meta information of dimensions defined in object
	Dimensions []AppStructureDimensionMeta `json:"dimensions,omitempty"`
	// Measures meta information of measures defined in object
	Measures []AppStructureMeasureMeta `json:"measures,omitempty"`
	// ExtendsId ID of linked object
	ExtendsId string `json:"extendsId,omitempty"`
	// Visualization visualization of object, if exists
	Visualization string `json:"visualization,omitempty"`
}

AppStructureObject sense object structure

type AppStructureObjectChildren added in v0.6.3

type AppStructureObjectChildren struct {
	// Map of children to the sense object
	Map map[string]string `json:"children,omitempty"`
}

AppStructureObjectChildren substructure adding children

type AppStructureObjectNotFoundError

type AppStructureObjectNotFoundError string

func (AppStructureObjectNotFoundError) Error

Error object was not found in app structure

type AppStructurePopulatedObjects

type AppStructurePopulatedObjects struct {
	// Parent id of the parent object
	Parent string
	// Objects first level app objects returned by the current action
	Objects []AppStructureObject
	// Bookmark bookmarks returned by the current action
	Bookmarks []AppStructureBookmark
}

AppStructurePopulatedObjects is the type returned by an action when prompted for selectable objects

type AppStructureStoryObject added in v0.6.3

type AppStructureStoryObject struct {
	AppObjectDef
	AppStructureObjectChildren
	// RawProperties of Sense object
	RawProperties json.RawMessage `json:"rawProperties,omitempty"`
	// Visualization visualization of object, if exists
	Visualization string `json:"visualization,omitempty"`
	// SnapshotID of linked object snapshot object
	SnapshotID string `json:"snapshotid,omitempty"`
	// RawSnapShotProperties of extended snapshot object
	RawSnapShotProperties json.RawMessage `json:"rawSnapshotProperties,omitempty"`
}

AppStructureStoryObject list of objects used in stories

type MetaDef

type MetaDef struct {
	// Title of library item
	Title string `json:"title,omitempty"`
	// Description of library item
	Description string `json:"description,omitempty"`
	// Tags of  of library item
	Tags []string `json:"tags,omitempty"`
}

MetaDef meta information for Library objects such as dimension and measure

type ObjectType

type ObjectType int
const (
	ObjectTypeDefault ObjectType = iota
	ObjectTypeDimension
	ObjectTypeMeasure
	ObjectTypeBookmark
	ObjectTypeMasterObject
	ObjectTypeAutoChart
	ObjectSheet
	ObjectLoadModel
	ObjectAppprops
	ObjectAlertBookmark
	ObjectHiddenBookmark

	// Objects connected to snapshots and stories
	ObjectSnapshotList
	ObjectSnapshot
	ObjectEmbeddedSnapshot
	ObjectStory
	ObjectSlide
	ObjectSlideItem
)

type SheetObjectMeta added in v0.6.7

type SheetObjectMeta struct {
	Published bool `json:"published"`
	Approved  bool `json:"approved"`
}

Jump to

Keyboard shortcuts

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