Documentation
¶
Index ¶
- func GetLibraryModules(directory string) ([]string, error)
- type PackageFuncExtra
- type PackageFunctionExtra
- type PackageTypeExtra
- type TemplateData
- func (d *TemplateData) InitNativeScripts()
- func (d *TemplateData) WriteGoTemplate(outputDirectory string, pkgName string) error
- func (d *TemplateData) WriteJSTemplate(outputDirectory string, pkgName string) error
- func (d *TemplateData) WriteMarkdownIndexTemplate(outputDirectory string) error
- func (d *TemplateData) WriteMarkdownLibraryDocumentation(outputDirectory string, pkgName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLibraryModules ¶
GetLibraryModules takes a directory and returns subdirectories as modules
Types ¶
type PackageFuncExtra ¶
type PackageFuncExtra struct {
Items map[string]PackageFunctionExtra
Doc string
}
PackageFuncExtra contains extra information about a function
type PackageFunctionExtra ¶
PackageFunctionExtra contains extra information about a function
type PackageTypeExtra ¶
PackageTypeExtra contains extra information about a type
type TemplateData ¶
type TemplateData struct {
PackageName string
PackagePath string
HasObjects bool
PackageFuncs map[string]string
PackageInterfaces map[string]string
PackageFuncsExtraNoType map[string]PackageFunctionExtra
PackageFuncsExtra map[string]PackageFuncExtra
PackageVars map[string]string
PackageVarsValues map[string]string
PackageTypes map[string]string
PackageTypesExtra map[string]PackageTypeExtra
PackageDefinedConstructor map[string]struct{}
// NativeScripts contains the list of native scripts
// that should be included in the package.
NativeScripts []string
// contains filtered or unexported fields
}
TemplateData contains the parameters for the JS code generator
func CreateTemplateData ¶
func CreateTemplateData(directory string, packagePrefix string) (*TemplateData, error)
CreateTemplateData creates a TemplateData structure from a directory of go source code.
func (*TemplateData) InitNativeScripts ¶
func (d *TemplateData) InitNativeScripts()
InitNativeScripts initializes the native scripts array with all the exported functions from the runtime
func (*TemplateData) WriteGoTemplate ¶
func (d *TemplateData) WriteGoTemplate(outputDirectory string, pkgName string) error
WriteGoTemplate writes the go template to the output file
func (*TemplateData) WriteJSTemplate ¶
func (d *TemplateData) WriteJSTemplate(outputDirectory string, pkgName string) error
WriteJSTemplate writes the js template to the output file
func (*TemplateData) WriteMarkdownIndexTemplate ¶
func (d *TemplateData) WriteMarkdownIndexTemplate(outputDirectory string) error
WriteMarkdownIndexTemplate writes the markdown documentation to the output file
func (*TemplateData) WriteMarkdownLibraryDocumentation ¶
func (d *TemplateData) WriteMarkdownLibraryDocumentation(outputDirectory string, pkgName string) error
WriteMarkdownLibraryDocumentation writes the markdown documentation for a js library to the output file