solution

package
v0.46.0-pre1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Copyright 2023 Cisco Systems, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2023 Cisco Systems, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const MAX_SUBSCRIBE_TRIES = 4

Variables

This section is empty.

Functions

func Fetch

func Fetch(path string, httpOptions *api.Options) map[string]interface{}

func GetSolutionForkCommand

func GetSolutionForkCommand() *cobra.Command

func GetTag added in v0.45.0

func GetTag(envVars interface{}) string

func LoadEnvVars added in v0.45.0

func LoadEnvVars(cmd *cobra.Command, tag, envVarsFile string) (interface{}, error)

func NewSubCmd

func NewSubCmd() *cobra.Command

func ReplaceStringInFile added in v0.45.0

func ReplaceStringInFile(fileSystem afero.Fs, filePath string, searchValue string, replaceValue string) error

Types

type ComponentDef

type ComponentDef struct {
	Type        string `json:"type,omitempty"`
	ObjectsFile string `json:"objectsFile,omitempty"`
	ObjectsDir  string `json:"objectsDir,omitempty"`
}

type DashuiCartesian added in v0.38.0

type DashuiCartesian struct {
	*DashuiWidget
	Children []*DashuiCartesianSeries `json:"children"`
}

func NewDashuiCartesian added in v0.38.0

func NewDashuiCartesian() *DashuiCartesian

type DashuiCartesianAxis added in v0.38.0

type DashuiCartesianAxis struct {
	Field string `json:"type"`
}

type DashuiCartesianMetric added in v0.38.0

type DashuiCartesianMetric struct {
	Name   string               `json:"name"`
	Source string               `json:"source"`
	Y      *DashuiCartesianAxis `json:"y"`
}

type DashuiCartesianSeries added in v0.38.0

type DashuiCartesianSeries struct {
	Props  interface{}            `json:"props"`
	Metric *DashuiCartesianMetric `json:"metric"`
	Type   string                 `json:"type"`
}

func NewDashuiCartesianSeries added in v0.38.0

func NewDashuiCartesianSeries(seriesName string, metricName string, metricSource string, seriesType string) *DashuiCartesianSeries

type DashuiClickable added in v0.38.0

type DashuiClickable struct {
	*DashuiWidget
	OnClick *DashuiEvent `json:"onclick,omitempty"`
	Trigger *DashuiLabel `json:"trigger,omitempty"`
}

func NewDashuiClickable added in v0.38.0

func NewDashuiClickable() *DashuiClickable

type DashuiEcpHomeEntity added in v0.38.0

type DashuiEcpHomeEntity struct {
	Index           int    `json:"index"`
	Section         string `json:"section"`
	EntityAttribute string `json:"entityAttribute"`
	TargetType      string `json:"targetType"`
}

type DashuiEcpHomeSection added in v0.38.0

type DashuiEcpHomeSection struct {
	Index int    `json:"index"`
	Name  string `json:"name"`
	Title string `json:"title"`
}

type DashuiEvent added in v0.38.0

type DashuiEvent struct {
	Type       string   `json:"type"`
	Paths      []string `json:"paths,omitempty"`
	Expression string   `json:"expression"`
}

type DashuiFocusedEntity added in v0.38.0

type DashuiFocusedEntity struct {
	*DashuiWidget
	Mode string `json:"mode"`
}

type DashuiGrid added in v0.38.0

type DashuiGrid struct {
	*DashuiWidget
	RowSets          interface{}         `json:"rowSets"`
	Style            interface{}         `json:"style,omitempty"`
	Mode             string              `json:"mode"`
	Columns          []*DashuiGridColumn `json:"columns"`
	OnRowSingleClick *DashuiEvent        `json:"onRowSingleClick,omitempty"`
	OnRowDoubleClick *DashuiEvent        `json:"onRowDoubleClick,omitempty"`
}

func NewDashuiGrid added in v0.38.0

func NewDashuiGrid() *DashuiGrid

type DashuiGridCell added in v0.38.0

type DashuiGridCell struct {
	Default interface{} `json:"default,omitempty"`
}

func NewClickableDashuiGridCell added in v0.38.0

func NewClickableDashuiGridCell(attribute string) *DashuiGridCell

func NewDashuiGridCell added in v0.38.0

func NewDashuiGridCell(attribute string) *DashuiGridCell

