command

package
v0.0.0-...-9fe59c7 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetArgs

func GetArgs(cmd string) command_args.CommandArgument

func RegisterCommand

func RegisterCommand(command Command)

Types

type Command

type Command interface {
	Execute(args command_args.CommandArgument, hub IHub)
	Name() string
}

type CommandMap

type CommandMap struct {
	// contains filtered or unexported fields
}
var Commands *CommandMap

func (*CommandMap) Get

func (c *CommandMap) Get(cmd string) Command

type IHub

type IHub interface {
	BroadcastToClient(payload []byte, targetUserID string)
	BroadcastMessage(message string)
	HandleCommand(cmd string)
	Run()
	HandleMessage(message string)
}

Jump to

Keyboard shortcuts

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