actions

package
v0.204.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type ActionCommand

type ActionCommand struct {
	ID      string      `json:"id,omitempty"`      // Identify the command (optional)
	Path    string      `json:"path,omitempty"`    // Path for the value
	Value   interface{} `json:"value,omitempty"`   // Write values
	Comment string      `json:"comment,omitempty"` // Write all values or
	From    string      `json:"from,omitempty"`    // optional say where the command was listed from
}

ActionCommand write the values

type ActionHandler

type ActionHandler interface {
	ExecuteAction(ctx context.Context, cmd ActionCommand) ActionResponse
}

type ActionResponse

type ActionResponse struct {
	Code  int         `json:"code,omitempty"` // Match HTTP response code
	Error string      `json:"error,omitempty"`
	State interface{} `json:"state,omitempty"`
}

Jump to

Keyboard shortcuts

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