type DashuiGridColumn added in v0.38.0

type DashuiGridColumn struct {
	Label string          `json:"label"`
	Flex  int             `json:"flex"`
	Width int             `json:"width"`
	Cell  *DashuiGridCell `json:"cell"`
}

type DashuiHtmlWidget added in v0.38.0

type DashuiHtmlWidget struct {
	*DashuiWidget
	Style interface{} `json:"style,omitempty"`
}

func NewDashuiHtmlWidget added in v0.38.0

func NewDashuiHtmlWidget() *DashuiHtmlWidget

type DashuiLabel added in v0.38.0

type DashuiLabel struct {
	InstanceOf interface{} `json:"instanceOf"`
	Path       interface{} `json:"path"`
}

type DashuiLogsWidget added in v0.38.0

type DashuiLogsWidget struct {
	InstanceOf interface{} `json:"instanceOf"`
	Source     string      `json:"source"`
}

func NewDashuiLogsWidget added in v0.38.0

func NewDashuiLogsWidget() *DashuiLogsWidget

type DashuiOcpSingle added in v0.38.0

type DashuiOcpSingle struct {
	*DashuiWidget
	NameAttribute string `json:"nameAttribute"`
}

func NewDashuiOcpSingle added in v0.38.0

func NewDashuiOcpSingle(nameAttribute string) *DashuiOcpSingle

type DashuiProperties added in v0.38.0

type DashuiProperties struct {
	InstanceOf interface{}       `json:"instanceOf"`
	Elements   []*DashuiProperty `json:"elements"`
}

func NewDashuiProperties added in v0.38.0

func NewDashuiProperties() *DashuiProperties

type DashuiProperty added in v0.38.0

type DashuiProperty struct {
	Label *DashuiString `json:"label"`
	Value *DashuiLabel  `json:"value"`
}

type DashuiString added in v0.38.0

type DashuiString struct {
	InstanceOf string `json:"instanceOf"`
	Content    string `json:"content"`
}

type DashuiTemplate added in v0.38.0

type DashuiTemplate struct {
	Kind    string      `json:"kind"`
	Name    string      `json:"name"`
	Target  string      `json:"target"`
	View    string      `json:"view"`
	Element interface{} `json:"element"`
}

type DashuiTemplatePropsExtension added in v0.38.0

type DashuiTemplatePropsExtension struct {
	Kind                string      `json:"kind"`
	Id                  string      `json:"id"`
	Name                string      `json:"name"`
	View                string      `json:"view"`
	Target              string      `json:"target"`
	RequiredEntityTypes []string    `json:"requiredEntityTypes"`
	Props               interface{} `json:"props"`
}

func NewDashuiTemplatePropsExtension added in v0.38.0

func NewDashuiTemplatePropsExtension(id string, name string, target string, view string, requiredEntityTypes []string) *DashuiTemplatePropsExtension

type DashuiTooltip added in v0.38.0

type DashuiTooltip struct {
	*DashuiWidget
	Truncate bool        `json:"truncate,omitempty"`
	Trigger  interface{} `json:"trigger,omitempty"`
}

func NewDashuiTooltip added in v0.38.0

func NewDashuiTooltip(attributeName string, isClickable bool) *DashuiTooltip

type DashuiWidget added in v0.38.0

type DashuiWidget struct {
	InstanceOf interface{} `json:"instanceOf"`
	Props      interface{} `json:"props,omitempty"`
	Elements   interface{} `json:"elements,omitempty"`
	Element    interface{} `json:"element,omitempty"`
}

type EcpHome added in v0.38.0

type EcpHome struct {
	Sections []*DashuiEcpHomeSection `json:"sections"`
	Entities []*DashuiEcpHomeEntity  `json:"entities"`
}

type EcpInspectorWidget added in v0.38.0

type EcpInspectorWidget struct {
	*DashuiWidget
	Title string `json:"title"`
}

func NewEcpInspectorWidget added in v0.38.0

func NewEcpInspectorWidget(title string) *EcpInspectorWidget

type EcpLeftBar added in v0.38.0

type EcpLeftBar struct {
	*DashuiWidget
	Label string `json:"label"`
}

type EcpRelationshipMapEntry added in v0.38.0

type EcpRelationshipMapEntry struct {
	Key             string `json:"key"`
	Path            string `json:"path"`
	EntityAttribute string `json:"entityAttribute"`
	IconName        string `json:"iconName"`
}

