Documentation ¶
Overview ¶
Package actions provides interfaces to manage tasks and provides default implementation for common actions.
Action are registered by ID during the init phase of each actions' subfolder
Index ¶
- Constants
- Variables
- type ActionDescription
- type ActionsManager
- func (m *ActionsManager) ActionById(actionId string) (ConcreteAction, bool)
- func (m *ActionsManager) DescribeActions(languages ...string) map[string]ActionDescription
- func (m *ActionsManager) LoadActionForm(actionID string) (*forms.Form, error)
- func (m *ActionsManager) Register(name string, a Concrete)
- type Concrete
- type ConcreteAction
- type ControllableAction
- type DescriptionProviderAction
- type ProgressProviderAction
- type RecursiveNodeWalkerAction
- type RunnableChannels
- type TaskUpdaterDelegateAction
Constants ¶
const ( ActionCategoryTree = "01 - Files/Folders Operations" ActionCategoryArchives = "02 - Archives Operations" ActionCategoryScheduler = "03 - Scheduler Tools / Internals" ActionCategoryPutGet = "04 - Upload/Download to External Servers" ActionCategoryCmd = "05 - Atomic Commands and Scripts" ActionCategoryContents = "06 - Contents Processing" ActionCategoryIDM = "07 - Identity Management" ActionCategoryNotify = "08 - Notifications and Emails" ActionCategoryETL = "09 - Extract/Load/Transform" )
Variables ¶
var CategoryTints = map[string]string{ ActionCategoryTree: "#03a9f4", ActionCategoryArchives: "#fbc02d", ActionCategoryScheduler: "#009688", ActionCategoryPutGet: "#4caf50", ActionCategoryCmd: "#795548", ActionCategoryContents: "#f44336", ActionCategoryIDM: "#438db3", ActionCategoryNotify: "#ff9800", ActionCategoryETL: "#009688", }
Functions ¶
This section is empty.
Types ¶
type ActionDescription ¶
type ActionsManager ¶
type ActionsManager struct {
// contains filtered or unexported fields
}
func GetActionsManager ¶
func GetActionsManager() *ActionsManager
GetActionsManager provides global access to the default action manager.
func (*ActionsManager) ActionById ¶
func (m *ActionsManager) ActionById(actionId string) (ConcreteAction, bool)
func (*ActionsManager) DescribeActions ¶
func (m *ActionsManager) DescribeActions(languages ...string) map[string]ActionDescription
DescribeActions provides a list of all registered actions
func (*ActionsManager) LoadActionForm ¶
func (m *ActionsManager) LoadActionForm(actionID string) (*forms.Form, error)
LoadActionForm tries to load a forms.Form object that can be serialized for frontend
func (*ActionsManager) Register ¶
func (m *ActionsManager) Register(name string, a Concrete)
type Concrete ¶
type Concrete func() ConcreteAction
type ConcreteAction ¶
type ConcreteAction interface { // Unique identifier GetName() string // Pass parameters Init(job *jobs.Job, cl client.Client, action *jobs.Action) error // Run the actual action code Run(ctx context.Context, channels *RunnableChannels, input jobs.ActionMessage) (jobs.ActionMessage, error) }
ConcreteAction is the base interface for pydio actions. All actions must implement this interface.
type ControllableAction ¶
Actions that implement this interface can eventually be stopped and/or paused+resumed
type DescriptionProviderAction ¶
type DescriptionProviderAction interface { GetDescription(lang ...string) ActionDescription GetParametersForm() *forms.Form }
DescriptionProviderAction has a human-readable label
type ProgressProviderAction ¶
type ProgressProviderAction interface {
ProvidesProgress() bool
}
Actions that implement this interface will publish progress updates on the progress channel.
type RecursiveNodeWalkerAction ¶
type RecursiveNodeWalkerAction interface {
SetNodeFilterAsWalkFilter(*jobs.NodesSelector)
}
Actions that implement this interface may perform some recursive nodes listing internally. If the action definition has a NodeFilter set, pass this along to the running instance to filter nodes on the go.
type RunnableChannels ¶
type RunnableChannels struct { // Input Channels Pause chan interface{} Resume chan interface{} Stop chan interface{} // Output Channels Status chan jobs.TaskStatus StatusMsg chan string Progress chan float32 }
RunnableChannels defines the API to communicate with a Runnable via Channels
func (*RunnableChannels) BlockUntilResume ¶
func (r *RunnableChannels) BlockUntilResume(maxPauseTime ...time.Duration) chan interface{}
BlockUntilResume returns a blocking channel that can be inserted anywhere to block execution
type TaskUpdaterDelegateAction ¶
Actions that implement this interface can send their status updates to a parent task
Directories ¶
Path | Synopsis |
---|---|
Package archive provides implementation of actions to work with archive files.
|
Package archive provides implementation of actions to work with archive files. |
Package archive provides implementation of actions to work with archive files.
|
Package archive provides implementation of actions to work with archive files. |
Package cmd provides default implementation for command-line-like actions.
|
Package cmd provides default implementation for command-line-like actions. |
Package images provides default implementation of image related tasks.
|
Package images provides default implementation of image related tasks. |
Package scheduler provides default implementation for basic scheduler tasks.
|
Package scheduler provides default implementation for basic scheduler tasks. |
Package tree provides default implementation for tree related tasks.
|
Package tree provides default implementation for tree related tasks. |