Documentation ¶
Index ¶
- Variables
- func CSTypeName(fd *model.FieldDescriptor) string
- func CSTypeNameFull(fd *model.FieldDescriptor) (ret string)
- func ExportSymbolName(name string) string
- func GoTypeName(fd *model.FieldDescriptor) string
- func IsMessage(d *model.Descriptor) bool
- func TagNumber(d *model.Descriptor, fd *model.FieldDescriptor) (tag int)
- type CodeGen
- func (self *CodeGen) Code() string
- func (self *CodeGen) Data() []byte
- func (self *CodeGen) Error() error
- func (self *CodeGen) FormatGoCode() *CodeGen
- func (self *CodeGen) ParseTemplate(textTemplate string, modelData interface{}) *CodeGen
- func (self *CodeGen) RegisterTemplateFunc(funcMap template.FuncMap) *CodeGen
- func (self *CodeGen) WriteBytes(data *[]byte) *CodeGen
- func (self *CodeGen) WriteOutputFile(outputFileName string) *CodeGen
Constants ¶
This section is empty.
Variables ¶
View Source
var UsefulFunc = template.FuncMap{}
Functions ¶
func CSTypeName ¶
func CSTypeName(fd *model.FieldDescriptor) string
func CSTypeNameFull ¶
func CSTypeNameFull(fd *model.FieldDescriptor) (ret string)
func ExportSymbolName ¶
func GoTypeName ¶
func GoTypeName(fd *model.FieldDescriptor) string
func IsMessage ¶
func IsMessage(d *model.Descriptor) bool
func TagNumber ¶
func TagNumber(d *model.Descriptor, fd *model.FieldDescriptor) (tag int)
Types ¶
type CodeGen ¶
type CodeGen struct {
// contains filtered or unexported fields
}
func NewCodeGen ¶
func (*CodeGen) FormatGoCode ¶
func (*CodeGen) ParseTemplate ¶
func (*CodeGen) RegisterTemplateFunc ¶
func (*CodeGen) WriteBytes ¶
func (*CodeGen) WriteOutputFile ¶
Click to show internal directories.
Click to hide internal directories.