Documentation ¶
Index ¶
- Constants
- func ParseInput(in io.Reader) (*pluginpb.CodeGeneratorRequest, error)
- func ProcessDDL(req *pluginpb.CodeGeneratorRequest) (DDLOption, *Messages)
- func ProcessEntity(req *pluginpb.CodeGeneratorRequest) (EntityOption, *descriptorpb.FileOptions, *Messages)
- func ToCamel(str string) string
- func ToLowerCamel(str string) string
- func ToSnake(str string) string
- type DDLOption
- type EntityOption
- type Enum
- type EnumValue
- type Field
- type Fields
- type Index
- type Message
- type Messages
- type Query
- type Relations
Constants ¶
View Source
const (
TimestampType = ".google.protobuf.Timestamp"
)
Variables ¶
This section is empty.
Functions ¶
func ParseInput ¶
func ParseInput(in io.Reader) (*pluginpb.CodeGeneratorRequest, error)
func ProcessDDL ¶
func ProcessDDL(req *pluginpb.CodeGeneratorRequest) (DDLOption, *Messages)
func ProcessEntity ¶
func ProcessEntity(req *pluginpb.CodeGeneratorRequest) (EntityOption, *descriptorpb.FileOptions, *Messages)
func ToLowerCamel ¶
Types ¶
type EntityOption ¶
type Enum ¶
type Enum struct { Descriptor *descriptorpb.EnumDescriptorProto Package string FullName string Values []*EnumValue }
func NewEnum ¶
func NewEnum(d *descriptorpb.EnumDescriptorProto, f *descriptorpb.FileDescriptorProto) *Enum
type EnumValue ¶
func NewEnumValue ¶
func NewEnumValue(d *descriptorpb.EnumValueDescriptorProto) *EnumValue
type Field ¶
type Field struct { Descriptor *descriptorpb.FieldDescriptorProto Ext *ddl.ColumnOptions Name string Type string OriginalType string OptionalType string Size int Null bool Sequence bool Default string Deprecated bool Comment string Virtual bool }
func (*Field) IsPrimitiveType ¶
type Message ¶
type Message struct { Descriptor *descriptorpb.DescriptorProto Package string FullName string TableName string Fields *Fields PrimaryKeys []*Field Indexes []*Index Relations Relations Engine string WithTimestamp bool Deprecated bool Comment string SelectQueries []*Query // contains filtered or unexported fields }
func NewMessage ¶
func NewMessage(d *descriptorpb.DescriptorProto, f *descriptorpb.FileDescriptorProto) *Message
func (*Message) IsPrimaryKey ¶
func (*Message) IsReturningSingleRow ¶
type Messages ¶
type Messages struct {
// contains filtered or unexported fields
}
func NewMessages ¶
func (*Messages) Denormalize ¶
func (m *Messages) Denormalize()
func (*Messages) FindByDescriptor ¶
func (m *Messages) FindByDescriptor(d *descriptorpb.DescriptorProto) *Message
Click to show internal directories.
Click to hide internal directories.