Documentation ¶
Index ¶
- Variables
- func CamelCase(name string) string
- func CopyPasteFolder(destFolder, sourceFolder string) error
- func CreateEverythingExactly(rootToSkip, pathUnder string, fileRenamer map[string]string, data any, ...) error
- func CreateEverythingExactly2(rootToSkip, pathUnder string, fileRenamer map[string]string, data any) error
- func CreateFolderIfNotExist(folderPath string) (bool, error)
- func CreateGogenConfig(err error, domainName string) error
- func GetDefaultDomain2() string
- func GetExecutableName() string
- func GetGogenConfig() model.GogenConfig
- func GetPackageName(rootFolderName string) string
- func GetPackagePath() string
- func HasOneOfThisPrefix(s string, str ...string) bool
- func InjectCodeAtTheEndOfFile(filename, templateCode string) ([]byte, error)
- func InjectToCode(existingFile, injectedCode string) ([]byte, error)
- func InjectToErrorEnum(fset *token.FileSet, filepath string, errorName, separator string)
- func InjectToMain(fset *token.FileSet, applicationName string)
- func IsExist(fset *token.FileSet, rootFolderName string, ...) bool
- func IsFileExist(filepath string) bool
- func LowerCase(name string) string
- func MustJSON(obj any) string
- func NewOutportMethodImpl(structName, gatewayRootFolderName string) (map[string]int, error)
- func PascalCase(name string) string
- func PrintTemplate(templateString string, x any) (string, error)
- func Reformat(goFilename string, bytes []byte) error
- func SnakeCase(str string) string
- func SpaceCase(str string) string
- func StartWith(str, prefix string) bool
- func UpperCase(name string) string
- func WriteFile(templateData, outputFilePath string, obj any) error
- func WriteFileIfNotExist(templateFile, outputFilePath string, obj any) (bool, error)
- type FileAndFolders
- type FileAndFolders2
- type OutportMethods
- type TypeHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var AppTemplates embed.FS
View Source
var FuncMap = template.FuncMap{ "CamelCase": CamelCase, "PascalCase": PascalCase, "SnakeCase": SnakeCase, "UpperCase": UpperCase, "LowerCase": LowerCase, "SpaceCase": SpaceCase, "StartWith": StartWith, }
Functions ¶
func CopyPasteFolder ¶ added in v0.0.2
func CreateEverythingExactly ¶
func CreateEverythingExactly2 ¶ added in v0.0.2
func CreateFolderIfNotExist ¶
CreateFolderIfNotExist ...
func CreateGogenConfig ¶ added in v0.0.2
func GetDefaultDomain2 ¶ added in v0.0.2
func GetDefaultDomain2() string
func GetExecutableName ¶
func GetExecutableName() string
func GetGogenConfig ¶ added in v0.0.2
func GetGogenConfig() model.GogenConfig
func GetPackagePath ¶
func GetPackagePath() string
func HasOneOfThisPrefix ¶
HasOneOfThisPrefix ...
func InjectToCode ¶ added in v0.0.22
func InjectToErrorEnum ¶
func InjectToMain ¶
func IsFileExist ¶
func MustJSON ¶
MustJSON is converter from any to string Warning! this function will always assume the conversion is success if you are not sure the conversion is always succeed then use ToJSON
func NewOutportMethodImpl ¶
Types ¶
type FileAndFolders ¶
type FileAndFolders2 ¶ added in v0.0.2
type OutportMethods ¶
type OutportMethods []*method
OutportMethods ...
func NewOutportMethods ¶
func NewOutportMethods(domainName, usecaseName string) (OutportMethods, error)
NewOutportMethods read the Outport interface and collect all method on it
Source Files ¶
Click to show internal directories.
Click to hide internal directories.