modelgen

package
v0.0.0-...-1a56975 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldInfo

type FieldInfo struct {
	ProtoName string
	GoName    string
	Number    string // Only for proto fields
	Comment   string

	ProtoType TypeInfo
	GoType    TypeInfo
}

FieldInfo contains the data about the field

type MessageInfo

type MessageInfo struct {
	Name    string
	Comment string
	Fields  []FieldInfo
}

MessageInfo contains the data about the type/message

type Model

type Model struct {
	TemplateName string
	VarietyName  string

	InterfaceName     string
	PackageImportPath string

	Comment string

	// Info for go interfaces
	GoPackageName string

	// Info for regenerated template proto
	PackageName     string
	TemplateMessage MessageInfo

	OutputTemplateMessage MessageInfo

	ResourceMessages []MessageInfo
	// contains filtered or unexported fields
}

Model represents the object used to code generate mixer artifacts.

func Create

func Create(parser *protoDesc.FileDescriptorSetParser) (*Model, error)

Create creates a Model object.

type TypeInfo

type TypeInfo struct {
	Name              string
	IsRepeated        bool
	IsResourceMessage bool
	IsMap             bool
	IsValueType       bool
	MapKey            *TypeInfo
	MapValue          *TypeInfo
	Import            string
}

TypeInfo contains the data about the field

Jump to

Keyboard shortcuts

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