port

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenResponse

type AccessTokenResponse struct {
	Ok          bool   `json:"ok"`
	AccessToken string `json:"accessToken"`
	ExpiresIn   int64  `json:"expiresIn"`
	TokenType   string `json:"tokenType"`
}

type Action

type Action struct {
	ID               string            `json:"id,omitempty"`
	Identifier       string            `json:"identifier"`
	Title            string            `json:"title,omitempty"`
	Icon             string            `json:"icon,omitempty"`
	Description      string            `json:"description,omitempty"`
	Trigger          *Trigger          `json:"trigger"`
	InvocationMethod *InvocationMethod `json:"invocationMethod,omitempty"`
	Publish          bool              `json:"publish,omitempty"`
}

type ActionProperty added in v0.3.0

type ActionProperty struct {
	Type        string            `json:"type,omitempty"`
	Title       string            `json:"title,omitempty"`
	Identifier  string            `json:"identifier,omitempty"`
	Default     any               `json:"default,omitempty"`
	Icon        string            `json:"icon,omitempty"`
	Format      string            `json:"format,omitempty"`
	Description string            `json:"description,omitempty"`
	Blueprint   string            `json:"blueprint,omitempty"`
	Pattern     string            `json:"pattern,omitempty"`
	Enum        []string          `json:"enum,omitempty"`
	EnumColors  map[string]string `json:"enumColors,omitempty"`
	Visible     *bool             `json:"visible,omitempty"`
}

type ActionUserInputs

type ActionUserInputs struct {
	Properties map[string]ActionProperty `json:"properties"`
	Required   []string                  `json:"required,omitempty"`
}

type AggregatedResource added in v0.1.15

type AggregatedResource struct {
	Kind        string
	KindConfigs []KindConfig
}

type Blueprint

type Blueprint struct {
	Meta
	Identifier            string                                  `json:"identifier,omitempty"`
	Title                 string                                  `json:"title,omitempty"`
	Icon                  string                                  `json:"icon"`
	Description           string                                  `json:"description"`
	Schema                BlueprintSchema                         `json:"schema"`
	CalculationProperties map[string]BlueprintCalculationProperty `json:"calculationProperties,omitempty"`
	AggregationProperties map[string]BlueprintAggregationProperty `json:"aggregationProperties,omitempty"`
	MirrorProperties      map[string]BlueprintMirrorProperty      `json:"mirrorProperties,omitempty"`
	ChangelogDestination  *ChangelogDestination                   `json:"changelogDestination,omitempty"`
	Relations             map[string]Relation                     `json:"relations,omitempty"`
}

type BlueprintAggregationProperty added in v0.1.15

type BlueprintAggregationProperty struct {
	Title           string      `json:"title"`
	Target          string      `json:"target"`
	CalculationSpec interface{} `json:"calculationSpec"`
	Query           interface{} `json:"query,omitempty"`
	Description     string      `json:"description,omitempty"`
	Icon            string      `json:"icon,omitempty"`
	Type            string      `json:"type,omitempty"`
}

type BlueprintCalculationProperty added in v0.1.15

type BlueprintCalculationProperty struct {
	Identifier  string            `json:"identifier,omitempty"`
	Title       string            `json:"title,omitempty"`
	Calculation string            `json:"calculation,omitempty"`
	Colors      map[string]string `json:"colors,omitempty"`
	Colorized   bool              `json:"colorized,omitempty"`
	Format      string            `json:"format,omitempty"`
	Type        string            `json:"type,omitempty"`
}

type BlueprintMirrorProperty

type BlueprintMirrorProperty struct {
	Identifier string `json:"identifier,omitempty"`
	Title      string `json:"title,omitempty"`
	Path       string `json:"path,omitempty"`
}

type BlueprintSchema

type BlueprintSchema struct {
	Properties map[string]Property `json:"properties"`
	Required   []string            `json:"required,omitempty"`
}

type ChangelogDestination

type ChangelogDestination struct {
	Type string `json:"type,omitempty"`
	Url  string `json:"url,omitempty"`
}

type Config added in v0.1.15

type Config struct {
	ResyncInterval                  uint   `yaml:"resyncInterval,omitempty"`
	StateKey                        string `yaml:"stateKey,omitempty"`
	EventListenerType               string `yaml:"eventListenerType,omitempty"`
	CreateDefaultResources          bool   `yaml:"createDefaultResources,omitempty"`
	OverwriteConfigurationOnRestart bool   `yaml:"overwriteConfigurationOnRestart,omitempty"`
	// These Configurations are used only for setting up the Integration on installation or when using OverwriteConfigurationOnRestart flag.
	Resources                    []Resource `yaml:"resources,omitempty"`
	CRDSToDiscover               string     `yaml:"crdsToDiscover,omitempty"`
	OverwriteCRDsActions         bool       `yaml:"overwriteCrdsActions,omitempty"`
	DeleteDependents             bool       `yaml:"deleteDependents,omitempty"`
	CreateMissingRelatedEntities bool       `yaml:"createMissingRelatedEntities,omitempty"`
}

type Entity

type Entity struct {
	Meta
	Identifier string                 `json:"identifier,omitempty"`
	Title      string                 `json:"title,omitempty"`
	Blueprint  string                 `json:"blueprint"`
	Icon       string                 `json:"icon,omitempty"`
	Team       interface{}            `json:"team,omitempty"`
	Properties map[string]interface{} `json:"properties"`
	Relations  map[string]interface{} `json:"relations"`
}

type EntityMapping

type EntityMapping struct {
	Identifier string            `json:"identifier" yaml:"identifier"`
	Title      string            `json:"title" yaml:"title"`
	Blueprint  string            `json:"blueprint" yaml:"blueprint"`
	Icon       string            `json:"icon,omitempty" yaml:"icon,omitempty"`
	Team       string            `json:"team,omitempty" yaml:"team,omitempty"`
	Properties map[string]string `json:"properties,omitempty" yaml:"properties,omitempty"`
	Relations  map[string]string `json:"relations,omitempty" yaml:"relations,omitempty"`
}

type EntityMappings added in v0.1.15

type EntityMappings struct {
	Mappings []EntityMapping `json:"mappings" yaml:"mappings"`
}

type EventListenerSettings added in v0.1.15

type EventListenerSettings struct {
	Type string `json:"type,omitempty"`
}

type Integration added in v0.1.13

type Integration struct {
	InstallationId      string                 `json:"installationId,omitempty"`
	Title               string                 `json:"title,omitempty"`
	Version             string                 `json:"version,omitempty"`
	InstallationAppType string                 `json:"installationAppType,omitempty"`
	EventListener       *EventListenerSettings `json:"changelogDestination,omitempty"`
	Config              *IntegrationAppConfig  `json:"config,omitempty"`
	UpdatedAt           *time.Time             `json:"updatedAt,omitempty"`
}

type IntegrationAppConfig added in v0.1.15

type IntegrationAppConfig struct {
	DeleteDependents             bool       `json:"deleteDependents,omitempty" yaml:"deleteDependents,omitempty"`
	CreateMissingRelatedEntities bool       `json:"createMissingRelatedEntities,omitempty" yaml:"createMissingRelatedEntities,omitempty"`
	Resources                    []Resource `json:"resources,omitempty" yaml:"resources,omitempty"`
	CRDSToDiscover               string     `json:"crdsToDiscover,omitempty"`
	OverwriteCRDsActions         bool       `json:"overwriteCrdsActions,omitempty"`
	UpdateEntityOnlyOnDiff       bool       `json:"updateEntityOnlyOnDiff,omitempty"`
}

type InvocationMethod

type InvocationMethod struct {
	Type                 string                 `json:"type,omitempty"`
	Url                  string                 `json:"url,omitempty"`
	Organization         string                 `json:"org,omitempty"`
	Repository           string                 `json:"repo,omitempty"`
	Workflow             string                 `json:"workflow,omitempty"`
	WorkflowInputs       map[string]interface{} `json:"workflowInputs,omitempty"`
	ReportWorkflowStatus bool                   `json:"reportWorkflowStatus,omitempty"`
}

type KindConfig added in v0.1.15

type KindConfig struct {
	Selector Selector
	Port     Port
}

type Meta

