70 lines
2.3 KiB
Go
70 lines
2.3 KiB
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// HandleSourceList shows a list of user's webhook sources
|
|
func (h *Handlers) HandleSourceList() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement source list page
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceCreate shows the form to create a new webhook source
|
|
func (h *Handlers) HandleSourceCreate() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement source creation form
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceCreateSubmit handles the source creation form submission
|
|
func (h *Handlers) HandleSourceCreateSubmit() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement source creation logic
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceDetail shows details for a specific webhook source
|
|
func (h *Handlers) HandleSourceDetail() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement source detail page
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceEdit shows the form to edit a webhook source
|
|
func (h *Handlers) HandleSourceEdit() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement source edit form
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceEditSubmit handles the source edit form submission
|
|
func (h *Handlers) HandleSourceEditSubmit() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement source update logic
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceDelete handles webhook source deletion
|
|
func (h *Handlers) HandleSourceDelete() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement source deletion logic
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|
|
|
|
// HandleSourceLogs shows the request/response logs for a webhook source
|
|
func (h *Handlers) HandleSourceLogs() http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
// TODO: Implement source logs page
|
|
http.Error(w, "Not implemented", http.StatusNotImplemented)
|
|
}
|
|
}
|