Documentation ¶
Index ¶
- Constants
- func Tpl() *template.Template
- type GoGen
- type Package
- func (this *Package) Constants() map[string]*parser.Constant
- func (this *Package) Enums() map[string]*parser.Enum
- func (this *Package) Exceptions() map[string]*parser.Struct
- func (this *Package) FullImportPath() string
- func (this *Package) GenConstants(constant *parser.Constant) string
- func (this *Package) GenServiceMethodArguments(fields []*parser.Field) string
- func (this *Package) GenServiceMethodReturn(method *parser.Method) string
- func (this *Package) GenTypeString(fieldName string, typ, parent *parser.Type, optional bool) string
- func (this *Package) GenWebApiServiceParams(fields []*parser.Field) string
- func (this *Package) Includes() map[string]*Package
- func (this *Package) IsStruct(typ *parser.Type) bool
- func (this *Package) MethodRequestName(service, method string) string
- func (this *Package) MethodResponseName(service, method string) string
- func (this *Package) Namespace() string
- func (this *Package) Namespaces() map[string]string
- func (this *Package) Services() map[string]*parser.Service
- func (this *Package) Structs() map[string]*parser.Struct
- func (this *Package) Typedefs() map[string]*parser.Typedef
- func (this *Package) Unions() map[string]*parser.Struct
- func (this *Package) WebApiPrefix() string
- type TplUtils
- func (this *TplUtils) FieldTagJson(field *parser.Field) string
- func (this *TplUtils) FieldTagThrift(field *parser.Field) string
- func (this *TplUtils) GenNamespace(namespace string) (pkgName string, importPath string)
- func (this *TplUtils) IsInvalidTypeName(str string) bool
- func (this *TplUtils) IsNilType(typ *parser.Type) bool
- func (this *TplUtils) IsSimpleArguments(args []*parser.Field) bool
- func (this *TplUtils) UpperHead(name string) string
Constants ¶
View Source
const ( TypeBool = langs.ThriftTypeBool TypeByte = langs.ThriftTypeByte TypeI16 = langs.ThriftTypeI16 TypeI32 = langs.ThriftTypeI32 TypeI64 = langs.ThriftTypeI64 TypeDouble = langs.ThriftTypeDouble TypeBinary = langs.ThriftTypeBinary TypeString = langs.ThriftTypeString TypeList = langs.ThriftTypeList TypeMap = langs.ThriftTypeMap TypeSet = langs.ThriftTypeSet )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Package ¶
type Package struct { PkgName string ImportPath string TplUtils ValidateParams bool // contains filtered or unexported fields }
func (*Package) FullImportPath ¶
func (*Package) GenServiceMethodArguments ¶
func (*Package) GenServiceMethodReturn ¶
func (*Package) GenTypeString ¶
func (*Package) GenWebApiServiceParams ¶
func (*Package) MethodRequestName ¶
func (*Package) MethodResponseName ¶
func (*Package) Namespaces ¶
func (*Package) WebApiPrefix ¶
type TplUtils ¶
type TplUtils struct { }
func (*TplUtils) GenNamespace ¶
func (*TplUtils) IsInvalidTypeName ¶
func (*TplUtils) IsSimpleArguments ¶
Click to show internal directories.
Click to hide internal directories.