Documentation
¶
Index ¶
- func CreateScenario(s store.Store) http.HandlerFunc
- func CreateSession(s store.Store) http.HandlerFunc
- func DeleteScenario(s store.Store) http.HandlerFunc
- func DeleteSession(s store.Store) http.HandlerFunc
- func GetLog(s store.Store) http.HandlerFunc
- func GetScenario(s store.Store) http.HandlerFunc
- func GetWebhook(s store.Store) http.HandlerFunc
- func GetWebhookStatus(s store.Store) http.HandlerFunc
- func GetWorkspace(s store.Store) http.HandlerFunc
- func ListGateways(reg *adapters.Registry) http.HandlerFunc
- func ListLogs(s store.Store) http.HandlerFunc
- func ListScenarios(s store.Store) http.HandlerFunc
- func ListWebhooks(s store.Store) http.HandlerFunc
- func Login(s store.Store, jwtSecret, mode string) http.HandlerFunc
- func Logout(mode string) http.HandlerFunc
- func Me(s store.Store) http.HandlerFunc
- func NewMock(eng *engine.Engine, reg *adapters.Registry, s store.Store, ...) http.Handler
- func NewMockWithMode(eng *engine.Engine, reg *adapters.Registry, s store.Store, ...) http.Handler
- func ReplayLog(s store.Store, eng *engine.Engine, reg *adapters.Registry, ...) http.HandlerFunc
- func RunScenario(s store.Store, eng *engine.Engine, reg *adapters.Registry, ...) http.HandlerFunc
- func Signup(s store.Store, jwtSecret, mode string) http.HandlerFunc
- func TestWebhook(d *webhook.Dispatcher) http.HandlerFunc
- func UpdateScenario(s store.Store) http.HandlerFunc
- func UpdateWorkspace(s store.Store) http.HandlerFunc
- func WorkspaceFromRequest(r *http.Request, s store.Store) (*store.Workspace, error)
- func WorkspaceIDFromRequest(r *http.Request, s store.Store) string
- type MockHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateScenario ¶
func CreateScenario(s store.Store) http.HandlerFunc
func CreateSession ¶
func CreateSession(s store.Store) http.HandlerFunc
func DeleteScenario ¶
func DeleteScenario(s store.Store) http.HandlerFunc
func DeleteSession ¶
func DeleteSession(s store.Store) http.HandlerFunc
func GetScenario ¶
func GetScenario(s store.Store) http.HandlerFunc
func GetWebhook ¶
func GetWebhook(s store.Store) http.HandlerFunc
GetWebhook returns one webhook_log by its id (not by request_log_id).
func GetWebhookStatus ¶
func GetWebhookStatus(s store.Store) http.HandlerFunc
func GetWorkspace ¶
func GetWorkspace(s store.Store) http.HandlerFunc
func ListGateways ¶
func ListGateways(reg *adapters.Registry) http.HandlerFunc
ListGateways returns the set of canonical gateway names known to the server. The dashboard uses this to render per-gateway webhook configuration dynamically so the UI stays in sync with whatever adapters are registered.
func ListScenarios ¶
func ListScenarios(s store.Store) http.HandlerFunc
func ListWebhooks ¶
func ListWebhooks(s store.Store) http.HandlerFunc
ListWebhooks returns all webhook dispatches for the caller's workspace, newest first. Each entry includes target URL, delivery status, attempts, attempt_logs, and the payload sent.
func Logout ¶
func Logout(mode string) http.HandlerFunc
func NewMockWithMode ¶
func ReplayLog ¶
func ReplayLog(s store.Store, eng *engine.Engine, reg *adapters.Registry, d *webhook.Dispatcher) http.HandlerFunc
func RunScenario ¶
func RunScenario(s store.Store, eng *engine.Engine, reg *adapters.Registry, d *webhook.Dispatcher) http.HandlerFunc
func TestWebhook ¶
func TestWebhook(d *webhook.Dispatcher) http.HandlerFunc
func UpdateScenario ¶
func UpdateScenario(s store.Store) http.HandlerFunc
func UpdateWorkspace ¶
func UpdateWorkspace(s store.Store) http.HandlerFunc
UpdateWorkspace lets the authenticated caller edit mutable workspace fields. Currently only WebhookURLs (a gateway → URL map) is editable.
func WorkspaceFromRequest ¶
WorkspaceFromRequest resolves the workspace the current request should act on. Priority:
- Authorization: Bearer <api_key> → lookup by api_key
- Session cookie (Session middleware injects workspace_id into ctx) → by id
- Local fallback: the "local" workspace
Exposed so other handlers can scope queries by caller's workspace.
Types ¶
type MockHandler ¶
type MockHandler struct {
// contains filtered or unexported fields
}
func (*MockHandler) ServeHTTP ¶
func (h *MockHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)