init

package
v0.0.0-...-80e6674 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	REPO string = "https://github.com/aziontech/azioncli-template.git"
)

Variables

This section is empty.

Functions

func NewCmd

func NewCmd(f *cmdutil.Factory) *cobra.Command

func NewCobraCmd

func NewCobraCmd(init *InitCmd, f *cmdutil.Factory) *cobra.Command

Types

type InitCmd

type InitCmd struct {
	F                     *cmdutil.Factory
	Io                    *iostreams.IOStreams
	GetWorkDir            func() (string, error)
	FileReader            func(path string) ([]byte, error)
	LookPath              func(bin string) (string, error)
	IsDirEmpty            func(dirpath string) (bool, error)
	CleanDir              func(dirpath string) error
	WriteFile             func(filename string, data []byte, perm fs.FileMode) error
	OpenFile              func(name string) (*os.File, error)
	RemoveAll             func(path string) error
	Rename                func(oldpath string, newpath string) error
	CreateTempDir         func(dir string, pattern string) (string, error)
	EnvLoader             func(path string) ([]string, error)
	Stat                  func(path string) (fs.FileInfo, error)
	Mkdir                 func(path string, perm os.FileMode) error
	GitPlainClone         func(path string, isBare bool, o *git.CloneOptions) (*git.Repository, error)
	CommandRunner         func(cmd string, envvars []string) (string, int, error)
	CommandRunInteractive func(f *cmdutil.Factory, comm string) error
	ShouldDevDeploy       func(info *InitInfo, msg string) (bool, error)
	DeployCmd             func(f *cmdutil.Factory) *deploy.DeployCmd
	DevCmd                func(f *cmdutil.Factory) *dev.DevCmd
	ChangeDir             func(dir string) error
}

func NewInitCmd

func NewInitCmd(f *cmdutil.Factory) *InitCmd

func (*InitCmd) Run

func (cmd *InitCmd) Run(info *InitInfo) error

type InitInfo

type InitInfo struct {
	Name           string
	Template       string
	Mode           string
	PathWorkingDir string
	GlobalFlagAll  bool
}

Jump to

Keyboard shortcuts

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