proto2avro

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder() Builder

func (Builder) AddMessage

func (b Builder) AddMessage(m *proto.Message)

func (Builder) Build

func (b Builder) Build(name string) (Record, bool)

type Field

type Field struct {
	Name    string      `json:"name"`
	Doc     string      `json:"doc,omitempty"`
	Type    interface{} `json:"type"` // string or array of type
	Default string      `json:"default,omitempty"`
	Order   string      `json:"order,omitempty"` // ascending,descending,ignore
	Aliases []string    `json:"aliases,omitempty"`
}

Field models an Avro record field https://avro.apache.org/docs/1.8.1/spec.html

type FieldComplexType

type FieldComplexType struct {
	Type  string      `json:"type"`
	Items interface{} `json:"items"`
}

type Record

type Record struct {
	Type      string   `json:"type"`
	Name      string   `json:"name"`
	Namespace string   `json:"namespace,omitempty"`
	Doc       string   `json:"doc,omitempty"`
	Aliases   []string `json:"aliases,omitempty"`
	Fields    []Field  `json:"fields"`
}

Record models an Avro record type https://avro.apache.org/docs/1.8.1/spec.html

Jump to

Keyboard shortcuts

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