internal

package
v1.109.1184 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CmdInstall = &Command{
	UsageLine: "install -p [path] -v [version] -n [name] -d [download]",
	Short:     "Automatically configure the CEF and Energy framework",
	Long: `
	-p Installation directory Default current directory
	-v Specifying a version number,Default latest
	-n Name of the frame after installation
	-d Download Source, gitee or github, Default gitee
	.  Execute default command

Automatically configure the CEF and Energy framework.

During this process, CEF and Energy are downloaded.

Default framework name is "EnergyFramework".
`,
}
View Source
var CmdPackage = &Command{
	UsageLine: "package -p [path] -m [model] -o [out]",
	Short:     "Making an Installation Package",
	Long: `

	-p Package directory
	-m Use mode to set online or offline, offline by default
	-o Output directory
	.  Execute default command

Making an Installation Package.

	Set the package directory by specifying Path. The current directory is the default
		Use mode to set online or offline, offline by default.
		The framework is automatically downloaded when installed in online mode, installation package will be much smaller.
		Offline mode makes the framework into the package,installation package will be large
`,
}
View Source
var CmdVersion = &Command{
	UsageLine: "package -a [all]",
	Short:     "Get version list",
	Long: `
	-a show all details
	.  Execute default command
`,
}

Functions

func ExtractFiles

func ExtractFiles(keyName, sourcePath string, di *downloadInfo, extractOSConfig map[string]interface{})

提取文件

func ExtractUnTar

func ExtractUnTar(filePath, targetPath string, files ...interface{})

func ExtractUnZip

func ExtractUnZip(filePath, targetPath string, files ...interface{})

func UnBz2ToTar

func UnBz2ToTar(name string, callback func(totalLength, processLength int64)) string

释放bz2文件到tar

Types

type Command

type Command struct {
	Run                    func(c *CommandConfig) error
	UsageLine, Short, Long string
}

type CommandConfig

type CommandConfig struct {
	Index   int
	Wd      string
	Install Install `command:"install"`
	Package Package `command:"package"`
	Version Version `command:"version"`
}

type Install

type Install struct {
	Path     string `short:"p" long:"path" description:"Installation directory Default current directory"`
	Version  string `short:"v" long:"version" description:"Specifying a version number"`
	Name     string `short:"n" long:"name" description:"Name of the frame after installation" default:"EnergyFramework"`
	Download string `short:"d" long:"download" description:"Download Source, gitee or github, Default gitee" default:"gitee"`
}

type Package

type Package struct {
	Path string `short:"p" long:"path" description:"Package directory"`
	Mode string `short:"m" long:"mode" description:"Use mode to set online or offline, offline by default." default:"offline"`
	Out  string `short:"o" long:"out" description:"Output directory" default:"EnergyInstallPkg"`
}

type Version

type Version struct {
	All bool `short:"a" long:"all" description:"show all"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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