cli

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Down = cmd.Sub{
	Name:  "down",
	Alias: "d",
	Short: "Bring Down A Hyprspace Interface.",
	Args:  &DownArgs{},
	Run:   DownRun,
}

Down brings down a Hyprspace interface and removes it from the system.

View Source
var Init = cmd.Sub{
	Name:  "init",
	Alias: "i",
	Short: "Initialize An Interface Config",
	Args:  &InitArgs{},
	Run:   InitRun,
}

Init creates a configuration for a Hyprspace Interface.

View Source
var (

	// RevLookup allow quick lookups of an incoming stream
	// for security before accepting or responding to any data.
	RevLookup map[string]string
)
View Source
var Root *cmd.Root

Root is the main command.

View Source
var Spinner = []string{"|", "/", "-", "\\"}

Spinner is an array of the progression of the spinner.

View Source
var Up = cmd.Sub{
	Name:  "up",
	Alias: "up",
	Short: "Create and Bring Up a Hyprspace Interface.",
	Args:  &UpArgs{},
	Flags: &UpFlags{},
	Run:   UpRun,
}

Up creates and brings up a Hyprspace Interface.

View Source
var Update = cmd.Sub{
	Name:  "update",
	Alias: "upd",
	Short: "Update Hyprspace to the lastest version.",
	Args:  &UpdateArgs{},
	Flags: &UpdateFlags{},
	Run:   UpdateRun,
}

Update checks for a new version of the Hyprspace program and updates itself if a newer version is found and the user agrees to update.

Functions

func DownRun

func DownRun(r *cmd.Root, c *cmd.Sub)

DownRun handles the execution of the down command.

func InitRun

func InitRun(r *cmd.Root, c *cmd.Sub)

InitRun handles the execution of the init command.

func SpinnerWait

func SpinnerWait(done chan int, message string, wg *sync.WaitGroup)

SpinnerWait displays the actual spinner

func UpRun

func UpRun(r *cmd.Root, c *cmd.Sub)

UpRun handles the execution of the up command.

func UpdateRun

func UpdateRun(r *cmd.Root, c *cmd.Sub)

UpdateRun handles the checking and self updating of the AIT program.

Types

type DownArgs

type DownArgs struct {
	InterfaceName string
}

DownArgs handles the specific arguments for the down command.

type GlobalFlags

type GlobalFlags struct {
	Config string `short:"c" long:"config" desc:"Specify a custom config path."`
}

GlobalFlags contains the flags for commands.

type InitArgs

type InitArgs struct {
	InterfaceName string
}

InitArgs handles the specific arguments for the init command.

type UpArgs

type UpArgs struct {
	InterfaceName string
}

UpArgs handles the specific arguments for the up command.

type UpFlags

type UpFlags struct {
	Foreground bool `short:"f" long:"foreground" desc:"Don't Create Background Daemon."`
}

UpFlags handles the specific flags for the up command.

type UpdateArgs

type UpdateArgs struct {
}

UpdateArgs handles the specific arguments for the update command.

type UpdateFlags

type UpdateFlags struct {
	Yes bool `short:"y" long:"yes" desc:"If a newer version is found update without prompting the user."`
}

UpdateFlags handles the specific flags for the update command.

Jump to

Keyboard shortcuts

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