lash/custom-engin #20

Merged
lash merged 13 commits from lash/custom-engin into master 2025-02-06 11:11:49 +01:00
Showing only changes of commit 422b651097 - Show all commits

25
engine/engine.go Normal file
View File

@ -0,0 +1,25 @@
package engine
import (
"context"
"git.defalsify.org/vise.git/engine"
"git.defalsify.org/vise.git/resource"
)
type SarafuEngine struct {
engine.Engine
}
func NewSarafuEngine(cfg engine.Config, rs resource.Resource) *SarafuEngine {
return &SarafuEngine{
Engine: engine.NewEngine(cfg, rs),
}
}
func (se *SarafuEngine) Exec(ctx context.Context, input []byte) (bool, error) {
if len(input) == 0 {
panic("insert something here")
}
return se.Engine.Exec(ctx, input)
}