meta

package
v1.14.0-dev.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SourceCfgOperatorKeyTemplate     = "sources.%s"
	SourceCfgOperatorKeyPrefix       = "sources."
	SinkCfgOperatorKeyTemplate       = "sinks.%s"
	SinkCfgOperatorKeyPrefix         = "sinks."
	ConnectionCfgOperatorKeyTemplate = "connections.%s"
	ConnectionCfgOperatorKeyPrefix   = "connections."
)

Variables

View Source
var ConfigManager *configManager

ConfigManager Hold the ConfigOperator for yaml configs defined in etc/sources/xxx.yaml and etc/connections/connection.yaml for configs in etc/sources/xxx.yaml, the map key is sources.xxx format, xxx will be mqtt/httppull and so on for configs in etc/connections/connection.yaml, the map key is connections.xxx format, xxx will be mqtt/edgex

Functions

func AddConnectionConfKey

func AddConnectionConfKey(plgName, confKey, language string, reqField map[string]interface{}) (err error)

func AddSinkConfKey

func AddSinkConfKey(plgName, confKey, language string, content []byte) (err error)

func AddSourceConfKey

func AddSourceConfKey(plgName, confKey, language string, content []byte) (err error)

func ConstructJsonArray

func ConstructJsonArray(jsonByteItems []fileContent) bytes.Buffer

func DelConnectionConfKey

func DelConnectionConfKey(plgName, confKey, language string) (err error)

func DelSinkConfKey

func DelSinkConfKey(plgName, confKey, language string) (err error)

func DelSourceConfKey

func DelSourceConfKey(plgName, confKey, language string) (err error)

func GetConfOperator

func GetConfOperator(configOperatorKey string) (conf.ConfigOperator, bool)

func GetConnectionMeta

func GetConnectionMeta(connectionName, language string) (ptrSourceProperty *uiSource, err error)

func GetConnectionPlugins

func GetConnectionPlugins() (sources []*pluginfo)

func GetFunctions

func GetFunctions() bytes.Buffer

func GetOperators

func GetOperators() bytes.Buffer

func GetResources

func GetResources(language string) (b []byte, err error)

func GetSinkMeta

func GetSinkMeta(pluginName, language string) (s *uiSink, err error)

func GetSinks

func GetSinks() (sinks []*pluginfo)

func GetSourceMeta

func GetSourceMeta(sourceName, language string) (ptrSourceProperty *uiSource, err error)

func GetSourcesPlugins

func GetSourcesPlugins(kind string) (sources []*pluginfo)

func GetYamlConf

func GetYamlConf(configOperatorKey, language string) (b []byte, err error)

func InitYamlConfigManager

func InitYamlConfigManager()

func ReadSinkMetaDir

func ReadSinkMetaDir(checker InstallChecker) error

func ReadSinkMetaFile

func ReadSinkMetaFile(filePath string, installed bool) error

func ReadSourceMetaDir

func ReadSourceMetaDir(scanChecker InstallChecker, lookupChecker InstallChecker) error

func ReadSourceMetaFile

func ReadSourceMetaFile(filePath string, isScan bool, isLookup bool) error

func ReadUiMsgDir

func ReadUiMsgDir() error

func ReplacePasswdForConfig

func ReplacePasswdForConfig(typ, name, resourceID string, config map[string]interface{}) map[string]interface{}

func ResetConfigs

func ResetConfigs()

func UninstallSink

func UninstallSink(name string)

func UninstallSource

func UninstallSource(name string)

Types

type InstallChecker

type InstallChecker func(name string) bool

type YamlConfigurationKeys

type YamlConfigurationKeys struct {
	Sources map[string][]string
	Sinks   map[string][]string
}

type YamlConfigurationSet

type YamlConfigurationSet struct {
	Sources     map[string]string `json:"sources"`
	Sinks       map[string]string `json:"sinks"`
	Connections map[string]string `json:"connections"`
}

func GetConfigurationStatus

func GetConfigurationStatus() YamlConfigurationSet

func GetConfigurations

func GetConfigurations() YamlConfigurationSet

func GetConfigurationsFor

func GetConfigurationsFor(yaml YamlConfigurationKeys) YamlConfigurationSet

func LoadConfigurations

func LoadConfigurations(configSets YamlConfigurationSet) YamlConfigurationSet

func LoadConfigurationsPartial

func LoadConfigurationsPartial(configSets YamlConfigurationSet) YamlConfigurationSet

type YamlConfigurations

type YamlConfigurations map[string]map[string]interface{}

Jump to

Keyboard shortcuts

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