cmd

package
v0.0.0-...-bb29ae1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source

Functions

This section is empty.

Types

type BaseCommand

type BaseCommand struct {
	// contains filtered or unexported fields
}

BaseCommand struct

func NewBaseCommand

func NewBaseCommand() *BaseCommand

NewBaseCommand cmd struct

func (*BaseCommand) AddCommands

func (bc *BaseCommand) AddCommands(children ...Command)

AddCommands adds children commands to the parent command

func (*BaseCommand) CobraCmd

func (bc *BaseCommand) CobraCmd() *cobra.Command

CobraCmd returns BaseCommand

func (*BaseCommand) Init

func (bc *BaseCommand) Init()

Init BaseCommand

func (*BaseCommand) Name

func (bc *BaseCommand) Name() string

Name returns name of BaseCommand

type ChatCommand

type ChatCommand struct {
	BaseCommand
}

ChatCommand chat cmd struct

func (*ChatCommand) Init

func (c *ChatCommand) Init()

Init ChatCommand

type Cli

type Cli struct {
	// contains filtered or unexported fields
}

Cli cmd struct

func NewCli

func NewCli() *Cli

NewCli returns the cli instance used to register and execute command

type Command

type Command interface {
	// Init command
	Init()

	CobraCmd() *cobra.Command
}

Command is cli command interface

type ListOnlineCommand

type ListOnlineCommand struct {
	BaseCommand
}

ListOnlineCommand list cmd struct

func (*ListOnlineCommand) Init

func (c *ListOnlineCommand) Init()

Init ListOnlineCommand

type StartCommand

type StartCommand struct {
	BaseCommand
}

StartCommand start cmd struct

func (*StartCommand) Init

func (c *StartCommand) Init()

Init StartCommand

Jump to

Keyboard shortcuts

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