Documentation ¶
Index ¶
- type ConvertedField
- type Converter
- func (c Converter) ConvertEnum(protoEnum *protogen.Enum) (types.Enum, error)
- func (c Converter) ConvertField(field *protogen.Field) (*ConvertedField, error)
- func (c Converter) ConvertMessage(pkg *protogen.File, msg *protogen.Message) ([]types.Table, error)
- func (c Converter) TableName(pkg *protogen.File, name string, plural bool) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConvertedField ¶
type ConvertedField struct { Field *types.Field Indexes []types.Index ForeignKeys []types.ForeignKey ExtraTables []types.Table }
ConvertedField is the converted form of protogen.Field, containing information on items to add to integrate the field into the schema.
type Converter ¶
type Converter struct { // Packages maps file paths to the package of the file. Packages map[string]*protogen.File }
Converter is a struct containing configuration to convert a parsed protoc file to Go types.
func (Converter) ConvertEnum ¶
ConvertEnum converts the specified protobuf enum to a types enum.
func (Converter) ConvertField ¶
func (c Converter) ConvertField(field *protogen.Field) (*ConvertedField, error)
ConvertField converts the provided protogen.Field to ConvertedField.
func (Converter) ConvertMessage ¶
ConvertMessage converts the provided protogen message to xo tables. The first table always represents the actual message.
Click to show internal directories.
Click to hide internal directories.