models

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OptionsInfo

type OptionsInfo struct {
	Entities   []SelectableString `json:"entities,omitempty"`
	Components []SelectableProps  `json:"components,omitempty"`
	Properties []SelectableString `json:"properties,omitempty"`
}

type SelectablePropGroup added in v1.3.0

type SelectablePropGroup struct {
	SelectableString
	Props []SelectableString `json:"props,omitempty"`
}

type SelectableProps

type SelectableProps struct {
	SelectableString
	TimeSeries []SelectableString    `json:"timeSeries,omitempty"`
	Props      []SelectableString    `json:"props,omitempty"`
	PropGroups []SelectablePropGroup `json:"propGroups,omitempty"`
	IsAlarm    bool                  `json:"isAlarm,omitempty"`
	IsAbstract bool                  `json:"isAbstract,omitempty"`
}

type SelectableString

type SelectableString struct {
	Label       string `json:"label"`
	Value       string `json:"value"`
	Description string `json:"description,omitempty"`
}

TwinMakerCustomMeta is the standard metadata

type TokenInfo

type TokenInfo struct {
	Expiration      int64   `json:"expiration,omitempty"`
	AccessKeyId     *string `json:"accessKeyId,omitempty"`
	SecretAccessKey *string `json:"secretAccessKey,omitempty"`
	SessionToken    *string `json:"sessionToken,omitempty"`
}

type TwinMakerCustomMeta

type TwinMakerCustomMeta struct {
	NextToken string `json:"nextToken,omitempty"`
}

TwinMakerCustomMeta is the standard metadata

func LoadMetaFromResponse added in v1.2.0

func LoadMetaFromResponse(res backend.DataResponse) *TwinMakerCustomMeta

LoadFromResponse returns the first non-empty TwinMakerCustomMeta from a DataResponse.

type TwinMakerDataSourceSetting

type TwinMakerDataSourceSetting struct {
	awsds.AWSDatasourceSettings
	AssumeRoleARNWriter string `json:"assumeRoleArnWriter"`
	WorkspaceID         string `json:"workspaceId"`
	UID                 string `json:"uid"`
}

func (*TwinMakerDataSourceSetting) Load

func (*TwinMakerDataSourceSetting) ToAWSDatasourceSettings

func (s *TwinMakerDataSourceSetting) ToAWSDatasourceSettings() awsds.AWSDatasourceSettings

func (*TwinMakerDataSourceSetting) ToAWSDatasourceSettingsWriter added in v1.3.0

func (s *TwinMakerDataSourceSetting) ToAWSDatasourceSettingsWriter() awsds.AWSDatasourceSettings

func (*TwinMakerDataSourceSetting) Validate

func (s *TwinMakerDataSourceSetting) Validate() error

type TwinMakerFilterValue added in v1.3.0

type TwinMakerFilterValue struct {
	BooleanValue *bool    `json:"booleanValue,omitempty"`
	DoubleValue  *float64 `json:"doubleValue,omitempty"`
	IntegerValue *int64   `json:"integerValue,omitempty"`
	LongValue    *int64   `json:"longValue,omitempty"`
	StringValue  *string  `json:"stringValue,omitempty"`
}

func (*TwinMakerFilterValue) DataValueToString added in v1.3.0

func (v *TwinMakerFilterValue) DataValueToString() string

func (*TwinMakerFilterValue) ToTwinMakerDataValue added in v1.3.0

func (v *TwinMakerFilterValue) ToTwinMakerDataValue() *iottwinmaker.DataValue

type TwinMakerListEntitiesFilter added in v1.1.1

type TwinMakerListEntitiesFilter struct {
	ComponentTypeId string `json:"componentTypeId,omitempty"`
	ExternalId      string `json:"externalId,omitempty"`
	ParentEntityId  string `json:"parentEntityId,omitempty"`
}

type TwinMakerOrderBy added in v1.3.0

type TwinMakerOrderBy struct {
	Order        TwinMakerResultOrder `json:"order,omitempty"`
	PropertyName string               `json:"propertyName,omitempty"`
}

func (*TwinMakerOrderBy) ToTwinMakerOrderBy added in v1.3.0

