definitions

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 5 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseProcessor

type BaseProcessor struct {
	ID string
}

func (*BaseProcessor) DecodeMap

func (b *BaseProcessor) DecodeMap(input interface{}, output interface{}) error

func (*BaseProcessor) GetID

func (b *BaseProcessor) GetID() string

type EngineFileHandler

type EngineFileHandler interface {
	ProcessorFileHandler
	GetInputFile() string
	GetOutputFile() string
	Close()
	GenerateNewFileHandler() (EngineFileHandler, error)
}

type EngineFlowObject

type EngineFlowObject struct {
	Metadata map[string]interface{} `json:"metadata"`
}

func (*EngineFlowObject) EvaluateExpression

func (e *EngineFlowObject) EvaluateExpression(input string) (string, error)

type EngineIncomingObject

type EngineIncomingObject struct {
	FlowID    uuid.UUID
	Metadata  map[string]interface{}
	Reader    io.Reader
	SessionID uuid.UUID
}

type Flow added in v0.0.6

type Flow struct {
	ID          uuid.UUID
	Name        string
	Description string
	Processors  []SimpleProcessor
}

type FlowManager

type FlowManager interface {
	GetFirstProcessorsForFlow(flowID uuid.UUID) ([]SimpleProcessor, error)
	GetLastProcessorForFlow(flowID uuid.UUID) (*SimpleProcessor, error)
	ListFlows() ([]Flow, error)
	GetFlowByID(flowID uuid.UUID) (*Flow, error)
	GetProcessorByID(flowID uuid.UUID, processorID uuid.UUID) (*SimpleProcessor, error)
	GetNextProcessors(flowID uuid.UUID, processorID uuid.UUID) ([]SimpleProcessor, error)
	AddProcessorToFlowBefore(flowID uuid.UUID, processor *SimpleProcessor, referenceProcessorID uuid.UUID) error
	AddProcessorToFlowAfter(flowID uuid.UUID, processor *SimpleProcessor, referenceProcessorID uuid.UUID) error
	SaveFlow(flow *Flow) error
}

type LogEntry added in v0.0.2

type LogEntry struct {
	SessionID     uuid.UUID
	ProcessorName string
	ProcessorID   string
	FlowID        uuid.UUID
	InputFile     string
	OutputFile    string
	FlowObject    EngineFlowObject
	RetryCount    int
}

type Processor

type Processor interface {
	GetID() string
	Name() string
	Execute(info *EngineFlowObject, fileHandler ProcessorFileHandler, log *logrus.Logger) (*EngineFlowObject, error)
	SetConfig(config map[string]interface{}) error
}

type ProcessorFactory

type ProcessorFactory interface {
	GetProcessor(typeName string) (Processor, error)
	RegisterProcessor(processor Processor)
}

ProcessorFactory defines an interface for retrieving processors.

type ProcessorFileHandler

type ProcessorFileHandler interface {
	Read() (io.Reader, error)
	Write() (io.Writer, error)
}

type SessionUpdate

type SessionUpdate struct {
	SessionID uuid.UUID
	Finished  bool
	Error     error
}

type SimpleProcessor added in v0.0.5

type SimpleProcessor struct {
	ID         uuid.UUID
	FlowID     uuid.UUID
	Name       string
	Type       string
	FlowOrder  int
	Config     map[string]interface{}
	MaxRetries int
	LogLevel   logrus.Level
}

type WriteAheadLogger added in v0.0.2

type WriteAheadLogger interface {
	WriteEntry(entry LogEntry)
	ReadEntries() ([]LogEntry, error)
}

Jump to

Keyboard shortcuts

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