mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-06 07:36:37 +08:00
chore(cordis): sync Wavelet core/pkg/plugins after W1-W9
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Copyright 2026 Arctel.net
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package contracts
|
||||
|
||||
// CaptchaService defines the contract for CAPTCHA challenge issuance,
|
||||
// redemption, and scoped verification middleware.
|
||||
type CaptchaService interface {
|
||||
VerifyMiddleware(scope string) any
|
||||
ChallengeHandler() any
|
||||
RedeemHandler() any
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// Copyright 2026 Arctel.net
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package contracts
|
||||
|
||||
import "context"
|
||||
|
||||
// PublicConfigProvider supplies the payload for GET /api/v1/config/public
|
||||
// when a downstream plugin replaces Wavelet's default {configs, app} JSON.
|
||||
type PublicConfigProvider interface {
|
||||
PublicConfig(ctx context.Context) (any, error)
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user