creinit

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(runtimeContext *runtime.Context) *cobra.Command

Types

type Inputs

type Inputs struct {
	ProjectName  string            `validate:"omitempty,project_name" cli:"project-name"`
	TemplateName string            `validate:"omitempty" cli:"template"`
	WorkflowName string            `validate:"omitempty,workflow_name" cli:"workflow-name"`
	RpcURLs      map[string]string // chain-name -> url, from --rpc-url flags
}

type InstalledDependencies added in v1.1.0

type InstalledDependencies struct {
	ModuleName string
	Deps       []string
}

InstalledDependencies contains info about installed Go dependencies

type RegistryInterface added in v1.2.0

type RegistryInterface interface {
	ListTemplates(refresh bool) ([]templaterepo.TemplateSummary, error)
	GetTemplate(name string, refresh bool) (*templaterepo.TemplateSummary, error)
	ScaffoldTemplate(tmpl *templaterepo.TemplateSummary, destDir, workflowName string, onProgress func(string)) error
}

RegistryInterface abstracts the registry for testing.

type WizardResult added in v1.1.0

type WizardResult struct {
	ProjectName      string
	WorkflowName     string
	SelectedTemplate *templaterepo.TemplateSummary
	NetworkRPCs      map[string]string // chain-name -> rpc-url
	OverwriteDir     bool              // user confirmed directory overwrite in wizard
	Completed        bool
	Cancelled        bool
}

WizardResult contains the wizard output

func RunWizard added in v1.1.0

func RunWizard(inputs Inputs, isNewProject bool, startDir string, templates []templaterepo.TemplateSummary, preselected *templaterepo.TemplateSummary) (WizardResult, error)

RunWizard runs the interactive wizard and returns the result.

Jump to

Keyboard shortcuts

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