move config to internal

This commit is contained in:
Joel Wetzell
2025-12-06 22:42:38 -06:00
parent 2c6502b622
commit 07108918f1
19 changed files with 79 additions and 51 deletions

View File

@@ -3,11 +3,13 @@ package showbridge
import (
"fmt"
"sync"
"github.com/jwetzell/showbridge-go/internal/config"
)
type ModuleError struct {
Index int
Config ModuleConfig
Config config.ModuleConfig
Error error
}
@@ -19,15 +21,9 @@ type Module interface {
Output(any) error
}
type ModuleConfig struct {
Id string `json:"id"`
Type string `json:"type"`
Params map[string]any `json:"params"`
}
type ModuleRegistration struct {
Type string `json:"type"`
New func(ModuleConfig) (Module, error)
New func(config.ModuleConfig) (Module, error)
}
func RegisterModule(mod ModuleRegistration) {