reaction

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: GPL-3.0 Imports: 21 Imported by: 1

README

client/command/reaction

Overview

Implements the 'reaction' command group for the Sliver client console. Handlers map Cobra invocations to reaction workflows such as reload, save, SET, and unset.

Go Files

  • commands.go – Wires the reaction command set for automations and triggers.
  • helpers.go – Supplies shared lookup and persistence helpers for reaction rules.
  • reaction.go – Lists existing reactions and displays their trigger conditions.
  • reload.go – Reloads reaction definitions from disk into the client runtime.
  • save.go – Persists in-memory reaction definitions back to disk.
  • set.go – Creates or modifies reaction rules interactively.
  • unset.go – Removes configured reaction rules from the store.

Documentation

Index

Constants

View Source
const (
	ReactionFileName = "reactions.json"
)

Variables

View Source
var ErrNonReactableEvent = errors.New("non-reactable event type")

ErrNonReactableEvent - Event does not exist or is not supported by reactions.

Functions

func Commands added in v1.6.0

func Commands(con *console.SliverClient) []*cobra.Command

Commands returns the “ command and its subcommands.

func EventTypeToTitle

func EventTypeToTitle(eventType string) string

EventTypeToTitle - Convert an eventType to a more human friendly string.

func GetReactionFilePath

func GetReactionFilePath() string

GetReactionFilePath - Get the.

func LoadReactions

func LoadReactions() (int, error)

LoadReactions - Save the reactions to the reaction file.

func ReactionCmd

func ReactionCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ReactionCmd - Manage reactions to events.

func ReactionIDCompleter added in v1.6.0

func ReactionIDCompleter(_ *console.SliverClient) carapace.Action

ReactionIDCompleter completes saved/available reaction IDs.

func ReactionReloadCmd

func ReactionReloadCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ReactionSaveCmd - Manage reactions to events.

func ReactionSaveCmd

func ReactionSaveCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ReactionSaveCmd - Manage reactions to events.

func ReactionSetCmd

func ReactionSetCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ReactionSetCmd - Set a reaction upon an event.

func ReactionUnsetCmd

func ReactionUnsetCmd(cmd *cobra.Command, con *console.SliverClient, args []string)

ReactionUnsetCmd - Unset a reaction upon an event.

func SaveReactions

func SaveReactions(reactions []core.Reaction) error

SaveReactions - Save the reactions to the reaction file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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