Documentation ¶
Index ¶
- Constants
- type AcceptFriendsNotif
- type AcceptFriendsRequest
- type AcceptFriendsResponse
- type BaseRequest
- type BaseResponse
- type BlockPlayerRequest
- type BlockPlayerResponse
- type CancelFriendsNotif
- type CancelFriendsRequest
- type CancelFriendsResponse
- type CancelMatchmakingRequest
- type CancelMatchmakingResponse
- type ChannelChatNotif
- type Chat
- type ChatMessage
- type ClaimDSRequest
- type ClaimSessionRequest
- type Connected
- type CreateDSRequest
- type CreateRequest
- type CreateResponse
- type CreateSessionRequest
- type DSNotification
- type DeletePartyCodeRequest
- type DeletePartyCodeResponse
- type Disconnected
- type Error
- type ErrorMessage
- type ExitAllChannel
- type FriendsPresenceNotif
- type GeneratePartyCodeRequest
- type GeneratePartyCodeResponse
- type GetAllSessionAttributeRequest
- type GetAllSessionAttributeResponse
- type GetFriendshipStatusRequest
- type GetFriendshipStatusResponse
- type GetOfflineNotificationRequest
- type GetOfflineNotificationResponse
- type GetPartyCodeRequest
- type GetPartyCodeResponse
- type GetSessionAttributeRequest
- type GetSessionAttributeResponse
- type Heartbeat
- type InfoRequest
- type InfoResponse
- type Invitation
- type InviteNotice
- type InviteRequest
- type InviteResponse
- type JoinDefaultChannelRequest
- type JoinDefaultChannelResponse
- type JoinNotice
- type JoinRequest
- type JoinResponse
- type JoinViaPartyCodeRequest
- type JoinViaPartyCodeResponse
- type KickNotice
- type KickRequest
- type KickResponse
- type LeaveNotice
- type LeaveRequest
- type LeaveResponse
- type ListFriendsPresenceRequest
- type ListFriendsPresenceResponse
- type ListIncomingFriendsRequest
- type ListIncomingFriendsResponse
- type ListOfFriendsRequest
- type ListOfFriendsResponse
- type ListOutgoingFriendsRequest
- type ListOutgoingFriendsResponse
- type MatchMakingCancelRequest
- type MatchMakingRequest
- type MatchingAlly
- type MatchingParty
- type MatchingPartyV1
- type MatchmakingNotification
- type MatchmakingResult
- type MatchmakingTicket
- type Member
- type Message
- type NotificationMessage
- type NotifyDSRequest
- type PartyChatNotif
- type PartyChatRequest
- type PartyChatResponse
- type PartyDataUpdateNotification
- type PartyMember
- type PartyMemberV1
- type PartyNotif
- type PersonalChatHistoryRequest
- type PersonalChatHistoryResponse
- type PersonalChatNotif
- type PersonalChatRequest
- type PersonalChatResponse
- type PlayerBlockedNotification
- type PlayerUnblockedNotification
- type PromoteLeaderRequest
- type PromoteLeaderResponse
- type ReadyConsent
- type RejectFriendsNotif
- type RejectFriendsRequest
- type RejectFriendsResponse
- type RejectNotice
- type RejectRequest
- type RejectResponse
- type RematchmakingNotif
- type RequestFriendsNotif
- type RequestFriendsRequest
- type RequestFriendsResponse
- type RequestMatchMember
- type RequestMatchParty
- type RequestMatchingAlly
- type ResetUserStatusRequest
- type SendChannelChatRequest
- type SendChannelChatResponse
- type SendPartyNotifRequest
- type SendPartyNotifResponse
- type Server
- type Session
- type SessionResponse
- type SetReadyConsentNotif
- type SetReadyConsentRequest
- type SetReadyConsentResponse
- type SetSessionAttributeRequest
- type SetSessionAttributeResponse
- type SetUserStatusRequest
- type SetUserStatusResponse
- type Shutdown
- type SignalingP2P
- type StartMatchmakingRequest
- type StartMatchmakingResponse
- type SystemComponentsStatus
- type TypeInfoRequestRequest
- type TypeInfoRequestResponse
- type UnblockPlayerRequest
- type UnblockPlayerResponse
- type UnfriendNotif
- type UnfriendRequest
- type UnfriendResponse
- type UserBannedNotification
- type UserMetricRequest
- type UserMetricResponse
- type UserUnbannedNotification
- type WaitForDSRequest
Constants ¶
const ( ServerStatusCreating = "CREATING" ServerStatusReady = "READY" ServerStatusBusy = "BUSY" )
Server status constants
const ( TypeUnknown = "unknown" // Server messages TypeConnected = "connectNotif" TypeDisconnected = "disconnectNotif" TypeError = "errorNotif" TypeShutdown = "shutdownNotif" // SuccessCode SuccessCode = 0 // Matchmaking status MMStatusStart = "start" MMStatusDone = "done" MMStatusCancel = "cancel" MMStatusTimeout = "timeout" MMStatusBanned = "banned" // System Components SystemComponentChat = "chat" )
Message types enum
const ( // Party TypeInfoRequest = "partyInfoRequest" TypeInfoResponse = "partyInfoResponse" TypeCreateRequest = "partyCreateRequest" TypeCreateResponse = "partyCreateResponse" TypeLeaveRequest = "partyLeaveRequest" TypeLeaveResponse = "partyLeaveResponse" TypeLeaveNotif = "partyLeaveNotif" TypeInviteRequest = "partyInviteRequest" TypeInviteResponse = "partyInviteResponse" TypeInviteNotif = "partyInviteNotif" TypeGetInvitatedNotif = "partyGetInvitedNotif" TypeJoinRequest = "partyJoinRequest" TypeJoinResponse = "partyJoinResponse" TypeJoinNotif = "partyJoinNotif" TypeRejectRequest = "partyRejectRequest" TypeRejectResponse = "partyRejectResponse" TypeRejectNotif = "partyRejectNotif" TypeKickRequest = "partyKickRequest" TypeKickResponse = "partyKickResponse" TypeKickNotice = "partyKickNotif" TypePromoteLeaderRequest = "partyPromoteLeaderRequest" TypePromoteLeaderResponse = "partyPromoteLeaderResponse" TypeGeneratePartyCodeRequest = "partyGenerateCodeRequest" TypeGeneratePartyCodeResponse = "partyGenerateCodeResponse" TypeGetPartyCodeRequest = "partyGetCodeRequest" TypeGetPartyCodeResponse = "partyGetCodeResponse" TypeDeletePartyCodeRequest = "partyDeleteCodeRequest" TypeDeletePartyCodeResponse = "partyDeleteCodeResponse" TypeJoinViaPartyCodeRequest = "partyJoinViaCodeRequest" TypeJoinViaPartyCodeResponse = "partyJoinViaCodeResponse" TypeSendPartyNotifRequest = "partySendNotifRequest" TypeSendPartyNotifResponse = "partySendNotifResponse" TypePartyNotif = "partyNotif" // Presence TypeFriendsPresenceRequest = "friendsStatusRequest" TypeFriendsPresenceResponse = "friendsStatusResponse" // Notification TypeGetOfflineNotificationRequest = "offlineNotificationRequest" TypeGetOfflineNotificationResponse = "offlineNotificationResponse" TypeNotificationMessage = "messageNotif" TypeUserUnbannedNotification = "userUnbannedNotification" // DSM TypeCreateDSRequest = "createDSRequest" TypeCreateDSResponse = "createDSResponse" TypeWaitForDSRequest = "waitForDSRequest" TypeClaimDSRequest = "claimDSRequest" TypeNotifyDSRequest = "notifyDSRequest" TypeDSNotif = "dsNotif" TypeAcceptFriendsNotif = "acceptFriendsNotif" TypeAcceptFriendsRequest = "acceptFriendsRequest" TypeAcceptFriendsResponse = "acceptFriendsResponse" TypeBlockPlayerNotif = "blockPlayerNotif" TypeBlockPlayerRequest = "blockPlayerRequest" TypeBlockPlayerResponse = "blockPlayerResponse" TypeCancelFriendsNotif = "cancelFriendsNotif" TypeCancelFriendsRequest = "cancelFriendsRequest" TypeCancelFriendsResponse = "cancelFriendsResponse" TypeCancelMatchmakingRequest = "cancelMatchmakingRequest" TypeCancelMatchmakingResponse = "cancelMatchmakingResponse" TypeChannelChatNotif = "channelChatNotif" TypeClientResetRequest = "clientResetRequest" TypeConnectNotif = "connectNotif" TypeDisconnectNotif = "disconnectNotif" TypeDsNotif = "dsNotif" TypeErrorNotif = "errorNotif" TypeExitAllChannel = "exitAllChannel" TypeFriendsStatusRequest = "friendsStatusRequest" TypeFriendsStatusResponse = "friendsStatusResponse" TypeGetAllSessionAttributeRequest = "getAllSessionAttributeRequest" TypeGetAllSessionAttributeResponse = "getAllSessionAttributeResponse" TypeGetFriendshipStatusRequest = "getFriendshipStatusRequest" TypeGetFriendshipStatusResponse = "getFriendshipStatusResponse" TypeGetSessionAttributeRequest = "getSessionAttributeRequest" TypeGetSessionAttributeResponse = "getSessionAttributeResponse" TypeHeartbeat = "heartbeat" TypeJoinDefaultChannelRequest = "joinDefaultChannelRequest" TypeJoinDefaultChannelResponse = "joinDefaultChannelResponse" TypeListIncomingFriendsRequest = "listIncomingFriendsRequest" TypeListIncomingFriendsResponse = "listIncomingFriendsResponse" TypeListOfFriendsRequest = "listOfFriendsRequest" TypeListOfFriendsResponse = "listOfFriendsResponse" TypeListOnlineFriendsRequest = "listOnlineFriendsRequest" TypeListOutgoingFriendsRequest = "listOutgoingFriendsRequest" TypeListOutgoingFriendsResponse = "listOutgoingFriendsResponse" TypeMatchmakingNotif = "matchmakingNotif" TypeMessageNotif = "messageNotif" TypeOfflineNotificationRequest = "offlineNotificationRequest" TypeOfflineNotificationResponse = "offlineNotificationResponse" TypeOnlineFriends = "onlineFriends" TypePartyChatNotif = "partyChatNotif" TypePartyChatRequest = "partyChatRequest" TypePartyChatResponse = "partyChatResponse" TypePartyCreateRequest = "partyCreateRequest" TypePartyCreateResponse = "partyCreateResponse" TypePartyDataUpdateNotif = "partyDataUpdateNotif" TypePartyGetInvitedNotif = "partyGetInvitedNotif" TypePartyInfoRequest = "partyInfoRequest" TypePartyInfoResponse = "partyInfoResponse" TypePartyInviteNotif = "partyInviteNotif" TypePartyInviteRequest = "partyInviteRequest" TypePartyInviteResponse = "partyInviteResponse" TypePartyJoinNotif = "partyJoinNotif" TypePartyJoinRequest = "partyJoinRequest" TypePartyJoinResponse = "partyJoinResponse" TypePartyKickNotif = "partyKickNotif" TypePartyKickRequest = "partyKickRequest" TypePartyKickResponse = "partyKickResponse" TypePartyLeaveNotif = "partyLeaveNotif" TypePartyLeaveRequest = "partyLeaveRequest" TypePartyLeaveResponse = "partyLeaveResponse" TypePartyPromoteLeaderRequest = "partyPromoteLeaderRequest" TypePartyPromoteLeaderResponse = "partyPromoteLeaderResponse" TypePartyRejectNotif = "partyRejectNotif" TypePartyRejectRequest = "partyRejectRequest" TypePartyRejectResponse = "partyRejectResponse" TypePersonalChatHistoryRequest = "personalChatHistoryRequest" TypePersonalChatHistoryResponse = "personalChatHistoryResponse" TypePersonalChatNotif = "personalChatNotif" TypePersonalChatRequest = "personalChatRequest" TypePersonalChatResponse = "personalChatResponse" TypeRejectFriendsNotif = "rejectFriendsNotif" TypeRejectFriendsRequest = "rejectFriendsRequest" TypeRejectFriendsResponse = "rejectFriendsResponse" TypeRematchmakingNotif = "rematchmakingNotif" TypeRequestFriendsNotif = "requestFriendsNotif" TypeRequestFriendsRequest = "requestFriendsRequest" TypeRequestFriendsResponse = "requestFriendsResponse" TypeSendChannelChatRequest = "sendChannelChatRequest" TypeSendChannelChatResponse = "sendChannelChatResponse" TypeSetReadyConsentNotif = "setReadyConsentNotif" TypeSetReadyConsentRequest = "setReadyConsentRequest" TypeSetReadyConsentResponse = "setReadyConsentResponse" TypeSetSessionAttributeRequest = "setSessionAttributeRequest" TypeSetSessionAttributeResponse = "setSessionAttributeResponse" TypeSetUserStatusRequest = "setUserStatusRequest" TypeSetUserStatusResponse = "setUserStatusResponse" TypeShutdownNotif = "shutdownNotif" TypeSignalingP2PNotif = "signalingP2PNotif" TypeStartMatchmakingRequest = "startMatchmakingRequest" TypeStartMatchmakingResponse = "startMatchmakingResponse" TypeSystemComponentsStatus = "systemComponentsStatus" TypeUnblockPlayerNotif = "unblockPlayerNotif" TypeUnblockPlayerRequest = "unblockPlayerRequest" TypeUnblockPlayerResponse = "unblockPlayerResponse" TypeUnfriendNotif = "unfriendNotif" TypeUnfriendRequest = "unfriendRequest" TypeUnfriendResponse = "unfriendResponse" TypeUserBannedNotification = "userBannedNotification" TypeUserMetricRequest = "userMetricRequest" TypeUserMetricResponse = "userMetricResponse" TypeUserStatusNotif = "userStatusNotif" )
Lobby messaging protocol type
const SystemDisplayName = "system"
SystemDisplayName is the sender display name for user notification
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptFriendsNotif ¶
type AcceptFriendsNotif struct {
FriendID string `json:"friendId"`
}
AcceptFriendsNotif is notification message when someone accept friends request
func (AcceptFriendsNotif) Type ¶
func (AcceptFriendsNotif) Type() string
Type implements Message interface
type AcceptFriendsRequest ¶
type AcceptFriendsRequest struct { *BaseRequest FriendID string `json:"friendId"` }
AcceptFriendsRequest message command to accept friends request (Request)
func (AcceptFriendsRequest) Type ¶
func (AcceptFriendsRequest) Type() string
Type implements Message interface
type AcceptFriendsResponse ¶
type AcceptFriendsResponse struct {
*BaseResponse
}
AcceptFriendsResponse message command to accept friends request (Response)
func (AcceptFriendsResponse) Type ¶
func (AcceptFriendsResponse) Type() string
Type implements Message interface
type BaseRequest ¶
BaseRequest will be expanded by other message types and contains user's ID
type BaseResponse ¶
BaseResponse will be expanded by other response types and contains HTTP response code
type BlockPlayerRequest ¶
type BlockPlayerRequest struct { *BaseRequest Namespace string BlockedUserID string }
BlockPlayerRequest is the message of BlockPlayerRequest
func (BlockPlayerRequest) Type ¶
func (BlockPlayerRequest) Type() string
Type implements Message interface
type BlockPlayerResponse ¶
type BlockPlayerResponse struct { *BaseResponse Namespace string BlockedUserID string }
BlockPlayerResponse is the message of BlockPlayerResponse
func (BlockPlayerResponse) Type ¶
func (BlockPlayerResponse) Type() string
Type implements Message interface
type CancelFriendsNotif ¶ added in v0.7.0
type CancelFriendsNotif struct { // UserID ID of the user who cancel the friend-request UserID string `json:"userId"` }
CancelFriendsNotif message command to tell user who send friend request that the friend cancel the request
func (CancelFriendsNotif) Type ¶ added in v0.7.0
func (CancelFriendsNotif) Type() string
Type implements Message interface
type CancelFriendsRequest ¶
type CancelFriendsRequest struct { *BaseRequest FriendID string `json:"friendId"` }
CancelFriendsRequest message command to cancel friends request (Request)
func (CancelFriendsRequest) Type ¶
func (CancelFriendsRequest) Type() string
Type implements Message interface
type CancelFriendsResponse ¶
type CancelFriendsResponse struct {
*BaseResponse
}
CancelFriendsResponse message command to cancel friends request (Response)
func (CancelFriendsResponse) Type ¶
func (CancelFriendsResponse) Type() string
Type implements Message interface
type CancelMatchmakingRequest ¶
type CancelMatchmakingRequest struct { *BaseRequest GameMode string IsTempParty bool }
CancelMatchmakingRequest message message to request matchmaking cancel
func (CancelMatchmakingRequest) Type ¶
func (CancelMatchmakingRequest) Type() string
Type implements Message interface
type CancelMatchmakingResponse ¶
type CancelMatchmakingResponse struct {
*BaseResponse
}
CancelMatchmakingResponse message message to reply start matchmaking request
func (CancelMatchmakingResponse) Type ¶
func (CancelMatchmakingResponse) Type() string
Type implements Message interface
type ChannelChatNotif ¶
ChannelChatNotif is the response models for sending default chat channel response
func (ChannelChatNotif) Type ¶
func (ChannelChatNotif) Type() string
Type implements Message interface
type ChatMessage ¶
ChatMessage contains user's chat
type ClaimDSRequest ¶
type ClaimDSRequest struct { Session *Session Request *CreateSessionRequest }
ClaimDSRequest message command to claim a DS (Request)
func (*ClaimDSRequest) String ¶
func (req *ClaimDSRequest) String() string
type ClaimSessionRequest ¶
type ClaimSessionRequest struct { SessionID string `json:"session_id"` Namespace string `json:"-"` }
ClaimSessionRequest contains request to claim a dedicated server
type Connected ¶
type Connected struct { *BaseResponse LobbySessionID string }
Connected contains result of making connection
type CreateDSRequest ¶
type CreateDSRequest struct { *BaseRequest MMResult *MatchmakingResult }
CreateDSRequest message command to create a DS (Request)
func (*CreateDSRequest) String ¶
func (req *CreateDSRequest) String() string
func (CreateDSRequest) Type ¶
func (CreateDSRequest) Type() string
Type implements Message interface
type CreateRequest ¶
type CreateRequest struct {
*BaseRequest
}
CreateRequest contains user's create request
type CreateResponse ¶
type CreateResponse struct { *BaseResponse PartyID string LeaderID string Members string Invitees string InvitationToken string PartyCode string }
CreateResponse contains result of creating party
type CreateSessionRequest ¶
type CreateSessionRequest struct { SessionID string `json:"session_id"` Namespace string `json:"namespace"` GameMode string `json:"game_mode"` PodName string `json:"pod_name"` ClientVersion string `json:"client_version"` Region string `json:"region"` Configuration string `json:"configuration"` MatchingAllies []RequestMatchingAlly `json:"matching_allies"` Deployment string `json:"deployment"` }
CreateSessionRequest contains request to spawn a new dedicated server
func (*CreateSessionRequest) String ¶
func (req *CreateSessionRequest) String() string
func (*CreateSessionRequest) Validate ¶
func (req *CreateSessionRequest) Validate() error
Validate returns error if any field is missing
type DSNotification ¶
DSNotification is the message of DS status notification
type DeletePartyCodeRequest ¶ added in v0.7.0
type DeletePartyCodeRequest struct {
*BaseRequest
}
func (DeletePartyCodeRequest) Type ¶ added in v0.7.0
func (DeletePartyCodeRequest) Type() string
type DeletePartyCodeResponse ¶ added in v0.7.0
type DeletePartyCodeResponse struct {
*BaseResponse
}
func (DeletePartyCodeResponse) Type ¶ added in v0.7.0
func (DeletePartyCodeResponse) Type() string
type Disconnected ¶
type Disconnected struct { *BaseRequest Namespace string ConnectionID string }
Disconnected contains info of disconnected user
type ErrorMessage ¶
type ErrorMessage struct { *BaseResponse Message string }
ErrorMessage contains info of error
type ExitAllChannel ¶
ExitAllChannel is the request models for join exit all chat channel request
type FriendsPresenceNotif ¶
type FriendsPresenceNotif struct { UserID string Availability int Activity string LastSeenAt string }
FriendsPresenceNotif message command to notify friends
func (FriendsPresenceNotif) Type ¶
func (FriendsPresenceNotif) Type() string
Type implements Message interface
type GeneratePartyCodeRequest ¶ added in v0.7.0
type GeneratePartyCodeRequest struct {
*BaseRequest
}
func (GeneratePartyCodeRequest) Type ¶ added in v0.7.0
func (GeneratePartyCodeRequest) Type() string
type GeneratePartyCodeResponse ¶ added in v0.7.0
type GeneratePartyCodeResponse struct { *BaseResponse PartyCode string }
func (GeneratePartyCodeResponse) Type ¶ added in v0.7.0
func (GeneratePartyCodeResponse) Type() string
type GetAllSessionAttributeRequest ¶ added in v0.7.0
type GetAllSessionAttributeRequest struct {
*BaseRequest
}
func (GetAllSessionAttributeRequest) Type ¶ added in v0.7.0
func (GetAllSessionAttributeRequest) Type() string
type GetAllSessionAttributeResponse ¶ added in v0.7.0
type GetAllSessionAttributeResponse struct { *BaseResponse Attributes map[string]string }
func (GetAllSessionAttributeResponse) Type ¶ added in v0.7.0
func (GetAllSessionAttributeResponse) Type() string
type GetFriendshipStatusRequest ¶
type GetFriendshipStatusRequest struct { *BaseRequest FriendID string `json:"friendId"` }
GetFriendshipStatusRequest message command to get friendship status (Request)
func (GetFriendshipStatusRequest) Type ¶
func (GetFriendshipStatusRequest) Type() string
Type implements Message interface
type GetFriendshipStatusResponse ¶
type GetFriendshipStatusResponse struct { *BaseResponse FriendshipStatus string `json:"friendshipStatus"` }
GetFriendshipStatusResponse message command to get friendship status (Response)
func (GetFriendshipStatusResponse) Type ¶
func (GetFriendshipStatusResponse) Type() string
Type implements Message interface
type GetOfflineNotificationRequest ¶
type GetOfflineNotificationRequest struct {
*BaseRequest
}
GetOfflineNotificationRequest message comment
func (GetOfflineNotificationRequest) Type ¶
func (GetOfflineNotificationRequest) Type() string
Type implements Message interface
type GetOfflineNotificationResponse ¶
type GetOfflineNotificationResponse struct {
*BaseResponse
}
GetOfflineNotificationResponse message comment
func (GetOfflineNotificationResponse) Type ¶
func (GetOfflineNotificationResponse) Type() string
Type implements Message interface
type GetPartyCodeRequest ¶ added in v0.7.0
type GetPartyCodeRequest struct {
*BaseRequest
}
func (GetPartyCodeRequest) Type ¶ added in v0.7.0
func (GetPartyCodeRequest) Type() string
type GetPartyCodeResponse ¶ added in v0.7.0
type GetPartyCodeResponse struct { *BaseResponse PartyCode string }
func (GetPartyCodeResponse) Type ¶ added in v0.7.0
func (GetPartyCodeResponse) Type() string
type GetSessionAttributeRequest ¶ added in v0.7.0
type GetSessionAttributeRequest struct { *BaseRequest Key string }
func (GetSessionAttributeRequest) Type ¶ added in v0.7.0
func (GetSessionAttributeRequest) Type() string
type GetSessionAttributeResponse ¶ added in v0.7.0
type GetSessionAttributeResponse struct { *BaseResponse Value string }
func (GetSessionAttributeResponse) Type ¶ added in v0.7.0
func (GetSessionAttributeResponse) Type() string
type InfoRequest ¶
type InfoRequest struct {
*BaseRequest
}
InfoRequest contains user's info request
type InfoResponse ¶
type InfoResponse struct { *BaseResponse PartyID string LeaderID string Members string Invitees string InvitationToken string CustomAttributes map[string]interface{} UpdatedAt int64 }
InfoResponse contains info of user's lobby state
type Invitation ¶
Invitation contains user's invitation to other user
type InviteNotice ¶
InviteNotice contains party's invite notice
type InviteRequest ¶
type InviteRequest struct { *BaseRequest FriendID string }
InviteRequest contains user's invite request
type InviteResponse ¶
type InviteResponse struct {
*BaseResponse
}
InviteResponse contains result of inviting friend to party
type JoinDefaultChannelRequest ¶
type JoinDefaultChannelRequest struct {
*BaseRequest
}
JoinDefaultChannelRequest is the request models for join default chat channel
func (JoinDefaultChannelRequest) Type ¶
func (JoinDefaultChannelRequest) Type() string
Type implements Message interface
type JoinDefaultChannelResponse ¶
type JoinDefaultChannelResponse struct { *BaseResponse ChannelSlug string `json:"channelSlug"` }
JoinDefaultChannelResponse is the response models for join default chat channel response
func (JoinDefaultChannelResponse) Type ¶
func (JoinDefaultChannelResponse) Type() string
Type implements Message interface
type JoinRequest ¶
type JoinRequest struct { *BaseRequest PartyID string InvitationToken string }
JoinRequest contains user's join request
type JoinResponse ¶
type JoinResponse struct { *BaseResponse PartyID string LeaderID string Members string Invitees string InvitationToken string }
JoinResponse contains result of user's join request
type JoinViaPartyCodeRequest ¶ added in v0.7.0
type JoinViaPartyCodeRequest struct { *BaseRequest PartyCode string }
func (JoinViaPartyCodeRequest) Type ¶ added in v0.7.0
func (JoinViaPartyCodeRequest) Type() string
type JoinViaPartyCodeResponse ¶ added in v0.7.0
type JoinViaPartyCodeResponse struct { *BaseResponse PartyID string LeaderID string Members string Invitees string InvitationToken string }
func (JoinViaPartyCodeResponse) Type ¶ added in v0.7.0
func (JoinViaPartyCodeResponse) Type() string
type KickNotice ¶
KickNotice contains party's kicked notice
type KickRequest ¶
type KickRequest struct { *BaseRequest MemberID string }
KickRequest contains user's kick request
type KickResponse ¶
type KickResponse struct {
*BaseResponse
}
KickResponse contains result of kicking member from party
type LeaveNotice ¶
LeaveNotice contains party's leave notice
type LeaveRequest ¶
type LeaveRequest struct { *BaseRequest // Internal use, to force player leave party on disconnected IgnoreUserRegistry bool }
LeaveRequest contains user's create request
type LeaveResponse ¶
type LeaveResponse struct {
*BaseResponse
}
LeaveResponse contains result of creating party
type ListFriendsPresenceRequest ¶
type ListFriendsPresenceRequest struct {
*BaseRequest
}
ListFriendsPresenceRequest message command to list user's friends (Request)
func (ListFriendsPresenceRequest) Type ¶
func (ListFriendsPresenceRequest) Type() string
Type implements Message interface
type ListFriendsPresenceResponse ¶
type ListFriendsPresenceResponse struct { *BaseResponse UserID []string Availability []int Activity []string LastSeenAt []string }
ListFriendsPresenceResponse message command to list user's friends (Response)
func (ListFriendsPresenceResponse) Type ¶
func (ListFriendsPresenceResponse) Type() string
Type implements Message interface
type ListIncomingFriendsRequest ¶
type ListIncomingFriendsRequest struct {
*BaseRequest
}
ListIncomingFriendsRequest message command to get list of incoming friends (Request)
func (ListIncomingFriendsRequest) Type ¶
func (ListIncomingFriendsRequest) Type() string
Type implements Message interface
type ListIncomingFriendsResponse ¶
type ListIncomingFriendsResponse struct { *BaseResponse UserIDs []string }
ListIncomingFriendsResponse message command to get list of Incoming friends (Response)
func (ListIncomingFriendsResponse) Type ¶
func (ListIncomingFriendsResponse) Type() string
Type implements Message interface
type ListOfFriendsRequest ¶
type ListOfFriendsRequest struct { *BaseRequest FriendID string `json:"friendId"` }
ListOfFriendsRequest message command to get list of friends (Request)
func (ListOfFriendsRequest) Type ¶
func (ListOfFriendsRequest) Type() string
Type implements Message interface
type ListOfFriendsResponse ¶
type ListOfFriendsResponse struct { *BaseResponse UserIDs []string }
ListOfFriendsResponse message command to get list of friends (Response)
func (ListOfFriendsResponse) Type ¶
func (ListOfFriendsResponse) Type() string
Type implements Message interface
type ListOutgoingFriendsRequest ¶
type ListOutgoingFriendsRequest struct {
*BaseRequest
}
ListOutgoingFriendsRequest message command to get list of Outgoing friends (Request)
func (ListOutgoingFriendsRequest) Type ¶
func (ListOutgoingFriendsRequest) Type() string
Type implements Message interface
type ListOutgoingFriendsResponse ¶
type ListOutgoingFriendsResponse struct { *BaseResponse UserIDs []string }
ListOutgoingFriendsResponse message command to get list of Outgoing friends (Response)
func (ListOutgoingFriendsResponse) Type ¶
func (ListOutgoingFriendsResponse) Type() string
Type implements Message interface
type MatchMakingCancelRequest ¶
type MatchMakingCancelRequest struct { Channel string `json:"channel,omitempty"` PartyID string `json:"party_id"` }
MatchMakingCancelRequest is the request for a party to get matched
type MatchMakingRequest ¶
type MatchMakingRequest struct {
MatchmakingTicket
}
MatchMakingRequest is the request for a party to get matched
type MatchingAlly ¶
type MatchingAlly struct {
MatchingParties []MatchingParty `json:"matching_parties"`
}
MatchingAlly is the model of a side
type MatchingParty ¶
type MatchingParty struct { PartyID string `json:"party_id"` PartyAttributes map[string]interface{} `json:"party_attributes"` PartyMembers []PartyMember `json:"party_members"` }
MatchingParty contains information about matching party
type MatchingPartyV1 ¶
type MatchingPartyV1 struct { PartyID string `json:"partyId"` PartyMembers []PartyMemberV1 `json:"partyMembers"` }
MatchingPartyV1 contains information about matching party
type MatchmakingNotification ¶
type MatchmakingNotification struct { Status string MatchID string PartyMemberUserID []string CounterPartyMemberUserID []string Message string ReadyDuration int }
MatchmakingNotification is the message of matchmaking result
func (MatchmakingNotification) Type ¶
func (MatchmakingNotification) Type() string
Type implements Message interface
type MatchmakingResult ¶
type MatchmakingResult struct { Status string `json:"status"` PartyID string `json:"party_id,omitempty"` // exists only on status cancel MatchID string `json:"match_id"` Channel string `json:"channel"` Namespace string `json:"namespace"` GameMode string `json:"game_mode"` ServerName string `json:"server_name"` ClientVersion string `json:"client_version"` Region string `json:"region"` Joinable bool `json:"joinable"` MatchingAllies []MatchingAlly `json:"matching_allies"` Deployment string `json:"deployment"` }
MatchmakingResult is the result of matchmaking
func (*MatchmakingResult) String ¶
func (res *MatchmakingResult) String() string
type MatchmakingTicket ¶
type MatchmakingTicket struct { Channel string `json:"channel,omitempty"` PartyID string `json:"party_id"` PartyMembers []PartyMember `json:"party_members"` Priority int `json:"priority"` PartyAttributes map[string]interface{} `json:"party_attributes"` }
MatchmakingTicket contains information about matching party PartyAttributes can contain any of: - server_name: string of preferred server name (for local DS) - client_version: string of preferred client version (for matching with DS version) - latencies: string of JSON map of {"region name string": latency int} containing pairs of region name and latency in ms
type Message ¶
type Message interface {
Type() string // Returns the message type
}
Message will be passed around internally
type NotificationMessage ¶
type NotificationMessage struct { ID string From string To string Topic string Payload string SentAt int64 }
NotificationMessage contains user notification message to be sent to user
func (NotificationMessage) Type ¶
func (NotificationMessage) Type() string
Type implements Message interface
type NotifyDSRequest ¶
type NotifyDSRequest struct { Session *Session MatchingAllies []RequestMatchingAlly PartyIDsToSkip []string Error error }
NotifyDSRequest message command to notify users that DS is ready (Request)
func (NotifyDSRequest) Type ¶
func (NotifyDSRequest) Type() string
Type implements Message interface
type PartyChatNotif ¶
type PartyChatNotif struct {
*ChatMessage
}
PartyChatNotif contains user's party chat
type PartyChatRequest ¶
type PartyChatRequest struct {
*ChatMessage
}
PartyChatRequest contains user's party chat
func (PartyChatRequest) Len ¶ added in v0.7.0
func (c PartyChatRequest) Len() int
Len implements Chat interface
func (PartyChatRequest) Type ¶
func (PartyChatRequest) Type() string
Type implements Message interface
type PartyChatResponse ¶
type PartyChatResponse struct {
*BaseResponse
}
PartyChatResponse contains user's party chat
func (PartyChatResponse) Type ¶
func (PartyChatResponse) Type() string
Type implements Message interface
type PartyDataUpdateNotification ¶
type PartyDataUpdateNotification struct { PartyID string LeaderID string Namespace string Members []string Invitees []string CustomAttribute map[string]interface{} UpdatedAt int64 }
PartyDataUpdateNotification is the message of PartyDataUpdateNotification
func (PartyDataUpdateNotification) Type ¶
func (PartyDataUpdateNotification) Type() string
Type implements Message interface
type PartyMember ¶
type PartyMember struct { UserID string `json:"user_id"` ExtraAttributes map[string]interface{} `json:"extra_attributes"` }
PartyMember is the member of the party and its predefined attribute
type PartyMemberV1 ¶
type PartyMemberV1 struct { UserID string `json:"userId"` ExtraAttributes map[string]interface{} `json:"extraAttributes"` }
PartyMemberV1 contains information party member
type PartyNotif ¶ added in v0.7.0
func (PartyNotif) Type ¶ added in v0.7.0
func (PartyNotif) Type() string
type PersonalChatHistoryRequest ¶
type PersonalChatHistoryRequest struct { *BaseRequest FriendID string }
PersonalChatHistoryRequest list of user's personal chat request
func (PersonalChatHistoryRequest) Type ¶
func (PersonalChatHistoryRequest) Type() string
Type implements Message interface
type PersonalChatHistoryResponse ¶
type PersonalChatHistoryResponse struct { *BaseResponse FriendID string Chat string }
PersonalChatHistoryResponse list of user's personal chat response
func (PersonalChatHistoryResponse) Type ¶
func (PersonalChatHistoryResponse) Type() string
Type implements Message interface
type PersonalChatNotif ¶
type PersonalChatNotif struct {
*ChatMessage
}
PersonalChatNotif is the notif message for incoming chat message
func (PersonalChatNotif) Type ¶
func (PersonalChatNotif) Type() string
Type implements Message interface
type PersonalChatRequest ¶
type PersonalChatRequest struct {
*ChatMessage
}
PersonalChatRequest contains user's personal chat
func (PersonalChatRequest) Len ¶ added in v0.7.0
func (c PersonalChatRequest) Len() int
Len implements Chat interface
func (PersonalChatRequest) Type ¶
func (PersonalChatRequest) Type() string
Type implements Message interface
type PersonalChatResponse ¶
type PersonalChatResponse struct {
*BaseResponse
}
PersonalChatResponse response message after sending chat request
func (PersonalChatResponse) Type ¶
func (PersonalChatResponse) Type() string
Type implements Message interface
type PlayerBlockedNotification ¶
PlayerBlockedNotification is the message of PlayerBlockedNotification
func (PlayerBlockedNotification) Type ¶
func (PlayerBlockedNotification) Type() string
Type implements Message interface
type PlayerUnblockedNotification ¶
PlayerUnblockedNotification is the message of PlayerUnblockedNotification
func (PlayerUnblockedNotification) Type ¶
func (PlayerUnblockedNotification) Type() string
Type implements Message interface
type PromoteLeaderRequest ¶
type PromoteLeaderRequest struct { *BaseRequest NewLeaderUserID string }
func (PromoteLeaderRequest) Type ¶
func (PromoteLeaderRequest) Type() string
type PromoteLeaderResponse ¶
type PromoteLeaderResponse struct { *BaseResponse PartyID string LeaderID string Members string Invitees string InvitationToken string }
func (PromoteLeaderResponse) Type ¶
func (PromoteLeaderResponse) Type() string
type ReadyConsent ¶
type ReadyConsent struct { Namespace string `json:"namespace"` PartyID string `json:"party_id"` GameMode string `json:"game_mode"` Members []Member `json:"members"` }
ReadyConsent contains information about readyness status in a party party leader was needed to do rematchmaking
type RejectFriendsNotif ¶ added in v0.7.0
type RejectFriendsNotif struct {
UserID string `json:"userId"`
}
RejectFriendsRequest notification message to tell that friend-request is rejected
func (RejectFriendsNotif) Type ¶ added in v0.7.0
func (RejectFriendsNotif) Type() string
Type implements Message interface
type RejectFriendsRequest ¶
type RejectFriendsRequest struct { *BaseRequest FriendID string `json:"friendId"` }
RejectFriendsRequest message command to reject friends request (Request)
func (RejectFriendsRequest) Type ¶
func (RejectFriendsRequest) Type() string
Type implements Message interface
type RejectFriendsResponse ¶
type RejectFriendsResponse struct {
*BaseResponse
}
RejectFriendsResponse message command to reject friends request (Response)
func (RejectFriendsResponse) Type ¶
func (RejectFriendsResponse) Type() string
Type implements Message interface
type RejectNotice ¶
RejectNotice contains party's reject notice
type RejectRequest ¶
type RejectRequest struct { *BaseRequest PartyID string InvitationToken string }
RejectRequest contains user's reject request
type RejectResponse ¶
type RejectResponse struct { *BaseResponse PartyID string }
RejectResponse contains result of user's reject request
type RematchmakingNotif ¶
type RematchmakingNotif struct {
BanDuration int
}
RematchmakingNotif is the message of rematchmaking notification
func (RematchmakingNotif) Type ¶
func (RematchmakingNotif) Type() string
Type implements Message interface
type RequestFriendsNotif ¶
type RequestFriendsNotif struct {
FriendID string `json:"friendId"`
}
RequestFriendsNotif message notification when someone requesting friends relation
func (RequestFriendsNotif) Type ¶
func (RequestFriendsNotif) Type() string
Type implements Message interface
type RequestFriendsRequest ¶
type RequestFriendsRequest struct { *BaseRequest FriendID string `json:"friendId"` }
RequestFriendsRequest message command to request friends (Request)
func (RequestFriendsRequest) Type ¶
func (RequestFriendsRequest) Type() string
Type implements Message interface
type RequestFriendsResponse ¶
type RequestFriendsResponse struct {
*BaseResponse
}
RequestFriendsResponse message command to request friends (Response)
func (RequestFriendsResponse) Type ¶
func (RequestFriendsResponse) Type() string
Type implements Message interface
type RequestMatchMember ¶
type RequestMatchMember struct {
UserID string `json:"user_id"`
}
RequestMatchMember is the member of match party
func (*RequestMatchMember) Validate ¶
func (req *RequestMatchMember) Validate() error
Validate returns error if any field is missing
type RequestMatchParty ¶
type RequestMatchParty struct { PartyID string `json:"party_id"` PartyAttributes map[string]interface{} `json:"party_attributes"` PartyMembers []RequestMatchMember `json:"party_members"` }
RequestMatchParty is the matching party of a match
func (*RequestMatchParty) Members ¶
func (req *RequestMatchParty) Members() []string
Members return party member user ID in slice format
func (*RequestMatchParty) Validate ¶
func (req *RequestMatchParty) Validate() error
Validate returns error if any field is missing
type RequestMatchingAlly ¶
type RequestMatchingAlly struct {
MatchingParties []RequestMatchParty `json:"matching_parties"`
}
RequestMatchingAlly contains party on the same side
func (*RequestMatchingAlly) Validate ¶
func (req *RequestMatchingAlly) Validate() error
Validate returns error if any field is missing
type ResetUserStatusRequest ¶
ResetUserStatusRequest request directly from client to reset user status when the client get disconnected
func (ResetUserStatusRequest) Type ¶
func (ResetUserStatusRequest) Type() string
Type implements Message interface
type SendChannelChatRequest ¶
type SendChannelChatRequest struct { *BaseRequest ChannelSlug string Payload string }
SendChannelChatRequest is the request models for sending chat channel
func (SendChannelChatRequest) Len ¶ added in v0.7.0
func (c SendChannelChatRequest) Len() int
Len implements Chat interface
func (SendChannelChatRequest) Type ¶
func (SendChannelChatRequest) Type() string
Type implements Message interface
type SendChannelChatResponse ¶
type SendChannelChatResponse struct {
*BaseResponse
}
SendChannelChatResponse is the response models for sending default chat channel response
func (SendChannelChatResponse) Type ¶
func (SendChannelChatResponse) Type() string
Type implements Message interface
type SendPartyNotifRequest ¶ added in v0.7.0
type SendPartyNotifRequest struct { *BaseRequest Topic string Payload string }
func (SendPartyNotifRequest) Type ¶ added in v0.7.0
func (SendPartyNotifRequest) Type() string
type SendPartyNotifResponse ¶ added in v0.7.0
type SendPartyNotifResponse struct {
*BaseResponse
}
func (SendPartyNotifResponse) Type ¶ added in v0.7.0
func (SendPartyNotifResponse) Type() string
type Server ¶
type Server struct { PodName string `json:"pod_name"` ImageVersion string `json:"image_version"` Namespace string `json:"namespace"` IP string `json:"ip"` AlternateIPs []string `json:"alternate_ips"` Port int `json:"port"` Protocol string `json:"protocol"` Ports map[string]int `json:"ports"` Provider string `json:"provider"` GameVersion string `json:"game_version"` StatusText string `json:"status"` LastUpdate time.Time `json:"last_update"` SessionID string `json:"session_id"` Deployment string `json:"deployment"` Region string `json:"region"` IsOverrideGameVersion bool `json:"is_override_game_version"` CustomAttribute string `json:"custom_attribute"` }
Server represents a DS server currently managed by the service
type SessionResponse ¶
type SessionResponse struct {
Session *Session `json:"session"`
}
SessionResponse is the response for get server endpoint
type SetReadyConsentNotif ¶
SetReadyConsentNotif is the message of set ready consent response
func (SetReadyConsentNotif) Type ¶
func (SetReadyConsentNotif) Type() string
Type implements Message interface
type SetReadyConsentRequest ¶
type SetReadyConsentRequest struct { *BaseRequest MatchID string }
SetReadyConsentRequest is the message of set ready consent request
func (SetReadyConsentRequest) Type ¶
func (SetReadyConsentRequest) Type() string
Type implements Message interface
type SetReadyConsentResponse ¶
type SetReadyConsentResponse struct {
*BaseResponse
}
SetReadyConsentResponse is the message of set ready consent response
func (SetReadyConsentResponse) Type ¶
func (SetReadyConsentResponse) Type() string
Type implements Message interface
type SetSessionAttributeRequest ¶
type SetSessionAttributeRequest struct { *BaseRequest Namespace string Key string Value string }
func (SetSessionAttributeRequest) Type ¶
func (SetSessionAttributeRequest) Type() string
type SetSessionAttributeResponse ¶
type SetSessionAttributeResponse struct {
*BaseResponse
}
func (SetSessionAttributeResponse) Type ¶
func (SetSessionAttributeResponse) Type() string
type SetUserStatusRequest ¶
type SetUserStatusRequest struct { *BaseRequest Availability int `json:"availability"` Activity string `json:"activity"` }
SetUserStatusRequest message command to set user status (Request)
func (SetUserStatusRequest) Type ¶
func (SetUserStatusRequest) Type() string
Type implements Message interface
type SetUserStatusResponse ¶
type SetUserStatusResponse struct {
*BaseResponse
}
SetUserStatusResponse message command to set user status (Response)
func (SetUserStatusResponse) Type ¶
func (SetUserStatusResponse) Type() string
Type implements Message interface
type Shutdown ¶
type Shutdown struct {
Message string
}
Shutdown contains info of server shutting down
type SignalingP2P ¶
type SignalingP2P struct { *BaseRequest DestinationID string Message string }
SignalingP2P is message for signaling for game P2P connection request
type StartMatchmakingRequest ¶
type StartMatchmakingRequest struct { *BaseRequest GameMode string Priority int PartyAttributes map[string]interface{} `json:"party_attributes"` TempParty string ExtraAttributes string }
StartMatchmakingRequest message message to start matchmaking The user id should be the leader user ID Priority spans from 0-10 the highest the priority the faster it party will get matched
PartyAttributes can contain any of: - server_name: string of preferred server name (for local DS) - client_version: string of preferred client version (for matching with DS version) - latencies: string of JSON map of {"region name string": latency int} containing pairs of region name and latency in ms
Temp party should contain comma separated user IDs in a temporary party for matchmaking only
func (StartMatchmakingRequest) Type ¶
func (StartMatchmakingRequest) Type() string
Type implements Message interface
type StartMatchmakingResponse ¶
type StartMatchmakingResponse struct { *BaseResponse Message string }
StartMatchmakingResponse message message to reply start matchmaking request
func (StartMatchmakingResponse) Type ¶
func (StartMatchmakingResponse) Type() string
Type implements Message interface
type SystemComponentsStatus ¶
SystemComponentsStatus is the message of System Components Status
func (SystemComponentsStatus) Type ¶
func (SystemComponentsStatus) Type() string
Type implements Message interface
type TypeInfoRequestRequest ¶ added in v0.18.0
type TypeInfoRequestRequest struct { *BaseResponse Id string `json:"id"` }
TypeInfoRequestRequest message command to get info
func (TypeInfoRequestRequest) Type ¶ added in v0.18.0
func (TypeInfoRequestRequest) Type() string
Type implements Message interface
type TypeInfoRequestResponse ¶ added in v0.18.0
type TypeInfoRequestResponse struct {
*BaseResponse
}
TypeInfoRequestResponse message command to get info
type UnblockPlayerRequest ¶
type UnblockPlayerRequest struct { *BaseRequest Namespace string UnblockedUserID string }
UnblockPlayerRequest is the message of UnblockPlayerRequest
func (UnblockPlayerRequest) Type ¶
func (UnblockPlayerRequest) Type() string
Type implements Message interface
type UnblockPlayerResponse ¶
type UnblockPlayerResponse struct { *BaseResponse Namespace string UnblockedUserID string }
UnblockPlayerResponse is the message of UnblockPlayerResponse
func (UnblockPlayerResponse) Type ¶
func (UnblockPlayerResponse) Type() string
Type implements Message interface
type UnfriendNotif ¶
type UnfriendNotif struct {
FriendID string `json:"friendId"`
}
UnfriendNotif is notification message when someone unfriend a friend
type UnfriendRequest ¶
type UnfriendRequest struct { *BaseRequest FriendID string `json:"friendId"` }
UnfriendRequest message command to unfriends (Request)
func (UnfriendRequest) Type ¶
func (UnfriendRequest) Type() string
Type implements Message interface
type UnfriendResponse ¶
type UnfriendResponse struct {
*BaseResponse
}
UnfriendResponse message command to unfriends (Response)
func (UnfriendResponse) Type ¶
func (UnfriendResponse) Type() string
Type implements Message interface
type UserBannedNotification ¶ added in v0.7.0
type UserBannedNotification struct { *BaseResponse UserID string `json:"userId"` Namespace string `json:"namespace"` Ban string `json:"ban"` EndDate string `json:"endDate"` Reason string `json:"reason"` Enable bool `json:"enable"` }
UserBannedNotification is the response models for when user got banned
func (UserBannedNotification) Type ¶ added in v0.7.0
func (UserBannedNotification) Type() string
Type implements Message interface
type UserMetricRequest ¶
type UserMetricRequest struct {
*BaseRequest
}
func (UserMetricRequest) Type ¶
func (UserMetricRequest) Type() string
type UserMetricResponse ¶
type UserMetricResponse struct { *BaseResponse PlayerCount int }
func (UserMetricResponse) Type ¶
func (UserMetricResponse) Type() string
type UserUnbannedNotification ¶ added in v0.7.0
type UserUnbannedNotification struct { *BaseResponse UserID string `json:"userId"` Namespace string `json:"namespace"` Ban string `json:"ban"` EndDate string `json:"endDate"` Reason string `json:"reason"` Enable bool `json:"enable"` }
UserUnbannedNotification is the response models for when user is unbanned
func (UserUnbannedNotification) Type ¶ added in v0.7.0
func (UserUnbannedNotification) Type() string
Type implements Message interface
type WaitForDSRequest ¶
type WaitForDSRequest struct { Session *Session Request *CreateSessionRequest }
WaitForDSRequest message command to wait a DS creation (Request)
func (*WaitForDSRequest) String ¶
func (req *WaitForDSRequest) String() string
func (WaitForDSRequest) Type ¶
func (WaitForDSRequest) Type() string
Type implements Message interface