v0.5.9 Latest Latest

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

Go to latest
Published: May 22, 2023 License: BSD-3-Clause Imports: 15 Imported by: 12




This section is empty.


This section is empty.


func CreateSharedActions added in v0.5.6

func CreateSharedActions(actionConfigs []*action.Config) (map[string]action.Action, error)

func CreateTriggers

func CreateTriggers(tConfigs []*trigger.Config, actions map[string]action.Action, runner action.Runner) (map[string]trigger.Trigger, error)

func GetName added in v0.5.7

func GetName() string

Returns name of the application

func GetProperties

func GetProperties(properties []*data.Attribute) (map[string]interface{}, error)

func GetVersion added in v0.5.7

func GetVersion() string

Returns version of the application

func RegisterPropertyValueResolver added in v0.5.7

func RegisterPropertyValueResolver(relType string, resolver PropertyValueResolver) error

func RegisterResources

func RegisterResources(rConfigs []*resource.Config) error


type Config

type Config struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Version     string `json:"version"`
	Description string `json:"description"`

	Properties []*data.Attribute  `json:"properties"`
	Channels   []string           `json:"channels"`
	Triggers   []*trigger.Config  `json:"triggers"`
	Resources  []*resource.Config `json:"resources"`
	Actions    []*action.Config   `json:"actions"`

Config is the configuration for the App

func LoadConfig added in v0.5.6

func LoadConfig(flogoJson string) (*Config, error)

type ConfigProvider

type ConfigProvider interface {
	GetApp() (*Config, error)

ConfigProvider interface to implement to provide the app configuration

func DefaultConfigProvider

func DefaultConfigProvider() ConfigProvider

DefaultSerializer returns the default App Serializer

type PropertyProvider

type PropertyProvider struct {
	// contains filtered or unexported fields

func GetPropertyProvider

func GetPropertyProvider() *PropertyProvider

func (*PropertyProvider) GetProperty

func (pp *PropertyProvider) GetProperty(property string) (interface{}, bool)

func (*PropertyProvider) SetProperties

func (pp *PropertyProvider) SetProperties(value map[string]interface{})

func (*PropertyProvider) SetProperty

func (pp *PropertyProvider) SetProperty(property string, value interface{})

type PropertyValueResolver added in v0.5.7

type PropertyValueResolver interface {
	// Should return value and true if the given key exists in the external configuration otherwise should return nil and false.
	LookupValue(key string) (interface{}, bool)

PropertyValueResolver used to resolve value from external configuration like env, file etc

func GetPropertyValueResolver added in v0.5.7

func GetPropertyValueResolver(relType string) PropertyValueResolver


Path Synopsis

Jump to

Keyboard shortcuts

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