Challenge Service Events 1.0.0 documentation
備考
In this document, PUB
means "publish" and SUB
means "subscribe". This refers to the "publish/subscribe" (pub/sub) messaging framework, where "publish" means that the service sends data to Kafka topics, and "subscribe" means the service acts as a consumer that subscribes to specific Kafka topics to receive data.
- Specification ID:
http://challenge-service
- Protobuf File Spec: challenge.proto
Table of Contents
Operations
PUB goalCompleted
Operation
Event fired when a user completes a goal
Message goalCompleted
Payload
Name | Type | Description | Value | Constraints | Notes |
---|---|---|---|---|---|
(root) | object allOf | - | - | - | additional properties are allowed |
payload | object | - | - | - | additional properties are allowed |
payload.namespace | string | namespace origin of completed goal | - | - | required |
payload.challengeCode | string | associated challengeCode from completed goal | - | - | required |
payload.goalCode | string | completed goalCode | - | - | required |
payload.completedAt | string | timestamp of completion | - | format (date-time ) | required |
payload.userId | string | userId that completes the goal | - | - | required |
payload.scheduleId | string | scheduleId which the goal completed | - | - | required |
payload.scheduleStart | string | timestamp of the schedule's start time | - | format (date-time ) | required |
payload.scheduleEnd | string | timestamp of the schedule's end time (optional) | - | format (date-time ) | - |
0 (allOf item) | object | - | - | - | additional properties are allowed |
id | string | - | - | - | - |
version | integer | - | - | - | - |
name | string | - | - | - | - |
namespace | string | - | - | - | - |
parentNamespace | string | - | - | - | - |
timestamp | string | - | - | format (date-time ) | - |
clientId | string | - | - | - | - |
userId | string | UserId of the operator for this event (optional) | - | - | - |
traceId | string | - | - | - | - |
sessionId | string | - | - | - | - |
spanContext | string | - | - | - | - |
Examples of payload (generated)
{
"payload": {
"namespace": "string",
"challengeCode": "string",
"goalCode": "string",
"completedAt": "2019-08-24T14:15:22Z",
"userId": "string",
"scheduleId": "string",
"scheduleStart": "2019-08-24T14:15:22Z",
"scheduleEnd": "2019-08-24T14:15:22Z"
},
"id": "string",
"version": 0,
"name": "string",
"namespace": "string",
"parentNamespace": "string",
"timestamp": "2019-08-24T14:15:22Z",
"clientId": "string",
"userId": "string",
"traceId": "string",
"sessionId": "string",
"spanContext": "string"
}