func (orderBy *TwinMakerOrderBy) ToTwinMakerOrderBy() *iottwinmaker.OrderBy

type TwinMakerPropertyFilter

type TwinMakerPropertyFilter struct {
	Name  string               `json:"name"`
	Value TwinMakerFilterValue `json:"value"`
	Op    string               `json:"op,omitempty"`
}

func (*TwinMakerPropertyFilter) ToTwinMakerFilter

func (f *TwinMakerPropertyFilter) ToTwinMakerFilter() *iottwinmaker.PropertyFilter

type TwinMakerQuery

type TwinMakerQuery struct {
	GrafanaLiveEnabled bool      `json:"grafanaLiveEnabled,omitempty"`
	IsStreaming        bool      `json:"isStreaming,omitempty"`
	WorkspaceId        string    `json:"workspaceId,omitempty"`
	EntityId           string    `json:"entityId,omitempty"`
	Properties         []*string `json:"properties,omitempty"`
	// Optional metadata saved with the query.  When this matches properties used in the results, it will
	// replace the display name
	PropertyDisplayNames map[string]string             `json:"propertyDisplayNames,omitempty"`
	NextToken            string                        `json:"nextToken,omitempty"`
	ComponentName        string                        `json:"componentName,omitempty"`
	ComponentTypeId      string                        `json:"componentTypeId,omitempty"`
	PropertyFilter       []TwinMakerPropertyFilter     `json:"filter,omitempty"`
	ListEntitiesFilter   []TwinMakerListEntitiesFilter `json:"listEntitiesFilter,omitempty"`
	Order                TwinMakerResultOrder          `json:"order,omitempty"`
	MaxResults           int                           `json:"maxResults,omitempty"`

	// Athena Data Connector parameters for iottwinmaker.GetPropertyValue
	TabularConditions TwinMakerTabularConditions `json:"tabularConditions,omitempty"`
	PropertyGroupName string                     `json:"propertyGroupName,omitempty"`

	IntervalStreamingSeconds int           `json:"intervalStreaming,string,omitempty"`
	IntervalStreaming        time.Duration `json:"_"`

	// Direct from the gRPC interfaces
	QueryType TwinMakerQueryType `json:"-"`
	TimeRange backend.TimeRange  `json:"-"`
}

TwinMakerQuery model

func ReadQuery

func ReadQuery(query backend.DataQuery) (TwinMakerQuery, error)

ReadQuery will read and validate Settings from the DataSourceConfig

func (*TwinMakerQuery) CacheKey

func (q *TwinMakerQuery) CacheKey(prefix string) string

type TwinMakerQueryType

type TwinMakerQueryType = string
const (
	QueryTypeListWorkspace    TwinMakerQueryType = "ListWorkspace" // each datasource will have a default workspace
	QueryTypeListScenes       TwinMakerQueryType = "ListScenes"    // required for scene viewer
	QueryTypeListEntities     TwinMakerQueryType = "ListEntities"  //
	QueryTypeGetEntity        TwinMakerQueryType = "GetEntity"     //
	QueryTypeGetPropertyValue TwinMakerQueryType = "GetPropertyValue"
	QueryTypeComponentHistory TwinMakerQueryType = "ComponentHistory"
	QueryTypeEntityHistory    TwinMakerQueryType = "EntityHistory"
	QueryTypeGetAlarms        TwinMakerQueryType = "GetAlarms"
)

type TwinMakerResultOrder

type TwinMakerResultOrder = string
const (
	ResultOrderAsc  TwinMakerResultOrder = "ASCENDING"
	ResultOrderDesc TwinMakerResultOrder = "DESCENDING"
)

type TwinMakerTabularConditions added in v1.3.0

type TwinMakerTabularConditions struct {
	OrderBy        []TwinMakerOrderBy        `json:"orderBy,omitempty"`
	PropertyFilter []TwinMakerPropertyFilter `json:"propertyFilter,omitempty"`
}

func (*TwinMakerTabularConditions) ToTwinMakerTabularConditions added in v1.3.0

func (tabularConditions *TwinMakerTabularConditions) ToTwinMakerTabularConditions() *iottwinmaker.TabularConditions

Jump to

Keyboard shortcuts

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