SSE(Server Side Event) 서비스
포인트 사용 Flow
이벤트 메세지 Graphql 정의
EventType - 이벤트 타입 정의
const (
// AccessLogEventType Accesslog 이벤트
AccessLogEventType EventType = "AccessLogEvent"
// CalendarEventType 캘린더 이벤트
CalendarEventType EventType = "CalendarEvent"
// ForceLogoutEventType 강제 로그아웃 이벤트
ForceLogoutEventType EventType = "ForceLogoutEvent"
// InviteEventType 초대장 이벤트
InviteEventType EventType = "InviteEvent"
// MediaConvertEventType 미디어 컨버트 이벤트
MediaConvertEventType EventType = "MediaConvertEvent"
// SSEConnectEventType SSE 서버 연결 이벤트
SSEConnectEventType EventType = "SSEConnectEvent"
// StorageTriggerEventType 스토리지 Trigger Grid 이벤트
StorageTriggerEventType EventType = "StorageTriggerEvent"
// TransactionEventType 트랜잭션 이벤트
TransactionEventType EventType = "TransactionEvent"
// UpdateExperienceEventType 경험치 업데이트 이벤트
UpdateExperienceEventType EventType = "UpdateExperienceEvent"
// UpdatePointEventType 포인트 업데이트 이벤트
UpdatePointEventType EventType = "UpdatePointEvent"
// GuestbookEventType 방문록 이벤트
GuestbookEventType EventType = "GuestbookEvent"
// QuestEventType 퀘스트 이벤트
QuestEventType EventType = "QuestEvent"
// FriendshipEventType 친구 요청 이벤트
FriendshipEventType EventType = "FriendshipEvent"
// ProductOrderEventType 상품 주문 이벤트 - 선착장/상점/음원 마켓
ProductOrderEventType EventType = "ProductOrderEvent"
// UserSessionEventType 유저 접속 세션 이벤트
UserSessionEventType EventType = "UserSessionEvent"
// WebtoonVideoWatchedEventType 웹툰 비디오 완료
WebtoonVideoWatchedEventType EventType = "WebtoonVideoWatchedEvent"
// WebtoonStoryCreatedEventType 웹툰 스토리 생성 완료
WebtoonStoryCreatedEventType EventType = "WebtoonStoryCreatedEvent"
// WebtoonStoryLikeEventType 웹툰 스토리 좋아요
WebtoonStoryLikeEventType EventType = "WebtoonStoryLikeEvent"
// UserMainBadgeEventType 유저 메인 배지 이벤트
UserMainBadgeEventType EventType = "UserMainBadgeEvent"
// UserActivityPointExperienceEventType 유저 행동 포인트/경험치 이벤트
UserActivityPointExperienceEventType EventType = "UserActivityPointExperienceEvent"
// NotificationEventType 알림 이벤트
NotificationEventType EventType = "NotificationEvent"
)EventNotificationMessage - Notification 이벤트 메세지
type EventNotificationMessage {
"""
유저 No
"""
userNo: Int!
"""
알림 제목
"""
title: String!
"""
알림 설명
"""
description: String!
"""
이벤트 발송 타임
"""
eventTime: String!
"""
이벤트 이름
"""
eventName: String!
"""
에러 내용
"""
error: String!
}EventGuestbookMessage - 방명록 이벤트 메세지
type EventGuestbookMessage {
"""
소유자 유저 고유
"""
ownerUserNo: Int!
"""
작성자 유저 고유
"""
writtenUserNo: Int!
"""
방명록 고유 ID
"""
guestbookID: String!
"""
이벤트 발송 타임
"""
eventTime: String!
"""
이벤트 이름
"""
eventName: String!
"""
에러 내용
"""
error: String!
}친구요청 상태에 대한 ENUM 타입 정의
enum EventFriendshipStatusType {
"""
요청
"""
PENDING
"""
요청 취소
"""
CANCELLED
"""
받은 사람 거절
"""
REJECTED
"""
받은 사람 수락
"""
ACCEPTED
"""
양쪽다 친구 끊기
"""
REMOVED
}EventPointTriggerMessage - 포인트 업데이트 이벤트 메세지
"""
SSE 이벤트 - 포인트 trigger 메세지
"""
type EventPointTriggerMessage {
"""
유저 No
"""
userNo: Int!
"""
현재 포인트
"""
currentPoint: Int!
"""
이벤트 발송 타임
"""
eventTime: String!
"""
이벤트 이름
"""
eventName: String!
"""
에러 내용
"""
error: String!
}EventFriendshipMessage - 친구요청에 대한 메세지 정의
type EventFriendshipMessage {
"""
발송 유저 고유
"""
senderUserNo: Int!
"""
받는 유저 고유
"""
receiverUserNo: Int!
"""
상태
"""
status: EventFriendshipStatusType!
"""
이벤트 발송 타임
"""
eventTime: String!
"""
이벤트 이름
"""
eventName: String!
"""
에러 내용
"""
error: String!
}