type ErrorItem

type ErrorItem struct {
	Error  string `json:"error"`
	Source string `json:"source"`
}

type Errors

type Errors struct {
	Items []ErrorItem `json:"items"`
	Total int         `json:"total"`
}

type FmmAssociationDeclaration added in v0.38.0

type FmmAssociationDeclaration struct {
	*FmmTypeDef
	ScopeFilter     string `json:"scopeFilter"`
	FromType        string `json:"fromType"`
	ToType          string `json:"toType"`
	AssociationType string `json:"associationType"`
}

type FmmAssociationTypesTypeDef

type FmmAssociationTypesTypeDef struct {
	Aggregates_of []string `json:"common:aggregates_of,omitempty"`
	Consists_of   []string `json:"common:consists_of,omitempty"`
	Is_a          []string `json:"common:is_a,omitempty"`
	Has           []string `json:"common:has,omitempty"`
	Relates_to    []string `json:"common:relates_to,omitempty"`
	Uses          []string `json:"common:uses,omitempty"`
}

type FmmAttributeDefinitionsTypeDef

type FmmAttributeDefinitionsTypeDef struct {
	Required   []string                        `json:"required"`
	Optimized  []string                        `json:"optimized"`
	Attributes map[string]*FmmAttributeTypeDef `json:"attributes"`
}

type FmmAttributeTypeDef

type FmmAttributeTypeDef struct {
	Type        string `json:"type"`
	Description string `json:"description,omitempty"`
}

type FmmEntity

type FmmEntity struct {
	*FmmTypeDef
	AttributeDefinitions  *FmmAttributeDefinitionsTypeDef `json:"attributeDefinitions"`
	LifecyleConfiguration *FmmLifecycleConfigTypeDef      `json:"lifecycleConfiguration"`
	MetricTypes           []string                        `json:"metricTypes,omitempty"`
	EventTypes            []string                        `json:"eventTypes,omitempty"`
	AssociationTypes      *FmmAssociationTypesTypeDef     `json:"associationTypes,omitempty"`
}

func (*FmmEntity) GetTypeName added in v0.38.0

func (entity *FmmEntity) GetTypeName() string

type FmmEvent added in v0.28.0

type FmmEvent struct {
	*FmmTypeDef
	AttributeDefinitions *FmmAttributeDefinitionsTypeDef `json:"attributeDefinitions"`
}

type FmmLifecycleConfigTypeDef

type FmmLifecycleConfigTypeDef struct {
	PurgeTtlInMinutes     int64 `json:"purgeTtlInMinutes"`
	RetentionTtlInMinutes int64 `json:"retentionTtlInMinutes"`
}

type FmmMapAndTransform

type FmmMapAndTransform struct {
	To   string `json:"to"`
	From string `json:"from"`
}

type FmmMetric

type FmmMetric struct {
	*FmmTypeDef
	Category               FmmMetricCategory               `json:"category"`
	ContentType            FmmMetricContentType            `json:"contentType"`
	AggregationTemporality string                          `json:"aggregationTemporality"`
	IsMonotonic            bool                            `json:"isMonotonic"`
	Type                   FmmMetricType                   `json:"type"`
	Unit                   string                          `json:"unit"`
	AttributeDefinitions   *FmmAttributeDefinitionsTypeDef `json:"attributeDefinitions"`
	IngestGranularities    []int                           `json:"ingestGranularities,omitempty"`
}

type FmmMetricCategory

type FmmMetricCategory string
const (
	Category_Sum     FmmMetricCategory = "sum"
	Category_Average FmmMetricCategory = "average"
	Category_Rate    FmmMetricCategory = "rate"
	Category_Current FmmMetricCategory = "current"
)

type FmmMetricContentType

type FmmMetricContentType string
const (
	ContentType_Sum          FmmMetricContentType = "sum"
	ContentType_Gauge        FmmMetricContentType = "gauge"
	ContentType_Distribution FmmMetricContentType = "distribution"
)

type FmmMetricType

type FmmMetricType string
const (
	Type_Long   FmmMetricType = "long"
	Type_Double FmmMetricType = "double"
)

type FmmNameMappings

type FmmNameMappings map[string]string

type FmmNamespace

type FmmNamespace struct {
	Name string `json:"name"`
}

