Files
relspecgo/pkg/writers/writer.go
Hein 7c7054d2e2
Some checks are pending
CI / Test (1.23) (push) Waiting to run
CI / Test (1.24) (push) Waiting to run
CI / Test (1.25) (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Build (push) Waiting to run
So far so good
2025-12-16 18:10:40 +02:00

31 lines
906 B
Go

package writers
import (
"git.warky.dev/wdevs/relspecgo/pkg/models"
)
// Writer defines the interface for writing database specifications
// to various output formats at different granularity levels
type Writer interface {
// WriteDatabase takes a Database model and writes it to the desired format
WriteDatabase(db *models.Database) error
// WriteSchema takes a Schema model and writes it to the desired format
WriteSchema(schema *models.Schema) error
// WriteTable takes a Table model and writes it to the desired format
WriteTable(table *models.Table) error
}
// WriterOptions contains common options for writers
type WriterOptions struct {
// OutputPath is the path where the output should be written
OutputPath string
// PackageName is the Go package name (for code generation)
PackageName string
// Additional options can be added here as needed
Metadata map[string]interface{}
}