translate

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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.

func (Register) Available

func (r Register) Available() []string

Available returns all registered translator names.

func (Register) Get

func (r Register) Get(name string) (Translator, error)

Get retrieves a translator by name.

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.

Directories

Path Synopsis
Package pyspark provides PySpark schema translation utilities.
Package pyspark provides PySpark schema translation utilities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL