mirror of
https://github.com/davidallendj/configurator.git
synced 2025-12-20 11:37:00 -07:00
23 lines
724 B
Go
23 lines
724 B
Go
package main
|
|
|
|
import (
|
|
"github.com/OpenCHAMI/configurator/pkg/config"
|
|
"github.com/OpenCHAMI/configurator/pkg/generator"
|
|
)
|
|
|
|
type TestGenerator struct{}
|
|
|
|
func (g *TestGenerator) GetName() string { return "test" }
|
|
func (g *TestGenerator) GetVersion() string { return "v1.0.0" }
|
|
func (g *TestGenerator) GetDescription() string {
|
|
return "This is a plugin creating for running tests."
|
|
}
|
|
func (g *TestGenerator) Generate(config *config.Config, params generator.Params) (generator.FileMap, error) {
|
|
return generator.ApplyTemplates(generator.Mappings{
|
|
"plugin_name": g.GetName(),
|
|
"plugin_version": g.GetVersion(),
|
|
"plugin_description": g.GetDescription(),
|
|
}, params.Templates)
|
|
}
|
|
|
|
var Generator TestGenerator
|