Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModuleDto ¶
type ModuleDto struct { PackageName string FileName string ModuleName string Path string ProjectPath string GomodName string AddFuncArgs *ast.FunctionArgList AddFuncArgToReturn *ast.FunctionReturnArgsSpec AddStructVarDecl *ast.StructArgList AddImport *ast.ImportSpec }
type ModuleGen ¶
type ModuleGen interface { CreateNewModule(dto ModuleDto) error BuildModuleTemplate(dto ModuleDto) (string, error) }
create module, what is module all of these package is based on module. dependency in here called as a module
type ModuleGenImpl ¶
type ModuleGenImpl struct {
// contains filtered or unexported fields
}
func NewModuleGen ¶
func NewModuleGen(fs database.FileSystem, wireGen wiregen.WireGen) *ModuleGenImpl
func (ModuleGenImpl) BuildModuleTemplate ¶
func (s ModuleGenImpl) BuildModuleTemplate(dto ModuleDto) (string, error)
BuildModuleTemplate will build base file of the module, such as interface struct and the construct
func (ModuleGenImpl) CreateNewModule ¶
func (s ModuleGenImpl) CreateNewModule(dto ModuleDto) error
CreateNewModule to create new module
type ModuleType ¶
type ModuleType int
const ( ServiceModule ModuleType = iota + 1 RepositoryModule ProtocolModule DatabaseModule AnyModule )
func NewModuleTypeFromString ¶
func NewModuleTypeFromString(s string) ModuleType
func (ModuleType) ToString ¶
func (m ModuleType) ToString() string
Click to show internal directories.
Click to hide internal directories.