mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
27 lines
370 B
Go
27 lines
370 B
Go
package common
|
|
|
|
import (
|
|
"context"
|
|
"database/sql"
|
|
)
|
|
|
|
type Module interface {
|
|
Id() string
|
|
Type() string
|
|
Start(context.Context) error
|
|
Stop()
|
|
}
|
|
|
|
type OutputModule interface {
|
|
Output(context.Context, any) error
|
|
}
|
|
|
|
type KeyValueModule interface {
|
|
Get(key string) (any, error)
|
|
Set(key string, value any) error
|
|
}
|
|
|
|
type DatabaseModule interface {
|
|
Database() *sql.DB
|
|
}
|