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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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