utils

package
v0.0.0-...-8fb0621 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package utils :

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CaptureMessage

func CaptureMessage(message msg.Message, msgType string, client *gorm.DB) bool

CaptureMessage : Cluster capture message function.

func CreateAggregatorLogicalComponent

func CreateAggregatorLogicalComponent(logicalName, repositoryURL string, pivot *models.Pivot) *models.LogicalComponent

func DownloadPivot

func DownloadPivot(url, ressource string) (pivot *models.Pivot, err error)

DownloadPivot : Download pivot from url

func GenerateHash

func GenerateHash() string

func GetAggregatorPivot

func GetAggregatorPivot(baseurl, componentType string, version models.Version) (*models.Pivot, error)

func GetApplicationContext

func GetApplicationContext(cmd msg.Command, client *gorm.DB) (connector models.LogicalComponent)

GetApplicationContext : Cluster application context getter.

func GetLogicalComponents

func GetLogicalComponents(client *gorm.DB, logicalName string) (logicalComponent models.LogicalComponent, err error)
// GetConnectorConfiguration : Cluster application context getter.
func GetConnectorsConfiguration(client *gorm.DB) (connectorsConfiguration []models.ConnectorConfig) {
	client.Order("connector_type_id, connector_product_id, major desc").Preload("ConnectorType").Preload("ConnectorProduct").Preload("ConnectorCommands").Preload("ConnectorEvents").Find(&connectorsConfiguration)

	return
}

func GetPivots

func GetPivots(client *gorm.DB, componentType string, version models.Version) (pivot models.Pivot, err error)

func GetProductConnectors

func GetProductConnectors(client *gorm.DB, product string, version models.Version) (productConnector models.ProductConnector, err error)

func GetTenant

func GetTenant(tenantName string, client *gorm.DB) (tenant models.Tenant, err error)

GetConfigurationCluster :

func SaveOrUpdateHeartbeat

func SaveOrUpdateHeartbeat(heartbeat models.Heartbeat, client *gorm.DB)

func SavePivot

func SavePivot(pivot models.Pivot, client *gorm.DB)

func SaveProductConnector

func SaveProductConnector(productConnector *models.ProductConnector, client *gorm.DB)

func ValidateSecret

func ValidateSecret(databaseClient *gorm.DB, secret, bindAddress string) (result bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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