actions

package
v0.0.0-...-e9d226e Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ID = "actions"

Variables

View Source
var Actions = actionList{}

Functions

func InitPlugin

func InitPlugin(c *types.PluginConfig) error

func RegisterActions

func RegisterActions(actions ...*Action)

Simple helper function to register an action

Types

type Action

type Action struct {
	Name          string
	Description   string
	ConfirmDialog string                                        // If unset, no confirm dialog will be shown
	Handler       func(*ActionContext) (*ActionResponse, error) `json:"-"`
}

type ActionContext

type ActionContext struct {
	Request *http.Request
}

type ActionResponse

type ActionResponse struct {
	StatusCode int
	Resp       string
	TaskID     string
}

Jump to

Keyboard shortcuts

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