xmlinfer

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2021 License: Apache-2.0, BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package xmlinfer attempts to infer protocol buffer definitions from a set of XML examples.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InferResult

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

InferResult holds the results of inference.

func Infer

func Infer(tr xml.TokenReader, options ...Option) (*InferResult, error)

Infer infers a protocol buffer definition from a stream of XML tokens.

func (*InferResult) ProtoFile

func (ir *InferResult) ProtoFile() (string, error)

ProtoFile returns protobuf code inferred from the XML examples.

func (*InferResult) String

func (ir *InferResult) String() string

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option can be passed to Infer to alter inference behavior.

func IncludeExamplesOption

func IncludeExamplesOption(include bool) Option

IncludeExamplesOption returns an option that enables or disables showing example values in the generated protobuf.

Jump to

Keyboard shortcuts

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