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/syslog/syslog.go
Normal file
29
pkg/generator/plugins/syslog/syslog.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 Syslog struct{}
|
||||
|
||||
func (g *Syslog) GetName() string {
|
||||
return "syslog"
|
||||
}
|
||||
|
||||
func (g *Syslog) GetVersion() string {
|
||||
return util.GitCommit()
|
||||
}
|
||||
|
||||
func (g *Syslog) GetDescription() string {
|
||||
return fmt.Sprintf("Configurator generator plugin for '%s'.", g.GetName())
|
||||
}
|
||||
|
||||
func (g *Syslog) Generate(config *configurator.Config, opts ...util.Option) (generator.FileMap, error) {
|
||||
return nil, fmt.Errorf("plugin does not implement generation function")
|
||||
}
|
||||
|
||||
var Generator Syslog
|
||||
Loading…
Add table
Add a link
Reference in a new issue