cli

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 20 Imported by: 16

Documentation

Index

Constants

View Source
const (
	DIR = "dir"
	ENV = "env"
	API = "api"
	PID = "pid"
	PWD = "pwd"
)
View Source
const (
	BUILD = "build"
	ORDER = "order"
	SPAWN = "spawn"
	CHECK = "check"
	BENCH = "bench"
	PPROF = "pprof"
	CLEAR = "clear"

	TIMEOUT = "timeout"
	STATUS  = "status"
	ERROR   = "error"
	START   = "start"
	RESTART = "restart"
	RELOAD  = "reload"
	STOP    = "stop"

	CODE = "code"
	COST = "cost"
	BACK = "back"
	FROM = "from"
	MAIN = "main"
	KILL = "kill"

	OPEN  = "open"
	CLOSE = "close"
	BEGIN = "begin"
	END   = "end"
)
View Source
const (
	FG   = "fg"
	BG   = "bg"
	SIZE = "size"

	DARK  = 255
	LIGHT = 127
)
View Source
const (
	COLOR  = "color"
	BLACK  = "black"
	RED    = "red"
	GREEN  = "green"
	YELLOW = "yellow"
	BLUE   = "blue"
	PURPLE = "purple"
	CYAN   = "cyan"
	WHITE  = "white"
	RANDOM = "random"
	GLASS  = "#0000"
	GRAY   = "gray"
)
View Source
const (
	MAKE = "make"
	TEST = "test"
	HOST = "host"
	BOOT = "boot"
	CONF = "conf"
	NODE = "node"
)
View Source
const (
	GOARCH = "GOARCH"
	AMD64  = "amd64"
	X386   = "386"
	ARM    = "arm"
	ARM64  = "arm64"

	GOOS    = "GOOS"
	LINUX   = "linux"
	DARWIN  = "darwin"
	WINDOWS = "windows"

	OSID   = "OSID"
	ALPINE = "alpine"
	CENTOS = "centos"
	UBUNTU = "ubuntu"
)
View Source
const (
	SHELL = "SHELL"
	TERM  = "TERM"
	USER  = "USER"
	HOME  = "HOME"
	PATH  = "PATH"
)
View Source
const (
	CTX_SHY = "ctx_shy"
	CTX_DEV = "ctx_dev"
	CTX_OPS = "ctx_ops"
	CTX_ARG = "ctx_arg"

	CTX_PID   = "ctx_pid"
	CTX_LOG   = "ctx_log"
	CTX_USER  = "ctx_user"
	CTX_SHARE = "ctx_share"
	CTX_RIVER = "ctx_river"
)
View Source
const (
	HOSTNAME = "hostname"
	PATHNAME = "pathname"
	USERNAME = "username"
)
View Source
const (
	MAXPROCS = "maxprocs"
	IFCONFIG = "ifconfig"
	HOSTINFO = "hostinfo"
	USERINFO = "userinfo"
	PROCINFO = "procinfo"
	PROCKILL = "prockill"
	BOOTINFO = "bootinfo"
	DISKINFO = "diskinfo"
)
View Source
const (
	CMD_DIR = "cmd_dir"
	CMD_ENV = "cmd_env"

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

	CMD_OUT = "cmd_out"
	CMD_ERR = "cmd_err"
)
View Source
const CLI = "cli"
View Source
const DAEMON = "daemon"
View Source
const FOREVER = "forever"
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: "命令模块"}

Functions

func BinPath added in v0.9.8

func BinPath(arg ...string) string

func Color

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

func ColorGreen

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

func ColorRed

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

func ColorYellow

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

func IsSuccess added in v0.6.1

func IsSuccess(m *ice.Message) bool

func NodeInfo

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

func PushStream added in v0.9.9

func PushStream(m *ice.Message)

func SystemFind added in v0.9.6

func SystemFind(m *ice.Message, bin string, dir ...string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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