mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
WS added session events.
This commit is contained in:
@ -13,9 +13,13 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
MEMBER_CONNECTED = "member/connected"
|
||||
MEMBER_UPDATED = "member/updated" // TODO: New.
|
||||
MEMBER_DISCONNECTED = "member/disconnected"
|
||||
MEMBER_CREATED = "member/created"
|
||||
MEMBER_DELETED = "member/deleted"
|
||||
MEMBER_CONNECTED = "member/connected"
|
||||
MEMBER_DISCONNECTED = "member/disconnected"
|
||||
MEMBER_RECEIVING_STARTED = "member/receiving/started"
|
||||
MEMBER_RECEIVING_STOPPED = "member/receiving/stopped"
|
||||
MEMBER_PROFILE_UPDATED = "member/profile/updated"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -54,11 +54,23 @@ type MemberID struct {
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
type MemberProfile struct {
|
||||
Event string `json:"event,omitempty"`
|
||||
Name string `json:"name"`
|
||||
IsAdmin bool `json:"is_admin"`
|
||||
CanLogin bool `json:"can_login"`
|
||||
CanConnect bool `json:"can_connect"`
|
||||
CanWatch bool `json:"can_watch"`
|
||||
CanHost bool `json:"can_host"`
|
||||
CanAccessClipboard bool `json:"can_access_clipboard"`
|
||||
}
|
||||
|
||||
type MemberData struct {
|
||||
Event string `json:"event,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
IsAdmin bool `json:"is_admin"`
|
||||
Event string `json:"event,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Profile MemberProfile `json:"profile"`
|
||||
IsConnected bool `json:"is_connected"`
|
||||
IsReceiving bool `json:"is_receiving"`
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
|
Reference in New Issue
Block a user