Documentation
¶
Index ¶
- type ChangesetReq
- type ChatBroadCastMessage
- type ChatMessage
- type ChatMessageData
- type ChatMessageSendData
- type ChatMessageSendEvent
- type ClientMessage
- type ClientMessageData
- type ClientMessageDataData
- type ClientMessagePayload
- type ClientReady
- type ClientReadyData
- type ClientReadyUserInfo
- type GetChatMessages
- type GetChatMessagesResponse
- type Session
- type SessionAuth
- type UserChange
- type UserChangeData
- type UserChangeDataData
- type UserChangeDataDataApool
- type UserLeaveData
- type UserNewInfo
- type UserNewInfoDat
- type UserNewInfoData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangesetReq ¶ added in v0.0.2
type ChangesetReq struct {
Event string `json:"event"`
Data struct {
Component string `json:"component"`
Type string `json:"type"`
PadId string `json:"padId"`
Token string `json:"token"`
Data struct {
Start int `json:"start"`
Granularity int `json:"granularity"`
RequestID int `json:"requestID"`
} `json:"data"`
} `json:"data"`
}
type ChatBroadCastMessage ¶ added in v0.0.2
type ChatBroadCastMessage struct {
Type string `json:"type"`
Data struct {
Type string `json:"type"`
Message ChatMessageSendEvent `json:"message"`
} `json:"data"`
}
type ChatMessage ¶ added in v0.0.2
type ChatMessage struct {
Event string `json:"event"`
Data struct {
Type string `json:"type"`
Component string `json:"component"`
Data struct {
Type string `json:"type"`
Message ChatMessageData `json:"message"`
}
}
}
type ChatMessageData ¶ added in v0.0.2
type ChatMessageData struct {
Text string `json:"text"`
Time *int64 `json:"time,omitempty"`
UserId *string `json:"userId,omitempty"`
AuthorId *string `json:"authorId,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
UserName *string `json:"userName,omitempty"`
}
func FromObject ¶ added in v0.0.2
func FromObject(original ChatMessageData) ChatMessageData
type ChatMessageSendData ¶ added in v0.0.2
type ChatMessageSendEvent ¶ added in v0.0.2
type ClientMessage ¶ added in v0.6.3
type ClientMessage struct {
Event string `json:"event"`
Data ClientMessageData `json:"data"`
}
ClientMessage is the COLLABROOM CLIENT_MESSAGE family from the original protocol. The payload type selects the sub-message: "suggestUserName" relays a name suggestion to an unnamed user, "padoptions" distributes pad-wide settings.
type ClientMessageData ¶ added in v0.6.3
type ClientMessageData struct {
Component string `json:"component"`
Type string `json:"type"`
Data ClientMessageDataData `json:"data"`
}
type ClientMessageDataData ¶ added in v0.6.3
type ClientMessageDataData struct {
Type string `json:"type"`
Payload ClientMessagePayload `json:"payload"`
}
type ClientMessagePayload ¶ added in v0.6.3
type ClientReady ¶
type ClientReady struct {
Event string `json:"event"`
Data ClientReadyData `json:"data"`
}
type ClientReadyData ¶ added in v0.0.4
type ClientReadyData struct {
Component string `json:"component"`
Type string `json:"type"`
PadID string `json:"padId"`
Token string `json:"token"`
// SessionID is the deprecated legacy field for the integrator-set
// sessionID cookie value, kept for backward compatibility with old
// clients. Current clients no longer forward it; the server now reads
// the cookie directly from the socket.io handshake so the cookie can
// be marked HttpOnly. Upstream #7045 / #7755.
SessionID string `json:"sessionID,omitempty"`
UserInfo ClientReadyUserInfo `json:"userInfo"`
Reconnect *bool `json:"reconnect"`
ClientRev *int `json:"client_rev"`
}
type ClientReadyUserInfo ¶ added in v0.0.4
type GetChatMessages ¶ added in v0.0.2
type GetChatMessagesResponse ¶ added in v0.0.2
type GetChatMessagesResponse struct {
Type string `json:"type"`
Data struct {
Type string `json:"type"`
Messages []ChatMessageSendData `json:"messages"`
} `json:"data"`
}
type SessionAuth ¶
type SessionAuth struct {
PadId string
Token string
SessionId string
// IntegratorSessionID is the integrator-set sessionID cookie value
// (from createSession() HTTP API), read from the socket.io handshake
// Cookie header so the cookie can be HttpOnly. Falls back to the
// deprecated CLIENT_READY in-message `sessionID` field for legacy
// clients. Upstream #7045 / #7755.
IntegratorSessionID string
}
type UserChange ¶
type UserChange struct {
Event string `json:"event"`
Data UserChangeData `json:"data"`
}
type UserChangeData ¶ added in v0.0.4
type UserChangeData struct {
Component string `json:"component"`
Data UserChangeDataData `json:"data"`
Type string `json:"type"`
}
type UserChangeDataData ¶ added in v0.0.4
type UserChangeDataData struct {
Type string `json:"type"`
Apool UserChangeDataDataApool `json:"apool"`
BaseRev int `json:"baseRev"`
Changeset string `json:"changeset"`
}
type UserChangeDataDataApool ¶ added in v0.0.4
type UserLeaveData ¶ added in v0.0.2
type UserNewInfo ¶
type UserNewInfo struct {
Type string `json:"type"`
Data UserNewInfoData `json:"data"`
}
type UserNewInfoDat ¶
type UserNewInfoData ¶
type UserNewInfoData struct {
Type string `json:"type"`
UserInfo UserNewInfoDat `json:"userInfo"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.