command

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ClientConfigExt is the client remote server config file extension.
	ClientConfigExt = "teamclient.cfg"
	// ServerConfigExt is the server backend config file extension.
	ServerConfigExt = "teamserver.json"
)
View Source
const (
	// TeamServerGroup is the group of all server/client control commands.
	TeamServerGroup = "teamserver control"
	// UserManagementGroup is the group to manage teamserver users.
	UserManagementGroup = "user management"
)
View Source
const (
	// ANSI Colors.
	Normal    = "\033[0m"
	Black     = "\033[30m"
	Red       = "\033[31m"
	Green     = "\033[32m"
	Orange    = "\033[33m"
	Blue      = "\033[34m"
	Purple    = "\033[35m"
	Cyan      = "\033[36m"
	Gray      = "\033[37m"
	Bold      = "\033[1m"
	Clearln   = "\r\x1b[2K"
	UpN       = "\033[%dA"
	DownN     = "\033[%dB"
	Underline = "\033[4m"

	// Info - Display colorful information.
	Info = Cyan + "[*] " + Normal
	// Warn - warn a user.
	Warn = Red + "[!] " + Normal
	// Debugl - Display debugl information.
	Debugl = Purple + "[-] " + Normal
)

Colors / effects.

Variables

View Source
var TableStyle = table.Style{
	Name: "TeamServerDefault",
	Box: table.BoxStyle{
		BottomLeft:       " ",
		BottomRight:      " ",
		BottomSeparator:  " ",
		Left:             " ",
		LeftSeparator:    " ",
		MiddleHorizontal: "=",
		MiddleSeparator:  " ",
		MiddleVertical:   " ",
		PaddingLeft:      " ",
		PaddingRight:     " ",
		Right:            " ",
		RightSeparator:   " ",
		TopLeft:          " ",
		TopRight:         " ",
		TopSeparator:     " ",
		UnfinishedRow:    "~~",
	},
	Color: table.ColorOptions{
		IndexColumn:  text.Colors{},
		Footer:       text.Colors{},
		Header:       text.Colors{},
		Row:          text.Colors{},
		RowAlternate: text.Colors{},
	},
	Format: table.FormatOptions{
		Footer: text.FormatDefault,
		Header: text.FormatTitle,
		Row:    text.FormatDefault,
	},
	Options: table.Options{
		DrawBorder:      false,
		SeparateColumns: true,
		SeparateFooter:  false,
		SeparateHeader:  true,
		SeparateRows:    false,
	},
}

TableStyle is a default table style for users and listeners.

Functions

This section is empty.

Types

type CobraRunner

type CobraRunner func(*cobra.Command, []string)

CobraRunner is a cobra runner returning nothing.

type CobraRunnerE

type CobraRunnerE func(*cobra.Command, []string) error

CobraRunnerE is a cobra runner returning an error.

Jump to

Keyboard shortcuts

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