module

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCannotSaveLocalManifest = errsys.New("cannot save a local manifest", "Cannot save a local manifesto")
	ErrCannotCreateDirectory   = errsys.New("cannot create a directory", "Cannot create a directory")
	ErrCannotCreateModuleFile  = errsys.New("cannot create a module file", "Cannot create a module file")
	ErrCannotInstallStorage    = errsys.New("cannot install the storage feature", "Cannot install the storage feature")
	ErrCannotInstallGraphQL    = errsys.New("cannot install the graphql feature", "Cannot install the graphql feature")
)
View Source
var ErrCannotInstallModule = errors.NewWithHint(
	"cannot install the module",
	"The install field in the manifest file should be a valid command running under 'go run'",
)
View Source
var ErrCannotRunGoGetCommand = errors.NewWithHint(
	"cannot run go get command",
	"Cannot run go get command. Ensure that 'go get' command is available in your system. Install Golang if necessary https://go.dev/doc/install.",
)
View Source
var ErrPackageIsEmpty = errors.NewWithHint(
	"package is empty",
	"Please provide a package for the module in the manifest file.",
)

Functions

func NewAddCliCommand

func NewAddCliCommand(addCli *AddCli) *cli.Command

func NewAddJsonApiCommand

func NewAddJsonApiCommand(addJsonApi *AddJsonApi) *cli.Command

func NewCreateCommand

func NewCreateCommand(createModule *Create) *cli.Command

func NewInitStorageCommand added in v0.1.3

func NewInitStorageCommand(cmd *InitStorage) *cli.Command

func NewInstallCommand

func NewInstallCommand(addModule *Install) *cli.Command

func NewModuleCommand

func NewModuleCommand(
	create *Create,
	install *Install,
	addCli *AddCli,
	addJsonApi *AddJsonApi,
	initStorage *InitStorage,
) *cli.Command

Types

type AddCli

type AddCli struct {
}

func NewAddCli

func NewAddCli() *AddCli

func (*AddCli) Invoke

func (a *AddCli) Invoke(
	ctx context.Context,
	cmd *cli.Command,
) error

type AddCliTmplVars

type AddCliTmplVars struct {
	StructName  string
	CommandName string
}

type AddJsonApi

type AddJsonApi struct {
}

func NewAddJsonApi

func NewAddJsonApi() *AddJsonApi

func (*AddJsonApi) Invoke

func (a *AddJsonApi) Invoke(
	ctx context.Context,
	cmd *cli.Command,
) error

type AddJsonApiTmplVars

type AddJsonApiTmplVars struct {
	StructName  string
	Uri         string
	PackageName string
	Method      string
}

func (AddJsonApiTmplVars) IsBodyRequired

func (v AddJsonApiTmplVars) IsBodyRequired() bool

type Create

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

func NewCreate

func NewCreate(
	logger *slog.Logger,
	installStorage *action.InstallStorage,
) *Create

func (*Create) Invoke

func (c *Create) Invoke(
	ctx context.Context,
	cmd *cli.Command,
) (err error)

type InitStorage added in v0.1.3

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

func NewInitStorage added in v0.1.3

func NewInitStorage(installStorage *action.InstallStorage) *InitStorage

func (*InitStorage) Invoke added in v0.1.3

func (c *InitStorage) Invoke(ctx context.Context, cmd *cli.Command) error

type Install

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

func NewInstall

func NewInstall(
	logger *slog.Logger,
) *Install

func (*Install) Invoke

func (c *Install) Invoke(
	ctx context.Context,
	cmd *cli.Command,
) error

type InstalledFileVars

type InstalledFileVars struct {
	ModuleName     string
	ProjectPackage string
}

type TmplVars

type TmplVars struct {
	Module     module.Manifesto
	HasStorage bool
}

Jump to

Keyboard shortcuts

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