cli

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: MIT Imports: 20 Imported by: 19

Documentation

Index

Constants

View Source
const (
	MAKE = "make"
	TEST = "test"
	CONF = "conf"
	HOST = "host"
	BOOT = "boot"
	NODE = "node"
)
View Source
const (
	HOSTNAME = "hostname"
	PATHNAME = "pathname"
	USERNAME = "username"
)
View Source
const (
	CTX_SELF  = "ctx_self"
	CTX_DEV   = "ctx_dev"
	CTX_SHY   = "ctx_shy"
	CTX_PID   = "ctx_pid"
	CTX_USER  = "ctx_user"
	CTX_SHARE = "ctx_share"
	CTX_RIVER = "ctx_river"
)
View Source
const (
	DIR = "dir"
	ENV = "env"
	PID = "pid"
	PWD = "pwd"

	POD = "pod"
	CTX = "ctx"
	CMD = "cmd"
	ARG = "arg"

	RUN = "run"
	API = "api"
	RES = "res"
	ERR = "err"
)
View Source
const (
	ERROR = "error"
	BUILD = "build"
	SPAWN = "spawn"
	CHECK = "check"
	BENCH = "bench"
	PPROF = "pprof"

	OPEN    = "open"
	CLOSE   = "close"
	START   = "start"
	RESTART = "restart"
	RELOAD  = "reload"
	STOP    = "stop"
)
View Source
const (
	FG   = "fg"
	BG   = "bg"
	SIZE = "size"

	DARK  = 255
	LIGHT = 127
)
View Source
const (
	BLACK   = "black"
	RED     = "red"
	GREEN   = "green"
	YELLOW  = "yellow"
	BLUE    = "blue"
	MAGENTA = "magenta"
	CYAN    = "cyan"
	WHITE   = "white"
	RANDOM  = "random"
)
View Source
const (
	DISKINFO = "diskinfo"
	IFCONFIG = "ifconfig"
	HOSTINFO = "hostinfo"
	USERINFO = "userinfo"
	PROCINFO = "procinfo"
	BOOTINFO = "bootinfo"
)
View Source
const (
	CMD_DIR  = "cmd_dir"
	CMD_ENV  = "cmd_env"
	CMD_TYPE = "cmd_type"

	CMD_INPUT  = "cmd_input"
	CMD_OUTPUT = "cmd_output"
	CMD_ERRPUT = "cmd_errput"

	CMD_CODE = "cmd_code"
	CMD_ERR  = "cmd_err"
	CMD_OUT  = "cmd_out"
)
View Source
const (
	LINUX   = "linux"
	DARWIN  = "darwin"
	WINDOWS = "windows"
	SOURCE  = "source"
	TARGET  = "target"

	USER = "USER"
	HOME = "HOME"
	PATH = "PATH"
)
View Source
const CLI = "cli"
View Source
const DAEMON = "daemon"
View Source
const QRCODE = "qrcode"
View Source
const RUNTIME = "runtime"
View Source
const SYSTEM = "system"

Variables

View Source
var Index = &ice.Context{Name: CLI, Help: "命令模块",
	Commands: map[string]*ice.Command{
		ice.CTX_INIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
			m.Load()
			_cli_init(m)
		}},
		ice.CTX_EXIT: {Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
			m.Save()
		}},
	},
}

Functions

func Color added in v0.3.5

func Color(m *ice.Message, c string, str interface{}) string

func ColorGreen added in v0.3.5

func ColorGreen(m *ice.Message, str interface{}) string

func ColorRed added in v0.3.5

func ColorRed(m *ice.Message, str interface{}) string

func ColorYellow added in v0.3.5

func ColorYellow(m *ice.Message, str interface{}) string

func Inputs added in v0.3.8

func Inputs(m *ice.Message, field string) bool

func NodeInfo added in v0.2.3

func NodeInfo(m *ice.Message, kind, name string)

func SystemProcess added in v0.3.8

func SystemProcess(m *ice.Message, text string, arg ...string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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