Documentation
¶
Overview ¶
Package server wires the REST API (README §14) on top of Echo. It is a thin HTTP layer: all real logic lives in internal/tasks, internal/ watchers, internal/scheduler, internal/system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Tasks *tasks.Store
Watchers *watchers.Service
Schedules *scheduler.Store
Notifications *notifications.Store
DiskPath string
SlackSigningSecret string // empty = POST /slack/commands always rejects
}
Options bundles New's dependencies - grown past the point a positional parameter list stays readable.
type SocketModeClient ¶
type SocketModeClient struct {
AppToken string // xapp-... token, Basic Information > App-Level Tokens, connections:write scope
Server *Server
HTTPClient *http.Client
}
SocketModeClient runs Slack's Socket Mode protocol: an outbound WebSocket connection FROM LocalOps TO Slack, the opposite direction from POST /slack/commands. Slash commands arrive over this socket instead, so no public HTTP endpoint (Funnel, a reverse proxy, a signing secret) is needed at all - trade-off is Slack's Request URL field goes unused; this is the alternative delivery path, not an addition to it.
func NewSocketModeClient ¶
func NewSocketModeClient(appToken string, s *Server) *SocketModeClient
func (*SocketModeClient) Run ¶
func (c *SocketModeClient) Run(ctx context.Context)
Run connects and reconnects (with backoff) until ctx is cancelled. Meant to be launched as `go client.Run(ctx)` from main, alongside the HTTP server - the two are independent delivery paths for the same commands.