feat(message_gateway): expose PushRegistry contract

This commit is contained in:
ryan
2026-08-30 11:23:01 +08:00
parent 177d771acf
commit 9a5c2fa643
4 changed files with 107 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
// Package contracts defines unified service interfaces and DTOs for cross-plugin communication.
package contracts
import "context"
type PushNotificationTemplate struct {
Title string
Content string
Level string
Ext map[string]any
}
type PushEventMeta struct {
Key string
Name string
Description string
DefaultTemplate PushNotificationTemplate
}
type PushRegistry interface {
RegisterBuiltInEvent(meta PushEventMeta)
SyncEvents(ctx context.Context) error
}