From fbae8cac937d51028b925851bc83515bcf6f6c5e Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 22 Aug 2020 11:36:39 +0600 Subject: [PATCH] add trigger and publishingkeyreceiver interfaces --- .../postssystem/core/publishing/PublishingKeyReceiver.kt | 7 +++++++ .../postssystem/core/publishing/Trigger.kt | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/PublishingKeyReceiver.kt create mode 100644 publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/Trigger.kt diff --git a/publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/PublishingKeyReceiver.kt b/publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/PublishingKeyReceiver.kt new file mode 100644 index 00000000..405f6bc5 --- /dev/null +++ b/publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/PublishingKeyReceiver.kt @@ -0,0 +1,7 @@ +package com.insanusmokrassar.postssystem.core.publishing + +import com.insanusmokrassar.postssystem.core.post.PostId + +interface PublishingKeyReceiver : Trigger { + suspend fun acceptKey(postId: PostId, publishingKey: TriggerControlKey) +} diff --git a/publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/Trigger.kt b/publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/Trigger.kt new file mode 100644 index 00000000..16b8703f --- /dev/null +++ b/publishing/api/src/commonMain/kotlin/com/insanusmokrassar/postssystem/core/publishing/Trigger.kt @@ -0,0 +1,7 @@ +package com.insanusmokrassar.postssystem.core.publishing + +typealias TriggerId = String + +interface Trigger { + val id: TriggerId +} \ No newline at end of file