The top-level entity that groups entrypoints and targets is now called Webhook (was Processor). The inbound URL endpoint entity is now called Entrypoint (was Webhook). This rename affects database models, handler comments, routes, and README documentation. closes #12
70 lines
2.3 KiB
Go
70 lines
2.3 KiB
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// HandleSourceList shows a list of user's webhooks
|
|
func (h *Handlers) HandleSourceList() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement webhook list page
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceCreate shows the form to create a new webhook
|
|
func (h *Handlers) HandleSourceCreate() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement webhook creation form
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceCreateSubmit handles the webhook creation form submission
|
|
func (h *Handlers) HandleSourceCreateSubmit() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement webhook creation logic
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceDetail shows details for a specific webhook
|
|
func (h *Handlers) HandleSourceDetail() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement webhook detail page
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceEdit shows the form to edit a webhook
|
|
func (h *Handlers) HandleSourceEdit() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement webhook edit form
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceEditSubmit handles the webhook edit form submission
|
|
func (h *Handlers) HandleSourceEditSubmit() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement webhook update logic
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceDelete handles webhook deletion
|
|
func (h *Handlers) HandleSourceDelete() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement webhook deletion logic
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceLogs shows the request/response logs for a webhook
|
|
func (h *Handlers) HandleSourceLogs() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement webhook logs page
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|