type FmmNamespaceAssignTypeDef

type FmmNamespaceAssignTypeDef struct {
	Name    string `json:"name"`
	Version int    `json:"version"`
}

type FmmResourceMapping

type FmmResourceMapping struct {
	*FmmTypeDef
	EntityType            string               `json:"entityType"`
	ScopeFilter           string               `json:"scopeFilter"`
	Mappings              []FmmMapAndTransform `json:"mappings,omitempty"`
	AttributeNameMappings FmmNameMappings      `json:"attributeNameMappings,omitempty"`
}

type FmmTemporality

type FmmTemporality string
const (
	Temp_Delta FmmTemporality = "delta"
	Temp_False FmmTemporality = "unspecified"
)

type FmmTypeDef

type FmmTypeDef struct {
	Namespace   *FmmNamespaceAssignTypeDef `json:"namespace"`
	Kind        string                     `json:"kind"`
	Name        string                     `json:"name"`
	DisplayName string                     `json:"displayName,omitempty"`
}

type IdGenerationDef

type IdGenerationDef struct {
	GenerateRandomId        bool   `json:"generateRandomId"`
	EnforceGlobalUniqueness bool   `json:"enforceGlobalUniqueness"`
	IdGenerationMechanism   string `json:"idGenerationMechanism,omitempty"`
}

type KnowledgeDef

type KnowledgeDef struct {
	Name             string                 `json:"name,omitempty"`
	AllowedLayers    []string               `json:"allowedLayers,omitempty"`
	IdGeneration     *IdGenerationDef       `json:"idGeneration,omitempty"`
	SecureProperties []string               `json:"secureProperties,omitempty"`
	JsonSchema       map[string]interface{} `json:"jsonSchema,omitempty"`
}

type Manifest

type Manifest struct {
	ManifestVersion string         `json:"manifestVersion,omitempty"`
	Name            string         `json:"name,omitempty"`
	SolutionVersion string         `json:"solutionVersion,omitempty"`
	Dependencies    []string       `json:"dependencies"`
	Description     string         `json:"description,omitempty"`
	Contact         string         `json:"contact,omitempty"`
	HomePage        string         `json:"homepage,omitempty"`
	GitRepoUrl      string         `json:"gitRepoUrl,omitempty"`
	Readme          string         `json:"readme,omitempty"`
	Objects         []ComponentDef `json:"objects,omitempty"`
	Types           []string       `json:"types,omitempty"`
}

func GetManifest added in v0.30.0

func GetManifest() *Manifest

func (*Manifest) AppendDependency added in v0.38.0

func (manifest *Manifest) AppendDependency(solutionName string)

func (*Manifest) CheckDependencyExists added in v0.38.0

func (manifest *Manifest) CheckDependencyExists(solutionName string) bool

func (*Manifest) GetComponentDef added in v0.38.0

func (manifest *Manifest) GetComponentDef(typeName string) *ComponentDef

func (*Manifest) GetComponentDefs added in v0.38.0

func (manifest *Manifest) GetComponentDefs(typeName string) []ComponentDef

func (*Manifest) GetDashuiTemplates added in v0.38.0

func (manifest *Manifest) GetDashuiTemplates() []*DashuiTemplate

func (*Manifest) GetFmmEntities added in v0.38.0

func (manifest *Manifest) GetFmmEntities() []*FmmEntity

func (*Manifest) GetFmmEvents added in v0.38.0

func (manifest *Manifest) GetFmmEvents() []*FmmEvent

func (*Manifest) GetFmmMetrics added in v0.38.0

func (manifest *Manifest) GetFmmMetrics() []*FmmMetric

func (*Manifest) GetNamespaceName added in v0.45.0

func (manifest *Manifest) GetNamespaceName() string

func (*Manifest) GetSolutionName added in v0.45.0

func (manifest *Manifest) GetSolutionName() string

func (*Manifest) HasIsolation added in v0.45.0

func (manifest *Manifest) HasIsolation() bool

type ResponseBlob

type ResponseBlob struct {
	Items []StatusItem `json:"items"`
}

type Result

type Result struct {
	Errors Errors `json:"errors"`
	Valid  bool   `json:"valid"`
}

type ServiceDef

type ServiceDef struct {
	Name  string `json:"name,omitempty"`
	Image string `json:"image,omitempty"`
}

type Solution added in v0.28.0

