Documentation ¶
Index ¶
- Variables
- func Declare(example func())
- func Expand(funcTemplate *FuncTemplate, templateArgs ...interface{}) interface{}
- func GenerateCode(gopath string, pkgPath string)
- func New(structTemplate *StructTemplate, interfaceType reflect.Type) interface{}
- func RegisterExpandedFunc(expandedFuncName string, expandedFunc interface{})
- type ArgMap
- type FuncTemplate
- type FuncTemplateBuilder
- func (builder *FuncTemplateBuilder) Declare(declaration string) *FuncTemplateBuilder
- func (builder *FuncTemplateBuilder) Generators(kv ...interface{}) *FuncTemplateBuilder
- func (builder *FuncTemplateBuilder) ImportFunc(funcTemplates ...*FuncTemplate) *FuncTemplateBuilder
- func (builder *FuncTemplateBuilder) ImportPackage(pkg string) *FuncTemplateBuilder
- func (builder *FuncTemplateBuilder) ImportStruct(structTemplates ...*StructTemplate) *FuncTemplateBuilder
- func (builder *FuncTemplateBuilder) Param(paramName string, paramDescription string, defaultValues ...interface{}) *FuncTemplateBuilder
- func (builder *FuncTemplateBuilder) Source(source string) *FuncTemplate
- type MangledNameProvider
- type StructTemplate
- type StructTemplateBuilder
- type TemplateParam
Constants ¶
This section is empty.
Variables ¶
View Source
var Bool = reflect.TypeOf(true)
View Source
var DynamicCompilationEnabled = false
View Source
var Float32 = reflect.TypeOf(float32(0))
View Source
var Float64 = reflect.TypeOf(float64(0))
View Source
var Int = reflect.TypeOf(int(0))
View Source
var Int16 = reflect.TypeOf(int16(0))
View Source
var Int32 = reflect.TypeOf(int32(0))
View Source
var Int64 = reflect.TypeOf(int64(0))
View Source
var Int8 = reflect.TypeOf(int8(0))
View Source
var String = reflect.TypeOf("")
View Source
var Uint = reflect.TypeOf(uint(0))
View Source
var Uint16 = reflect.TypeOf(uint16(0))
View Source
var Uint32 = reflect.TypeOf(uint32(0))
View Source
var Uint64 = reflect.TypeOf(uint64(0))
View Source
var Uint8 = reflect.TypeOf(uint8(0))
Functions ¶
func Expand ¶
func Expand(funcTemplate *FuncTemplate, templateArgs ...interface{}) interface{}
func GenerateCode ¶
func New ¶
func New(structTemplate *StructTemplate, interfaceType reflect.Type) interface{}
func RegisterExpandedFunc ¶
func RegisterExpandedFunc(expandedFuncName string, expandedFunc interface{})
Types ¶
type FuncTemplate ¶
type FuncTemplate struct {
// contains filtered or unexported fields
}
func (*FuncTemplate) ImportFunc ¶
func (funcTemplate *FuncTemplate) ImportFunc(funcTemplates ...*FuncTemplate)
type FuncTemplateBuilder ¶
type FuncTemplateBuilder struct {
// contains filtered or unexported fields
}
func DefineFunc ¶
func DefineFunc(signature string) *FuncTemplateBuilder
func (*FuncTemplateBuilder) Declare ¶
func (builder *FuncTemplateBuilder) Declare(declaration string) *FuncTemplateBuilder
func (*FuncTemplateBuilder) Generators ¶
func (builder *FuncTemplateBuilder) Generators(kv ...interface{}) *FuncTemplateBuilder
func (*FuncTemplateBuilder) ImportFunc ¶
func (builder *FuncTemplateBuilder) ImportFunc(funcTemplates ...*FuncTemplate) *FuncTemplateBuilder
func (*FuncTemplateBuilder) ImportPackage ¶
func (builder *FuncTemplateBuilder) ImportPackage(pkg string) *FuncTemplateBuilder
func (*FuncTemplateBuilder) ImportStruct ¶
func (builder *FuncTemplateBuilder) ImportStruct(structTemplates ...*StructTemplate) *FuncTemplateBuilder
func (*FuncTemplateBuilder) Param ¶
func (builder *FuncTemplateBuilder) Param(paramName string, paramDescription string, defaultValues ...interface{}) *FuncTemplateBuilder
func (*FuncTemplateBuilder) Source ¶
func (builder *FuncTemplateBuilder) Source(source string) *FuncTemplate
type MangledNameProvider ¶
type MangledNameProvider interface {
MangledName() string
}
type StructTemplate ¶
type StructTemplate struct {
// contains filtered or unexported fields
}
type StructTemplateBuilder ¶
type StructTemplateBuilder struct {
// contains filtered or unexported fields
}
func DefineStruct ¶
func DefineStruct(structName string) *StructTemplateBuilder
func (*StructTemplateBuilder) Source ¶
func (builder *StructTemplateBuilder) Source(source string) *StructTemplate
type TemplateParam ¶
Click to show internal directories.
Click to hide internal directories.