Documentation
¶
Index ¶
- func GenerateBinding(structName string, method *BoundMethod) (string, []string)
- func GenerateBindings(bindings map[string]map[string][]*BoundMethod) map[string]string
- func GenerateBindingsAndModels(projectDir string, outputDir string) error
- func GenerateHelper(packageName, structName string) string
- func GenerateModel(wr io.Writer, def *ModelDefinitions) error
- func GenerateModels(models map[packagePath]map[structName]*StructDef) (string, error)
- type BoundMethod
- type Field
- type ModelDefinitions
- type Parameter
- type ParameterType
- type ParsedPackage
- type Project
- type StructDef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBinding ¶
func GenerateBinding(structName string, method *BoundMethod) (string, []string)
func GenerateBindings ¶
func GenerateBindings(bindings map[string]map[string][]*BoundMethod) map[string]string
func GenerateHelper ¶
func GenerateModel ¶
func GenerateModel(wr io.Writer, def *ModelDefinitions) error
func GenerateModels ¶
Types ¶
type BoundMethod ¶
type Field ¶
type Field struct {
Name string
Type *ParameterType
}
type ModelDefinitions ¶
type Parameter ¶
type Parameter struct {
Name string
Type *ParameterType
}
type ParameterType ¶
type ParameterType struct {
Name string
IsStruct bool
IsSlice bool
IsPointer bool
MapKey *ParameterType
MapValue *ParameterType
Package string
}
type ParsedPackage ¶
type Project ¶
type Project struct {
Path string
BoundMethods map[packagePath]map[structName][]*BoundMethod
Models map[packagePath]map[structName]*StructDef
// contains filtered or unexported fields
}
func ParseProject ¶
Click to show internal directories.
Click to hide internal directories.