thrift

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package thrift generates a Thrift IDL file from a resolved model.

docs/design/schema-backends.md has the mapping and the reasons for it. Three things are worth knowing before reading the output. An enum whose variants carry fields is a union of one struct per variant. A newtype is a typedef, which is the one schema language here with a named alias that costs nothing on the wire. And declarations are written in dependency order, since a Thrift compiler reads a file top to bottom.

Index

Constants

View Source
const Name = "thrift"

Name is what this backend is called, in a target block and as tdl-gen-thrift on PATH.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct{}

Backend implements plugin.Backend.

func (Backend) Describe

func (Backend) Describe() plugin.Description

func (Backend) Generate

func (Backend) Generate(_ context.Context, req *plugin.Request) (*plugin.Response, error)

Generate returns one .thrift file holding every declaration the model owns.

Jump to

Keyboard shortcuts

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