type Solution struct {
	ID             string `json:"id"`
	LayerID        string `json:"layerId"`
	LayerType      string `json:"layerType"`
	ObjectMimeType string `json:"objectMimeType"`
	TargetObjectId string `json:"targetObjectId"`
	CreatedAt      string `json:"createdAt"`
	UpdatedAt      string `json:"updatedAt"`
	DisplayName    string `json:"displayName"`
}

type SolutionDef

type SolutionDef struct {
	Dependencies []string `json:"dependencies,omitempty"`
	IsSubscribed bool     `json:"isSubscribed,omitempty"`
	IsSystem     bool     `json:"isSystem,omitempty"`
	Name         string   `json:"name,omitempty"`
}

type SolutionList added in v0.33.0

type SolutionList struct {
	Items []Solution `json:"items"`
}

type SolutionTestAssertion added in v0.38.0

type SolutionTestAssertion struct {
	UQL        string                           `json:"uql"`
	Transforms []SolutionTestAssertionTransform `json:"transforms"`
}

type SolutionTestAssertionTransform added in v0.38.0

type SolutionTestAssertionTransform struct {
	Type       string `json:"type"`
	Expression string `json:"expression,omitempty"`
	Message    string `json:"message,omitempty"`
	Location   string `json:"location,omitempty"`
}

type SolutionTestObject added in v0.38.0

type SolutionTestObject struct {
	Name        string                  `json:"name,omitempty"`
	Type        string                  `json:"type,omitempty"`
	Description string                  `json:"description,omitempty"`
	Setup       SolutionTestSetup       `json:"setup"`
	Assertions  []SolutionTestAssertion `json:"assertions"`
}

type SolutionTestObjects added in v0.38.0

type SolutionTestObjects struct {
	Tests         []SolutionTestObject `json:"tests"`
	InitialDelay  int                  `json:"initialDelay,omitempty"`
	MaxRetryCount int                  `json:"retryCount,omitempty"`
	RetryDelay    int                  `json:"retryDelay,omitempty"`
}

type SolutionTestResult added in v0.38.0

type SolutionTestResult struct {
	ID string `json:"testRunId"`
}

type SolutionTestSetup added in v0.38.0

type SolutionTestSetup struct {
	Type     string      `json:"type"`
	Input    interface{} `json:"input,omitempty"`
	Location string      `json:"location,omitempty"`
}

type SolutionTestStatusResult added in v0.38.0

type SolutionTestStatusResult struct {
	Complete       bool            `json:"completed"`
	Status         string          `json:"status"`
	StatusMessages []StatusMessage `json:"statusMessages"`
}

type StatusData

type StatusData struct {
	InstallTime       string `json:"installTime,omitempty"`
	InstallMessage    string `json:"installMessage,omitempty"`
	SuccessfulInstall bool   `json:"isSuccessful,omitempty"`
	SolutionName      string `json:"solutionName,omitempty"`
	SolutionVersion   string `json:"solutionVersion,omitempty"`
}

type StatusItem

type StatusItem struct {
	StatusData StatusData `json:"data"`
	CreatedAt  string     `json:"createdAt"`
}

type StatusMessage added in v0.38.0

type StatusMessage struct {
	Timestamp string   `json:"timestamp"`
	Message   string   `json:"message,omitempty"`
	Statuses  []string `json:"statuses,omitempty"`
}

type SubscriptionStatusData added in v0.34.0

type SubscriptionStatusData struct {
	IsDeleted    string `json:"isDeleted,omitempty"`
	SolutionID   string `json:"solutionID,omitempty"`
	SolutionName string `json:"solutionName,omitempty"`
	Tag          string `json:"tag,omitempty"`
	TenantId     string `json:"tenantId,omitempty"`
}

type SubscriptionStatusItem added in v0.34.0

type SubscriptionStatusItem struct {
	SubscriptionStatusData SubscriptionStatusData `json:"data"`
	CreatedAt              string                 `json:"createdAt"`
}

func (SubscriptionStatusItem) IsEmpty added in v0.34.0

func (s SubscriptionStatusItem) IsEmpty() bool

type SubscriptionStatusResponseBlob added in v0.34.0

type SubscriptionStatusResponseBlob struct {
	Items []SubscriptionStatusItem `json:"items"`
}

Jump to

Keyboard shortcuts

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