mirror of
https://github.com/davidallendj/configurator.git
synced 2025-12-20 11:37:00 -07:00
Moved internal/ to pkg/ to make building external plugins possible
This commit is contained in:
parent
075b1a1f7f
commit
7361ec739f
19 changed files with 4 additions and 3 deletions
29
pkg/generator/plugins/powerman/powerman.go
Normal file
29
pkg/generator/plugins/powerman/powerman.go
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
configurator "github.com/OpenCHAMI/configurator/internal"
|
||||
"github.com/OpenCHAMI/configurator/internal/generator"
|
||||
"github.com/OpenCHAMI/configurator/internal/util"
|
||||
)
|
||||
|
||||
type Powerman struct{}
|
||||
|
||||
func (g *Powerman) GetName() string {
|
||||
return "powerman"
|
||||
}
|
||||
|
||||
func (g *Powerman) GetVersion() string {
|
||||
return util.GitCommit()
|
||||
}
|
||||
|
||||
func (g *Powerman) GetDescription() string {
|
||||
return fmt.Sprintf("Configurator generator plugin for '%s'.", g.GetName())
|
||||
}
|
||||
|
||||
func (g *Powerman) Generate(config *configurator.Config, opts ...util.Option) (generator.FileMap, error) {
|
||||
return nil, fmt.Errorf("plugin does not implement generation function")
|
||||
}
|
||||
|
||||
var Generator Powerman
|
||||
Loading…
Add table
Add a link
Reference in a new issue