terminal

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTerminalCommands

func GetTerminalCommands() map[string]ICommands

Types

type Command

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

func NewCommand

func NewCommand(cmd events.CommandTerminal,
	commands map[string]ICommands) *Command

func (*Command) Execute

func (c *Command) Execute(ctx context.Context) (output string, err error)

type CommandHelp added in v0.16.0

type CommandHelp struct {
	Out *bytes.Buffer
	// contains filtered or unexported fields
}

func NewCommandHelp added in v0.16.0

func NewCommandHelp() *CommandHelp

func (*CommandHelp) Execute added in v0.16.0

func (c *CommandHelp) Execute(ctx context.Context, args ...string) (out string, err error)

func (*CommandHelp) Help added in v0.16.0

func (c *CommandHelp) Help(ctx context.Context) (out string, err error)

type CommandOptions

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

type CommandSudo

type CommandSudo struct {
	Out *bytes.Buffer
	*sync.Mutex
	// contains filtered or unexported fields
}

func NewCommandSudo

func NewCommandSudo() *CommandSudo

func (*CommandSudo) Execute

func (c *CommandSudo) Execute(ctx context.Context, args ...string) (out string, err error)

func (*CommandSudo) Help

func (c *CommandSudo) Help(ctx context.Context) (out string, err error)

type ICommands

type ICommands interface {
	Execute(ctx context.Context, args ...string) (out string, err error)
	Help(ctx context.Context) (out string, err error)
}

type Terminal

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

Terminal ...

func NewTerminal

func NewTerminal(lc fx.Lifecycle,
	config *m.AppConfig,
	eventBus bus.Bus,
	adaptors *adaptors.Adaptors,
	jwtManager jwt_manager.JwtManager,
	commands map[string]ICommands) (t *Terminal)

NewTerminal ...

func (*Terminal) RunCommand

func (t *Terminal) RunCommand(cmd events.CommandTerminal)

func (*Terminal) Shutdown

func (t *Terminal) Shutdown(_ context.Context) (err error)

Shutdown ...

func (*Terminal) Start

func (t *Terminal) Start(_ context.Context) (err error)

Start ...

type TerminalResponseMessage

type TerminalResponseMessage struct {
	Type string `json:"type"`
	Body string `json:"body"`
}

type UpdateAccessTokenMessage

type UpdateAccessTokenMessage struct {
	AccessToken string `json:"access_token"`
}

Jump to

Keyboard shortcuts

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