definitions

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 6 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 FlowManager

type FlowManager interface {
	GetFirstProcessorsForFlow(flowID uuid.UUID) ([]models.Processor, error)
	GetLastProcessorForFlow(flowID uuid.UUID) (*models.Processor, error)
	ListFlows() ([]models.Flow, error)
	GetFlowByID(flowID uuid.UUID) (*models.Flow, error)
	GetProcessorByID(flowID uuid.UUID, processorID uuid.UUID) (*models.Processor, error)
	GetNextProcessors(flowID uuid.UUID, processorID uuid.UUID) ([]models.Processor, error)
	ListProcessorsForFlow(flowID uuid.UUID) ([]models.Processor, error)
	AddProcessorToFlow(flowID uuid.UUID, processor *models.Processor, position string, referenceProcessorID uuid.UUID) 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 WriteAheadLogger added in v0.0.2

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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