type Meta struct {
	CreatedAt *time.Time `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	CreatedBy string     `json:"createdBy,omitempty"`
	UpdatedBy string     `json:"updatedBy,omitempty"`
}

type OrgDetails added in v0.1.15

type OrgDetails struct {
	OrgId string `json:"id"`
}

type OrgKafkaCredentials added in v0.1.15

type OrgKafkaCredentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Page added in v0.2.7

type Page struct {
	Identifier string      `json:"identifier"`
	Blueprint  string      `json:"blueprint,omitempty"`
	Title      string      `json:"title,omitempty"`
	Icon       string      `json:"icon,omitempty"`
	Widgets    interface{} `json:"widgets,omitempty"`
	Type       string      `json:"type,omitempty"`
}

type Port added in v0.1.15

type Port struct {
	Entity       EntityMappings `json:"entity" yaml:"entity"`
	ItemsToParse string         `json:"itemsToParse" yaml:"itemsToParse"`
}

type Property added in v0.3.0

type Property struct {
	Type        string            `json:"type,omitempty"`
	Title       string            `json:"title,omitempty"`
	Identifier  string            `json:"identifier,omitempty"`
	Default     any               `json:"default,omitempty"`
	Icon        string            `json:"icon,omitempty"`
	Format      string            `json:"format,omitempty"`
	Description string            `json:"description,omitempty"`
	Blueprint   string            `json:"blueprint,omitempty"`
	Pattern     string            `json:"pattern,omitempty"`
	Enum        []string          `json:"enum,omitempty"`
	EnumColors  map[string]string `json:"enumColors,omitempty"`
}

type Relation

type Relation struct {
	Identifier string `json:"identifier,omitempty"`
	Title      string `json:"title,omitempty"`
	Target     string `json:"target,omitempty"`
	Required   bool   `json:"required,omitempty"`
	Many       bool   `json:"many,omitempty"`
}

type Resource added in v0.1.15

type Resource struct {
	Kind     string   `json:"kind" yaml:"kind"`
	Selector Selector `json:"selector,omitempty" yaml:"selector,omitempty"`
	Port     Port     `json:"port" yaml:"port"`
}

type ResponseBody added in v0.1.6

type ResponseBody struct {
	OK               bool                `json:"ok"`
	Entity           Entity              `json:"entity"`
	Blueprint        Blueprint           `json:"blueprint"`
	Action           Action              `json:"action"`
	Entities         []Entity            `json:"entities"`
	Integration      Integration         `json:"integration"`
	KafkaCredentials OrgKafkaCredentials `json:"credentials"`
	OrgDetails       OrgDetails          `json:"organization"`
	Scorecard        Scorecard           `json:"scorecard"`
	Pages            Page                `json:"pages"`
}

type Rule added in v0.1.6

type Rule struct {
	Property string      `json:"property"`
	Operator string      `json:"operator"`
	Value    interface{} `json:"value"`
}

type Scorecard added in v0.1.15

type Scorecard struct {
	Identifier string        `json:"identifier,omitempty"`
	Title      string        `json:"title,omitempty"`
	Filter     interface{}   `json:"filter,omitempty"`
	Rules      []interface{} `json:"rules,omitempty"`
}

type SearchBody added in v0.1.6

type SearchBody struct {
	Rules      []Rule `json:"rules"`
	Combinator string `json:"combinator"`
}

type Selector added in v0.1.15

type Selector struct {
	Query string
}

type Trigger added in v0.3.1

type Trigger struct {
	Type                string            `json:"type"`
	BlueprintIdentifier string            `json:"blueprintIdentifier,omitempty"`
	Operation           string            `json:"operation,omitempty"`
	UserInputs          *ActionUserInputs `json:"userInputs,omitempty"`
	Event               *TriggerEvent     `json:"event,omitempty"`
	Condition           *TriggerCondition `json:"condition,omitempty"`
}

type TriggerCondition added in v0.3.1

type TriggerCondition struct {
	Type        string   `json:"type"`
	Expressions []string `json:"expressions"`
	Combinator  *string  `json:"combinator,omitempty"`
}

type TriggerEvent added in v0.3.1

type TriggerEvent struct {
	Type                string  `json:"type"`
	BlueprintIdentifier *string `json:"blueprintIdentifier,omitempty"`
	PropertyIdentifier  *string `json:"propertyIdentifier,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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