Documentation ¶
Index ¶
- func Cmd() *cobra.Command
- func ConvertToTypeScriptType(goType string) string
- func WithDB(db types.DBType) optFunc[SaaSBuilder]
- func WithDir(dir string) optFunc[SaaSBuilder]
- func WithExternalDockerNetwork(externalDockerNetwork string) optFunc[SaaSBuilder]
- func WithIsService(isService bool) optFunc[SaaSBuilder]
- func WithModuleName(moduleName string) optFunc[SaaSBuilder]
- func WithRouter(router types.RouterType) optFunc[SaaSBuilder]
- func WithServiceName(serviceName string) optFunc[SaaSBuilder]
- func WithSiteSpec(siteSpec *spec.SiteSpec) optFunc[SaaSBuilder]
- func WriteApiProperty(writer io.Writer, name, tp string, isOptional bool, indent int) error
- type SaaSBuilder
- func (sb *SaaSBuilder) Execute() error
- func (sb *SaaSBuilder) WithCustomFunc(filePath string, fn customFunc)
- func (sb *SaaSBuilder) WithData(data map[string]any)
- func (sb *SaaSBuilder) WithIgnoreFile(file string)
- func (sb *SaaSBuilder) WithIgnoreFiles(files ...string)
- func (sb *SaaSBuilder) WithIgnorePath(path string)
- func (sb *SaaSBuilder) WithIgnorePaths(paths ...string)
- func (sb *SaaSBuilder) WithOverwriteFile(file string)
- func (sb *SaaSBuilder) WithOverwriteFiles(files ...string)
- func (sb *SaaSBuilder) WithRenameFile(oldName, newName string)
- func (sb *SaaSBuilder) WithRenameFiles(files map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToTypeScriptType ¶
ConvertToTypeScriptType converts Go types to TypeScript types
func WithDB ¶
func WithDB(db types.DBType) optFunc[SaaSBuilder]
func WithDir ¶
func WithDir(dir string) optFunc[SaaSBuilder]
dir, moduleName, serviceName string, db types.DBType, router types.RouterType, siteSpec *spec.SiteSpec
func WithExternalDockerNetwork ¶
func WithExternalDockerNetwork(externalDockerNetwork string) optFunc[SaaSBuilder]
func WithIsService ¶
func WithIsService(isService bool) optFunc[SaaSBuilder]
func WithModuleName ¶
func WithModuleName(moduleName string) optFunc[SaaSBuilder]
func WithRouter ¶
func WithRouter(router types.RouterType) optFunc[SaaSBuilder]
func WithServiceName ¶
func WithServiceName(serviceName string) optFunc[SaaSBuilder]
func WithSiteSpec ¶
func WithSiteSpec(siteSpec *spec.SiteSpec) optFunc[SaaSBuilder]
Types ¶
type SaaSBuilder ¶
type SaaSBuilder struct { Dir string ModuleName string ServiceName string DB types.DBType Router types.RouterType Spec *spec.SiteSpec Data map[string]any Themes map[string]string EmbeddedFS []embeddedFS HasEmbeddedFS bool CustomFuncs map[string]customFunc RenameFiles map[string]string IgnoreFiles map[string]bool IgnorePaths map[string]bool OverwriteFiles map[string]bool IsService bool ExternalDockerNetwork string }
func NewSaaSBuilder ¶
func NewSaaSBuilder(opts ...optFunc[SaaSBuilder]) *SaaSBuilder
func (*SaaSBuilder) Execute ¶
func (sb *SaaSBuilder) Execute() error
func (*SaaSBuilder) WithCustomFunc ¶
func (sb *SaaSBuilder) WithCustomFunc(filePath string, fn customFunc)
func (*SaaSBuilder) WithData ¶
func (sb *SaaSBuilder) WithData(data map[string]any)
func (*SaaSBuilder) WithIgnoreFile ¶
func (sb *SaaSBuilder) WithIgnoreFile(file string)
func (*SaaSBuilder) WithIgnoreFiles ¶
func (sb *SaaSBuilder) WithIgnoreFiles(files ...string)
func (*SaaSBuilder) WithIgnorePath ¶
func (sb *SaaSBuilder) WithIgnorePath(path string)
func (*SaaSBuilder) WithIgnorePaths ¶
func (sb *SaaSBuilder) WithIgnorePaths(paths ...string)
func (*SaaSBuilder) WithOverwriteFile ¶
func (sb *SaaSBuilder) WithOverwriteFile(file string)
func (*SaaSBuilder) WithOverwriteFiles ¶
func (sb *SaaSBuilder) WithOverwriteFiles(files ...string)
func (*SaaSBuilder) WithRenameFile ¶
func (sb *SaaSBuilder) WithRenameFile(oldName, newName string)
func (*SaaSBuilder) WithRenameFiles ¶
func (sb *SaaSBuilder) WithRenameFiles(files map[string]string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.