first commit
This commit is contained in:
13
models/websocket.go
Normal file
13
models/websocket.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package models
|
||||
|
||||
// WSMessage WebSocket 메시지 공통 구조
|
||||
type WSMessage struct {
|
||||
Type string `json:"type"` // "subscribe" | "unsubscribe" | "price" | "error"
|
||||
Code string `json:"code"` // 종목코드
|
||||
Data interface{} `json:"data"` // StockPrice 또는 에러 메시지
|
||||
}
|
||||
|
||||
// WSError WebSocket 에러 메시지 데이터
|
||||
type WSError struct {
|
||||
Message string `json:"message"`
|
||||
}
|
||||
Reference in New Issue
Block a user