Documentation ¶
Index ¶
- Variables
- func GenerateDDLFiles(version string, gen *protogen.Plugin) error
- type Field
- type FieldOption
- type Index
- type MessageInfo
- func (mi MessageInfo) DDLFileSuffix() (string, error)
- func (mi MessageInfo) DMLFileSuffix() (string, error)
- func (mi MessageInfo) DMLMockFileSuffix() (string, error)
- func (mi MessageInfo) GenerateDDL() (string, error)
- func (mi MessageInfo) GenerateDML(goFilename string, mockFilename string) (string, error)
- type MessageOption
- type Unique
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorDatastoreUnspecified = fmt.Errorf("datastore unspecified") ErrNotSupportedDatastore = fmt.Errorf("not supported datastore") )
Functions ¶
Types ¶
type Field ¶
type Field struct { Options []FieldOption TextName string GoName string VarName string SQLName string ParamName string PbKind string PbType string SQLType string GoType string GoValueType string GoTypeVarName string SupportsSQLNullType bool IsWellKnownType bool IsRepeatedType bool IsEnumType bool // contains filtered or unexported fields }
type FieldOption ¶
type MessageInfo ¶
type MessageInfo struct { MessageOptions []MessageOption NestedMessages []*MessageInfo Name string VarName string GoName string SQLName string Fields []Field KeyFields []Field Indices []Index Uniques []Unique // contains filtered or unexported fields }
func NewMessageInfo ¶
func NewMessageInfo(message protogen.Message) (*MessageInfo, error)
func (MessageInfo) DDLFileSuffix ¶
func (mi MessageInfo) DDLFileSuffix() (string, error)
DDLFileSuffix returns the suffix of ddl file.
func (MessageInfo) DMLFileSuffix ¶
func (mi MessageInfo) DMLFileSuffix() (string, error)
DMLFileSuffix returns file suffix for dml file.
func (MessageInfo) DMLMockFileSuffix ¶
func (mi MessageInfo) DMLMockFileSuffix() (string, error)
DMLMockFileSuffix returns file suffix for dml mock file.
func (MessageInfo) GenerateDDL ¶
func (mi MessageInfo) GenerateDDL() (string, error)
func (MessageInfo) GenerateDML ¶
func (mi MessageInfo) GenerateDML(goFilename string, mockFilename string) (string, error)
type MessageOption ¶
Click to show internal directories.
Click to hide internal directories.