Documentation ¶
Index ¶
- Constants
- func Boolean(value interface{}, strict bool) (bool, error)
- func CheckBecomeErrorString(buffer []byte, method, username string) error
- func CheckBecomeMethod(method string) bool
- func CheckBecomeUnknownExec(buffer []byte, method, becomeExe string) error
- func CheckBecomeUnknownExecutable(buffer []byte, method, executable string) error
- func CheckBecomeUnknownUser(buffer []byte, method, username string) error
- func DefaultTerminalModels() ssh.TerminalModes
- func EnsurePath(path string, dir bool) error
- func FindUsername(username string) string
- func GenHashCode(str string) uint
- func GenHashDir(name string, ismd5 bool) []string
- func GenMd5(name string) string
- func GenName(name string) string
- func GoId() (int, error)
- func IndexOf(array, val interface{}) int
- func InitHomeDir(programName string) error
- func IsIPV4(ip string) bool
- func IsIPV6(ip string) bool
- func ProgramHomeDir(programName string, disableCache bool) (string, error)
- func RandBytes(n int) []byte
- func RandKey() string
- func ShlexJoin(args ...string) string
- func ShlexQuote(s string) string
- func ShlexSplit(s string) ([]string, error)
- func TerminalHeight(h int) int
- func TerminalName(name string) string
- func TerminalSize(h, w int) (int, int)
- func TerminalWidth(w int) int
Constants ¶
View Source
const ( // sub director SUB_DIR_CONF = "conf" SUB_DIR_LUALIBS = "lualibs" SUB_DIR_PLUGINS = "plugins" SUB_DIR_MODULES = "modules" SUB_DIR_TEMP = "tmp" )
View Source
const ( DEFAULT_TERM_NAME = "vt100" DEFAULT_TERM_HEIGHT = 80 DEFAULT_TERM_WIDTH = 40 )
View Source
const ( DEFAULT_TERM_ECHO = 0 // disable echoing DEFAULT_TERM_ISIG = 1 // Enable signals INTR, QUIT, [D]SUSP. DEFAULT_TTY_OP_ISPEED = 14400 // input speed = 14.4kbaud DEFAULT_TTY_OP_OSPEED = 14400 // output speed = 14.4kbaud )
Variables ¶
This section is empty.
Functions ¶
func CheckBecomeErrorString ¶
func CheckBecomeMethod ¶
find become method return true if found else false
func CheckBecomeUnknownExec ¶
func CheckBecomeUnknownUser ¶
check unknown user for become
func DefaultTerminalModels ¶
func DefaultTerminalModels() ssh.TerminalModes
func EnsurePath ¶
EnsurePath is used to make sure a path exists
func FindUsername ¶
find username return curren login name or root as username if username is empty
func GenHashCode ¶
func GenHashDir ¶
func InitHomeDir ¶
initialize working directory structure
func ShlexQuote ¶
func ShlexSplit ¶
func TerminalHeight ¶
func TerminalName ¶
func TerminalSize ¶
func TerminalWidth ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.