Documentation
¶
Index ¶
- Constants
- func ArrayType(t string) bool
- func CurrentTypeOf(s string) string
- func ElemSerializer(ad adesc.AnonymousDesc, gops genops.Options) string
- func Fields(td tdesc.TypeDesc) (fs []tdesc.FieldDesc)
- func FieldsLen(td tdesc.TypeDesc) (l int)
- func KeySerializer(ad adesc.AnonymousDesc, gops genops.Options) string
- func MakeAddFunc() func(int, int) int
- func MakeArrayOps(ad adesc.AnonymousDesc) string
- func MakeByteSliceOps(ad adesc.AnonymousDesc) string
- func MakeFieldTmplPipe(td tdesc.TypeDesc, field tdesc.FieldDesc, index int, gops genops.Options) struct{ ... }
- func MakeFirstLetterBig(s string) string
- func MakeFirstLetterSmall(s string) string
- func MakeIncludeFunc(tmpl *template.Template) func(string, interface{}) (string, error)
- func MakeMapOps(ad adesc.AnonymousDesc) string
- func MakeMinusFunc() func(int, int) int
- func MakeSliceOps(ad adesc.AnonymousDesc) string
- func MakeStringOps(ad adesc.AnonymousDesc) string
- func PtrType(t string) (ok bool)
- func SerType(td tdesc.TypeDesc) string
- func SerVar(td tdesc.TypeDesc) string
- func SerializerOf(fd tdesc.FieldDesc, gops genops.Options) string
- func TmpVarName(s string) string
- func VarName(s string) string
- type FileGenerator
- func (g *FileGenerator) AddDTS(t reflect.Type) (err error)
- func (g *FileGenerator) AddInterface(t reflect.Type, ops ...introps.SetOption) (err error)
- func (g *FileGenerator) AddStruct(t reflect.Type, ops ...structops.SetOption) (err error)
- func (g *FileGenerator) AddTypedef(t reflect.Type, ops ...typeops.SetOption) (err error)
- func (g *FileGenerator) Generate() (bs []byte, err error)
Constants ¶
View Source
const SuffixMUS = "MUS"
Variables ¶
This section is empty.
Functions ¶
func CurrentTypeOf ¶
func ElemSerializer ¶
func ElemSerializer(ad adesc.AnonymousDesc, gops genops.Options) string
func KeySerializer ¶
func KeySerializer(ad adesc.AnonymousDesc, gops genops.Options) string
func MakeArrayOps ¶
func MakeArrayOps(ad adesc.AnonymousDesc) string
func MakeByteSliceOps ¶
func MakeByteSliceOps(ad adesc.AnonymousDesc) string
func MakeFieldTmplPipe ¶
func MakeFirstLetterBig ¶
func MakeFirstLetterSmall ¶
func MakeIncludeFunc ¶
MakeIncludeFunc creates template's include func.
func MakeMapOps ¶
func MakeMapOps(ad adesc.AnonymousDesc) string
func MakeMinusFunc ¶
MakeMinusFunc creates template's minus func.
func MakeSliceOps ¶
func MakeSliceOps(ad adesc.AnonymousDesc) string
func MakeStringOps ¶
func MakeStringOps(ad adesc.AnonymousDesc) string
func TmpVarName ¶
Types ¶
type FileGenerator ¶
type FileGenerator struct {
// contains filtered or unexported fields
}
func NewFileGenerator ¶
func NewFileGenerator(ops ...genops.SetOption) *FileGenerator
NewFileGenerator creates a new FileGenerator.
func (*FileGenerator) AddInterface ¶
func (*FileGenerator) AddTypedef ¶
func (*FileGenerator) Generate ¶
func (g *FileGenerator) Generate() (bs []byte, err error)
Click to show internal directories.
Click to hide internal directories.