services

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 9 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,
		keepIntermediateFiles bool,
	) (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,
) (_ *BinaryModelServiceContext)

func (*BinaryModelServiceContext) Compile

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

func (*BinaryModelServiceContext) Init

func (binaryModelServiceContext *BinaryModelServiceContext) Init(
	targetDir string,
	keepIntermediateFiles bool,
	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 TemplateContextInterface

type TemplateContextInterface interface {
	Init(
		templateDirs []string,
		templateFile string,
		data interface{},
		funcMap map[string]interface{},
	) (*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