creinit

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MissingNetworks added in v1.8.0

func MissingNetworks(template *templaterepo.TemplateSummary, flagRpcURLs map[string]string) []string

MissingNetworks returns the network names from the template that were not provided via --rpc-url flags. Returns nil if all networks are covered or the template has no network requirements.

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
	NonInteractive bool
	ProjectRoot    string // from -R / --project-root flag
}

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