Documentation ¶
Overview ¶
Pcakage triggers provides a simple interface to setup all sub-module triggers. Adding a new trigger here should be two new lines of code and a new import.
Index ¶
- type Actions
- func (a *Actions) APIHandler(req *http.Request) (int, interface{})
- func (a *Actions) HandleGetTriggers(_ *http.Request) (int, interface{})
- func (a *Actions) Handler(response http.ResponseWriter, req *http.Request)
- func (a *Actions) Start(ctx context.Context, reloadCh chan os.Signal)
- func (a *Actions) Stop(event website.EventType)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actions ¶
type Actions struct { Timers *common.Config // Order is important here. PlexCron *plexcron.Action Backups *backups.Action CFSync *cfsync.Action CronTimer *crontimer.Action Dashboard *dashboard.Action FileWatch *filewatch.Action Gaps *gaps.Action SnapCron *snapcron.Action StarrQueue *starrqueue.Action Commands *commands.Action EmptyTrash *emptytrash.Action MDbList *mdblist.Action }
Actions defines all our triggers and timers. Any action here will automatically have its interface methods called.
func (*Actions) APIHandler ¶ added in v0.4.1
APIHandler is passed into the webserver so triggers can be executed from the API.
func (*Actions) HandleGetTriggers ¶ added in v0.5.0
@Description Returns a list of triggers and website timers with their intervals, if configured. @Summary Get trigger list @Tags Triggers @Produce json @Success 200 {object} apps.Respond.apiResponse{message=triggers.triggerOutput} "lists of triggers and timers" @Failure 404 {object} string "bad token or api key" @Router /api/triggers [get] @Security ApiKeyAuth
func (*Actions) Handler ¶ added in v0.4.1
func (a *Actions) Handler(response http.ResponseWriter, req *http.Request)
Handler handles GUI (non-API) trigger requests.
Directories ¶
Path | Synopsis |
---|---|
package commands provides the interfaces and structures to trigger and run shell commands.
|
package commands provides the interfaces and structures to trigger and run shell commands. |
cmdconfig
cmdconfig contains the input config for commands.
|
cmdconfig contains the input config for commands. |