github.com/Rookout/GoSDK@v0.1.48/pkg/processor/processor_factory.go (about)

     1  package processor
     2  
     3  import (
     4  	"github.com/Rookout/GoSDK/pkg/augs/actions"
     5  	"github.com/Rookout/GoSDK/pkg/processor/operations"
     6  	"github.com/Rookout/GoSDK/pkg/processor/paths"
     7  	"github.com/Rookout/GoSDK/pkg/rookoutErrors"
     8  	"github.com/Rookout/GoSDK/pkg/types"
     9  )
    10  
    11  //goland:noinspection GoNameStartsWithPackageName
    12  type processorFactory struct {
    13  }
    14  
    15  func NewProcessorFactory() *processorFactory {
    16  	return &processorFactory{}
    17  }
    18  
    19  func (p *processorFactory) GetPath(path string) (paths.Path, rookoutErrors.RookoutError) {
    20  	return paths.NewArithmeticPath(path)
    21  }
    22  
    23  func (p *processorFactory) GetOperation(configuration types.AugConfiguration) (operations.Operation, rookoutErrors.RookoutError) {
    24  	return operations.NewSet(configuration, p)
    25  }
    26  
    27  func (p *processorFactory) GetProcessor(configuration []types.AugConfiguration) (actions.Processor, rookoutErrors.RookoutError) {
    28  	return NewProcessor(configuration, p)
    29  }