feat: Gotify CRUD + internal handler dispatch for notification service
CI / CI (pull_request) Successful in 3m11s

- Add internal handler support to ServiceAdapter (Handler field)
- Dispatcher routes to internal handler when set (no reverse proxy)
- GotifyClient: full CRUD (send/list/delete messages, CRUD applications)
- Refactor notification handler: route by X-Resource header, not body format
- Register notification as ServiceAdapter with auth required
- Resources: send-email, send-message, list-messages, delete-message,
  delete-all-messages, list-applications, create-application, delete-application
- Update examples: sendmsg-email.sh, gotify-crud.sh
- Env vars: GOTIFY_URL, GOTIFY_APP_TOKEN, GOTIFY_CLIENT_TOKEN
This commit is contained in:
Admin Bot
2026-09-15 08:51:19 +09:00
parent 03f3239cd0
commit 509cb39521
7 changed files with 605 additions and 207 deletions
+9 -5
View File
@@ -1,6 +1,7 @@
package serviceadapter
import (
"net/http"
"time"
)
@@ -49,11 +50,14 @@ type Status struct {
}
// ServiceAdapter is a gateway service adapter.
// When Handler is set, the dispatcher routes directly to the internal handler
// instead of reverse-proxying to Spec.Upstream.URL.
type ServiceAdapter struct {
Name string // namespace/name
Namespace string
Name string // namespace/name
Namespace string
ServiceName string
Spec Spec
Status Status
CreatedAt time.Time
Spec Spec
Status Status
CreatedAt time.Time
Handler http.Handler `json:"-" yaml:"-"` // internal handler (skip serialization)
}