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 ¶
IncludeExamplesOption returns an option that enables or disables showing example values in the generated protobuf.
Click to show internal directories.
Click to hide internal directories.