dao

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPluginMap

func NewPluginMap() map[string][]func(types.DAOContext) ([]Code, error)

Types

type DataStore

type DataStore struct {
	// contains filtered or unexported fields
}

type Decl

type Decl struct {
	Name string
	Code Code
}

type Declare

type Declare struct {
	Imports     types.ImportList
	Constructor *types.ConstructorDeclare
	Methods     []*types.MethodDeclare
}

type FuncDecl

type FuncDecl struct {
	*Decl
	Comment string
}

func (*FuncDecl) IsGenerated

func (d *FuncDecl) IsGenerated() bool

type FuncDecls

type FuncDecls []*FuncDecl

func (FuncDecls) FuncNameMap

func (d FuncDecls) FuncNameMap() map[string]*FuncDecl

func (FuncDecls) GeneratedFuncs

func (d FuncDecls) GeneratedFuncs() FuncDecls

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(cfg *config.Config) *Generator

func (*Generator) Generate

func (g *Generator) Generate(classes []*types.Class) error

func (*Generator) PackageDeclare

func (g *Generator) PackageDeclare(class *types.Class, path string) (*Declare, error)

type MethodGenerator

type MethodGenerator struct {
	// contains filtered or unexported fields
}

func (*MethodGenerator) Generate

func (g *MethodGenerator) Generate(importList types.ImportList) *Statement

type MethodGenerators

type MethodGenerators []*MethodGenerator

type PackageDecl

type PackageDecl struct {
	Funcs      FuncDecls
	Interfaces []*types.MethodDeclare
	Structs    []*Decl
	Imports    types.ImportList
}

func (*PackageDecl) InterfaceMap

func (d *PackageDecl) InterfaceMap() map[string]*types.MethodDeclare

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL