Documentation
¶
Overview ¶
Package translate provides schema translation utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Register ¶
type Register map[string]Translator
Register maps format names to their translators.
type Translator ¶
type Translator interface {
// Translate converts a JSON schema to the target format
// portName is used to name the output schema variable (e.g., "users" -> "users_schema")
// rawJSON contains the original JSON bytes for preserving key order
Translate(portName string, schema *jsonschema.Schema) ([]byte, error)
// FileExtension returns the appropriate file extension (e.g., ".py", ".sql")
FileExtension() string
}
Translator defines the interface all format translators must implement.
Click to show internal directories.
Click to hide internal directories.