Documentation ¶
Index ¶
- Constants
- Variables
- func GenDefineSTCode(pSet *generator.PrototypeSet, td *TmplDataPBDefineST, df *generator.DefineST) (string, error)
- func GenProtoFile(pSet *generator.PrototypeSet, origFn string) (string, error)
- func GenSetForProto(pSet *generator.PrototypeSet) ([]string, error)
- func PrepareTmplDataDefineST(pSet *generator.PrototypeSet, td *TmplDataPBDefineST, pf *generator.DefineST) error
- func PrepareTmplDataDefineSTField(pSet *generator.PrototypeSet, td *TmplDataPBDefineSTField, ...) error
- func PrepareTmplDataProtoFile(pSet *generator.PrototypeSet, td *TmplDataPBProtoFile, pf *generator.File) error
- type Context
- type PBOption
- type TmplDataPBDefineST
- type TmplDataPBDefineSTField
- type TmplDataPBProtoFile
Constants ¶
View Source
const TDPBDefineSTBuiltin = `` /* 208-byte string literal not displayed */
View Source
const TDPBProtoFileBuiltin = `` /* 273-byte string literal not displayed */
Variables ¶
View Source
var ( ArrTemplateDataDefine = []*generator.TemplateDataDefine{ {Name: "TmplDataPBDefineST", Sample: &TmplDataPBDefineST{}}, {Name: "TmplDataPBDefineSTField", Sample: &TmplDataPBDefineSTField{}}, {Name: "TmplDataPBProtoFile", Sample: &TmplDataPBProtoFile{}}, } )
View Source
var TDPBDefineST = &generator.TemplateDefine{ Name: "TDPBDefineST", Filepath: "protobuf_define_st.tmpl", BuiltinTemplateText: TDPBDefineSTBuiltin, }
View Source
var TDPBProtoFile = &generator.TemplateDefine{ Name: "TDPBProtoFile", Filepath: "protobuf_proto_file.tmpl", WantTemplateData: "TmplDataPBProtoFile", BuiltinTemplateText: TDPBProtoFileBuiltin, }
Functions ¶
func GenDefineSTCode ¶ added in v0.3.0
func GenDefineSTCode(pSet *generator.PrototypeSet, td *TmplDataPBDefineST, df *generator.DefineST) (string, error)
func GenProtoFile ¶ added in v0.3.0
func GenProtoFile(pSet *generator.PrototypeSet, origFn string) (string, error)
func GenSetForProto ¶
func GenSetForProto(pSet *generator.PrototypeSet) ([]string, error)
func PrepareTmplDataDefineST ¶ added in v0.3.0
func PrepareTmplDataDefineST(pSet *generator.PrototypeSet, td *TmplDataPBDefineST, pf *generator.DefineST) error
func PrepareTmplDataDefineSTField ¶ added in v0.3.0
func PrepareTmplDataDefineSTField(pSet *generator.PrototypeSet, td *TmplDataPBDefineSTField, pf *generator.DefineSTField) error
func PrepareTmplDataProtoFile ¶ added in v0.3.0
func PrepareTmplDataProtoFile(pSet *generator.PrototypeSet, td *TmplDataPBProtoFile, pf *generator.File) error
Types ¶
type Context ¶ added in v0.3.0
type Context struct { Dir string `json:"dir"` Package string `json:"package"` PBOptions map[string]string `json:"pbOptions"` PBOuterImport map[string]string `json:"pbOuterImport"` PBPlugins []string `json:"pbPlugins"` }
var GenCtx *Context
type PBOption ¶ added in v0.3.0
func ParsePBOption ¶ added in v0.3.0
type TmplDataPBDefineST ¶ added in v0.3.0
type TmplDataPBDefineST struct { *generator.TmplDataDefineST SuperProtoFile *TmplDataPBProtoFile PBFields []*TmplDataPBDefineSTField }
type TmplDataPBDefineSTField ¶ added in v0.3.0
type TmplDataPBDefineSTField struct { *generator.TmplDataDefineSTField SuperDefineST *TmplDataPBDefineST PBSequence int }
type TmplDataPBProtoFile ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.