services

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryModelLoaderInterface

type BinaryModelLoaderInterface interface {
	Load(
		targetDir string,
		binaryModelFilePath string,
		binaryModelBaseName string,
		referenceDir string,
		keepIntermediateFilesCallback func(
			targetDir string, basename string, suffix string, tempYamlFile string,
		) (err error),
		intermediateFileContentCallback func(
			targetDir string, basename string, suffix string, tempYamlFile string,
		) (err error),
	) (binaryModel *model.BinaryModel, err error)
}

type BinaryModelServiceContext

type BinaryModelServiceContext struct {
	// contains filtered or unexported fields
}

func NewBinaryModelService

func NewBinaryModelService(
	binaryModelLoader BinaryModelLoaderInterface,
	templateContext TemplateContextInterface,
	codeCompiler CodeCompilerInterface,
	keepIntermediateFilesCallback func(
		targetDir string, basename string, suffix string, tempYamlFile string,
	) (err error),
	intermediateFileContentCallback func(
		targetDir string, basename string, suffix string, tempYamlFile string,
	) (err error),
) (_ *BinaryModelServiceContext)

func (*BinaryModelServiceContext) Compile

func (binaryModelServiceContext *BinaryModelServiceContext) Compile(
	binaryModelServiceContextData *BinaryModelServiceContextData,
) error

func (*BinaryModelServiceContext) Init

func (binaryModelServiceContext *BinaryModelServiceContext) Init(
	targetDir string,
	binaryModelFilePath string,
) (*BinaryModelServiceContextData, error)

type BinaryModelServiceContextData

type BinaryModelServiceContextData struct {
	// contains filtered or unexported fields
}

type CodeCompilerInterface

type CodeCompilerInterface interface {
	Init(
		templateContextData *render.TemplateContextData,
		config *model.CompilerConfig,
	) (*compiler.CompileContextData, error)
	Compile(compileContextData *compiler.CompileContextData, code string) (codeCompiled string, err error)
}

type CompilerPipelineService added in v1.0.0

type CompilerPipelineService struct {
	// contains filtered or unexported fields
}

func NewCompilerPipelineService added in v1.0.0

func NewCompilerPipelineService(
	rootDirectory string,
	compilerRootDir string,
	targetDir string,
	yamlFiles []string,
	binaryFilesExtension string,
	debug bool,
	keepIntermediateFiles bool,
) (_ *CompilerPipelineService)

func (*CompilerPipelineService) Init added in v1.0.0

func (service *CompilerPipelineService) Init() error

func (*CompilerPipelineService) ProcessPipeline added in v1.0.0

func (service *CompilerPipelineService) ProcessPipeline() error

type TemplateContextInterface

type TemplateContextInterface interface {
	Init(
		templateDirs []string,
		templateFile string,
		data any,
		funcMap map[string]any,
	) (*render.TemplateContextData, error)
	Render(
		templateContextData *render.TemplateContextData,
		templateName string,
	) (string, error)
	RenderFromTemplateName(
		templateContextData *render.TemplateContextData,
	) (code string, err error)
	RenderFromTemplateContent(
		templateContextData *render.TemplateContextData,
		templateContent string,
	) (codeStr string, err error)
}

Jump to

Keyboard shortcuts

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