model

package
v0.1.0-alpha.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ServerStatusCreating = "CREATING"
	ServerStatusReady    = "READY"
	ServerStatusBusy     = "BUSY"
)

Server status constants

View Source
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

View Source
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"
	TypeMessageSessionNotif            = "messageSessionNotif"
	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"
	TypeRefreshTokenRequest            = "refreshTokenRequest"
	TypeRefreshTokenResponse           = "refreshTokenResponse"
	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"
	TypeUnblockPlayerNotif             = "unblockPlayerNotif"
	TypeUnblockPlayerRequest           = "unblockPlayerRequest"
	TypeUnblockPlayerResponse          = "unblockPlayerResponse"
	TypeUnfriendNotif                  = "unfriendNotif"
	TypeUnfriendRequest                = "unfriendRequest"
	TypeUnfriendResponse               = "unfriendResponse"
	TypeUserBannedNotification         = "userBannedNotification"
	TypeUserMetricRequest              = "userMetricRequest"
	TypeUserMetricResponse             = "userMetricResponse"
	TypeUserStatusNotif                = "userStatusNotif"
)

Lobby messaging protocol type

View Source
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
}

AcceptFriendsNotif

func (AcceptFriendsNotif) Type

func (AcceptFriendsNotif) Type() string

Type implements Message interface

type AcceptFriendsRequest

type AcceptFriendsRequest struct {
	FriendID string
	*BaseResponse
}

AcceptFriendsRequest

func (AcceptFriendsRequest) Type

Type implements Message interface

type AcceptFriendsResponse

type AcceptFriendsResponse struct {
	*BaseResponse
}

AcceptFriendsResponse

func (AcceptFriendsResponse) Type

Type implements Message interface

type BaseRequest

type BaseRequest struct {
	MessageID string
	UserID    string
}

BaseRequest will be expanded by other message types and contains user's ID

func (BaseRequest) Type

func (BaseRequest) Type() string

Type implements Message interface

type BaseResponse

type BaseResponse struct {
	MessageID string
	Code      int
}

BaseResponse will be expanded by other response types and contains HTTP response code

func (BaseResponse) Type

func (BaseResponse) Type() string

Type implements Message interface

type BlockPlayerNotif

type BlockPlayerNotif struct {
	BlockedUserID string
	UserID        string
}

BlockPlayerNotif

func (BlockPlayerNotif) Type

func (BlockPlayerNotif) Type() string

Type implements Message interface

type BlockPlayerRequest

type BlockPlayerRequest struct {
	BlockUserID string
	*BaseResponse
	Namespace string
}

BlockPlayerRequest

func (BlockPlayerRequest) Type

func (BlockPlayerRequest) Type() string

Type implements Message interface

type BlockPlayerResponse

type BlockPlayerResponse struct {
	BlockUserID string
	*BaseResponse
	Namespace string
}

BlockPlayerResponse

func (BlockPlayerResponse) Type

func (BlockPlayerResponse) Type() string

Type implements Message interface

type CancelFriendsNotif

type CancelFriendsNotif struct {
	UserID string
}

CancelFriendsNotif

func (CancelFriendsNotif) Type

func (CancelFriendsNotif) Type() string

Type implements Message interface

type CancelFriendsRequest

type CancelFriendsRequest struct {
	FriendID string
	*BaseResponse
}

CancelFriendsRequest

func (CancelFriendsRequest) Type

Type implements Message interface

type CancelFriendsResponse

type CancelFriendsResponse struct {
	*BaseResponse
}

CancelFriendsResponse

func (CancelFriendsResponse) Type

Type implements Message interface

type CancelMatchmakingRequest

type CancelMatchmakingRequest struct {
	GameMode string
	*BaseResponse
	IsTempParty bool
}

CancelMatchmakingRequest

func (CancelMatchmakingRequest) Type

Type implements Message interface

type CancelMatchmakingResponse

type CancelMatchmakingResponse struct {
	*BaseResponse
}

CancelMatchmakingResponse

func (CancelMatchmakingResponse) Type

Type implements Message interface

type ChannelChatNotif

type ChannelChatNotif struct {
	ChannelSlug string
	From        string
	Payload     string
	SentAt      time.Time
}

ChannelChatNotif

func (ChannelChatNotif) Type

func (ChannelChatNotif) Type() string

Type implements Message interface

type Chat

type Chat interface {
	Len() int
}

type ChatMessage

type ChatMessage struct {
	ID         string
	From       string
	To         string
	Payload    string
	ReceivedAt int64
}

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

func (ClaimDSRequest) Type

func (ClaimDSRequest) Type() string

Type implements Message interface

type ClaimSessionRequest

type ClaimSessionRequest struct {
	SessionID string `json:"session_id"`
	Namespace string `json:"-"`
}

ClaimSessionRequest contains request to claim a dedicated server

type ClientResetRequest

type ClientResetRequest struct {
	Namespace string
	UserID    string
}

ClientResetRequest

func (ClientResetRequest) Type

func (ClientResetRequest) Type() string

Type implements Message interface

type ConnectNotif

type ConnectNotif struct {
	LobbySessionID string
}

ConnectNotif

func (ConnectNotif) Type

func (ConnectNotif) Type() string

Type implements Message interface

type Connected

type Connected struct {
	*BaseResponse
	LobbySessionID string
}

Connected contains result of making connection

func (Connected) Type

func (Connected) Type() string

Type implements Message interface

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

func (CreateRequest) Type

func (CreateRequest) Type() string

Type implements Message interface

type CreateResponse

type CreateResponse struct {
	*BaseResponse
	PartyID         string
	LeaderID        string
	Members         string
	Invitees        string
	InvitationToken string
	PartyCode       string
}

CreateResponse contains result of creating party

func (CreateResponse) Type

func (CreateResponse) Type() string

Type implements Message interface

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

type DSNotification struct {
	Session *Session
	IsOK    bool
	Message string
}

DSNotification is the message of DS status notification

func (DSNotification) Type

func (DSNotification) Type() string

Type implements Message interface

type DeletePartyCodeRequest

type DeletePartyCodeRequest struct {
	*BaseRequest
}

func (DeletePartyCodeRequest) Type

type DeletePartyCodeResponse

type DeletePartyCodeResponse struct {
	*BaseResponse
}

func (DeletePartyCodeResponse) Type

type DisconnectNotif

type DisconnectNotif struct {
	ConnectionID string
	Namespace    string
}

DisconnectNotif

func (DisconnectNotif) Type

func (DisconnectNotif) Type() string

Type implements Message interface

type Disconnected

type Disconnected struct {
	*BaseRequest
	Namespace    string
	ConnectionID string
}

Disconnected contains info of disconnected user

func (Disconnected) Type

func (Disconnected) Type() string

Type implements Message interface

type DsNotif

type DsNotif struct {
	AlternateIps          []string
	CustomAttribute       string
	Deployment            string
	GameVersion           string
	ImageVersion          string
	IP                    string
	IsOK                  bool
	IsOverrideGameVersion bool
	LastUpdate            string
	MatchID               string
	Message               string
	Namespace             string
	PodName               string
	Port                  int
	Ports                 string
	Protocol              string
	Provider              string
	Region                string
	SessionID             string
	Status                string
}

DsNotif

func (DsNotif) Type

func (DsNotif) Type() string

Type implements Message interface

type Error

type Error struct {
	ErrorCode    int    `json:"errorCode"`
	ErrorMessage string `json:"errorMessage"`
}

Error is response sent when an error occurs

type ErrorMessage

type ErrorMessage struct {
	*BaseResponse
	Message string
}

ErrorMessage contains info of error

func (ErrorMessage) Type

func (ErrorMessage) Type() string

Type implements Message interface

type ErrorNotif

type ErrorNotif struct {
	Message string
}

ErrorNotif

func (ErrorNotif) Type

func (ErrorNotif) Type() string

Type implements Message interface

type ExitAllChannel

type ExitAllChannel struct {
	Namespace string
	UserID    string
}

ExitAllChannel

func (ExitAllChannel) Type

func (ExitAllChannel) Type() string

Type implements Message interface

type FriendsPresenceNotif

type FriendsPresenceNotif struct {
	UserID       string
	Availability string
	Activity     string
	Platform     string
	LastSeenAt   string
}

FriendsPresenceNotif message command to notify friends

func (FriendsPresenceNotif) Type

Type implements Message interface

type FriendsStatusRequest

type FriendsStatusRequest struct {
	*BaseResponse
}

FriendsStatusRequest

func (FriendsStatusRequest) Type

Type implements Message interface

type FriendsStatusResponse

type FriendsStatusResponse struct {
	Activity     []string
	Availability []string
	FriendIds    []string
	*BaseResponse
	LastSeenAt []string
}

FriendsStatusResponse

func (FriendsStatusResponse) Type

Type implements Message interface

type GeneratePartyCodeRequest

type GeneratePartyCodeRequest struct {
	*BaseRequest
}

func (GeneratePartyCodeRequest) Type

type GeneratePartyCodeResponse

type GeneratePartyCodeResponse struct {
	*BaseResponse
	PartyCode string
}

func (GeneratePartyCodeResponse) Type

type GetAllSessionAttributeRequest

type GetAllSessionAttributeRequest struct {
	*BaseResponse
}

GetAllSessionAttributeRequest

func (GetAllSessionAttributeRequest) Type

Type implements Message interface

type GetAllSessionAttributeResponse

type GetAllSessionAttributeResponse struct {
	*BaseResponse
	Attributes map[string]string
}

func (GetAllSessionAttributeResponse) Type

Type implements Message interface

type GetFriendshipStatusRequest

type GetFriendshipStatusRequest struct {
	FriendID string
	*BaseResponse
}

GetFriendshipStatusRequest

func (GetFriendshipStatusRequest) Type

Type implements Message interface

type GetFriendshipStatusResponse

type GetFriendshipStatusResponse struct {
	FriendshipStatus string
	*BaseResponse
}

GetFriendshipStatusResponse

func (GetFriendshipStatusResponse) Type

Type implements Message interface

type GetOfflineNotificationRequest

type GetOfflineNotificationRequest struct {
	*BaseRequest
}

GetOfflineNotificationRequest message comment

func (GetOfflineNotificationRequest) Type

Type implements Message interface

type GetOfflineNotificationResponse

type GetOfflineNotificationResponse struct {
	*BaseResponse
}

GetOfflineNotificationResponse message comment

func (GetOfflineNotificationResponse) Type

Type implements Message interface

type GetPartyCodeRequest

type GetPartyCodeRequest struct {
	*BaseRequest
}

func (GetPartyCodeRequest) Type

func (GetPartyCodeRequest) Type() string

type GetPartyCodeResponse

type GetPartyCodeResponse struct {
	*BaseResponse
	PartyCode string
}

func (GetPartyCodeResponse) Type

type GetSessionAttributeRequest

type GetSessionAttributeRequest struct {
	*BaseResponse
	Key string
}

GetSessionAttributeRequest

func (GetSessionAttributeRequest) Type

Type implements Message interface

type GetSessionAttributeResponse

type GetSessionAttributeResponse struct {
	*BaseResponse
	Value string
}

GetSessionAttributeResponse

func (GetSessionAttributeResponse) Type

Type implements Message interface

type Heartbeat

type Heartbeat struct {
	*BaseRequest
}

Heartbeat used for keeping connection alive

func (Heartbeat) Type

func (Heartbeat) Type() string

Type implements Message interface

type InfoRequest

type InfoRequest struct {
	*BaseRequest
}

InfoRequest contains user's info request

func (InfoRequest) Type

func (InfoRequest) Type() string

Type implements Message interface

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

func (InfoResponse) Type

func (InfoResponse) Type() string

Type implements Message interface

type Invitation

type Invitation struct {
	From            string
	PartyID         string
	InvitationToken string
}

Invitation contains user's invitation to other user

func (Invitation) Type

func (Invitation) Type() string

Type implements Message interface

type InviteNotice

type InviteNotice struct {
	InviterID string
	InviteeID string
}

InviteNotice contains party's invite notice

func (InviteNotice) Type

func (InviteNotice) Type() string

Type implements Message interface

type InviteRequest

type InviteRequest struct {
	*BaseRequest
	FriendID string
}

InviteRequest contains user's invite request

func (InviteRequest) Type

func (InviteRequest) Type() string

Type implements Message interface

type InviteResponse

type InviteResponse struct {
	*BaseResponse
}

InviteResponse contains result of inviting friend to party

func (InviteResponse) Type

func (InviteResponse) Type() string

Type implements Message interface

type JoinDefaultChannelRequest

type JoinDefaultChannelRequest struct {
	*BaseResponse
}

JoinDefaultChannelRequest

func (JoinDefaultChannelRequest) Type

Type implements Message interface

type JoinDefaultChannelResponse

type JoinDefaultChannelResponse struct {
	ChannelSlug string
	*BaseResponse
}

JoinDefaultChannelResponse

func (JoinDefaultChannelResponse) Type

Type implements Message interface

type JoinNotice

type JoinNotice struct {
	UserID string
}

JoinNotice contains party's join notice

func (JoinNotice) Type

func (JoinNotice) Type() string

Type implements Message interface

type JoinRequest

type JoinRequest struct {
	*BaseRequest
	PartyID         string
	InvitationToken string
}

JoinRequest contains user's join request

func (JoinRequest) Type

func (JoinRequest) Type() string

Type implements Message interface

type JoinResponse

type JoinResponse struct {
	*BaseResponse
	PartyID         string
	LeaderID        string
	Members         string
	Invitees        string
	InvitationToken string
}

JoinResponse contains result of user's join request

func (JoinResponse) Type

func (JoinResponse) Type() string

Type implements Message interface

type JoinViaPartyCodeRequest

type JoinViaPartyCodeRequest struct {
	*BaseRequest
	PartyCode string
}

func (JoinViaPartyCodeRequest) Type

type JoinViaPartyCodeResponse

type JoinViaPartyCodeResponse struct {
	*BaseResponse
	PartyID         string
	LeaderID        string
	Members         string
	Invitees        string
	InvitationToken string
}

func (JoinViaPartyCodeResponse) Type

type KickNotice

type KickNotice struct {
	LeaderID string
	UserID   string
	PartyID  string
}

KickNotice contains party's kicked notice

func (KickNotice) Type

func (KickNotice) Type() string

Type implements Message interface

type KickRequest

type KickRequest struct {
	*BaseRequest
	MemberID string
}

KickRequest contains user's kick request

func (KickRequest) Type

func (KickRequest) Type() string

Type implements Message interface

type KickResponse

type KickResponse struct {
	*BaseResponse
}

KickResponse contains result of kicking member from party

func (KickResponse) Type

func (KickResponse) Type() string

Type implements Message interface

type LeaveNotice

type LeaveNotice struct {
	UserID   string
	LeaderID string
}

LeaveNotice contains party's leave notice

func (LeaveNotice) Type

func (LeaveNotice) Type() string

Type implements Message interface

type LeaveRequest

type LeaveRequest struct {
	*BaseRequest

	// Internal use, to force player leave party on disconnected
	IgnoreUserRegistry bool
}

LeaveRequest contains user's create request

func (LeaveRequest) Type

func (LeaveRequest) Type() string

Type implements Message interface

type LeaveResponse

type LeaveResponse struct {
	*BaseResponse
}

LeaveResponse contains result of creating party

func (LeaveResponse) Type

func (LeaveResponse) Type() string

Type implements Message interface

type ListFriendsPresenceRequest

type ListFriendsPresenceRequest struct {
	*BaseRequest
}

ListFriendsPresenceRequest message command to list user's friends (Request)

func (ListFriendsPresenceRequest) Type

Type implements Message interface

type ListFriendsPresenceResponse

type ListFriendsPresenceResponse struct {
	*BaseResponse
	UserID       []string
	Availability []string
	Activity     []string
	Platform     []string
	LastSeenAt   []string
}

ListFriendsPresenceResponse message command to list user's friends (Response)

func (ListFriendsPresenceResponse) Type

Type implements Message interface

type ListIncomingFriendsRequest

type ListIncomingFriendsRequest struct {
	*BaseResponse
}

ListIncomingFriendsRequest

func (ListIncomingFriendsRequest) Type

Type implements Message interface

type ListIncomingFriendsResponse

type ListIncomingFriendsResponse struct {
	*BaseResponse
	UserIds []string
}

ListIncomingFriendsResponse

func (ListIncomingFriendsResponse) Type

Type implements Message interface

type ListOfFriendsRequest

type ListOfFriendsRequest struct {
	FriendID string
	*BaseResponse
}

ListOfFriendsRequest

func (ListOfFriendsRequest) Type

Type implements Message interface

type ListOfFriendsResponse

type ListOfFriendsResponse struct {
	FriendIds []string
	*BaseResponse
}

ListOfFriendsResponse

func (ListOfFriendsResponse) Type

Type implements Message interface

type ListOnlineFriendsRequest

type ListOnlineFriendsRequest struct {
	*BaseResponse
}

ListOnlineFriendsRequest

func (ListOnlineFriendsRequest) Type

Type implements Message interface

type ListOutgoingFriendsRequest

type ListOutgoingFriendsRequest struct {
	*BaseResponse
}

ListOutgoingFriendsRequest

func (ListOutgoingFriendsRequest) Type

Type implements Message interface

type ListOutgoingFriendsResponse

type ListOutgoingFriendsResponse struct {
	FriendIds []string
	*BaseResponse
}

ListOutgoingFriendsResponse

func (ListOutgoingFriendsResponse) Type

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 MatchmakingNotif

type MatchmakingNotif struct {
	CounterPartyMember []string
	MatchID            string
	Message            string
	PartyMember        []string
	ReadyDuration      int
	Status             string
}

MatchmakingNotif

func (MatchmakingNotif) Type

func (MatchmakingNotif) Type() string

Type implements Message interface

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

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 Member

type Member struct {
	UserID string `json:"user_id"`
	Status string `json:"status"`
}

Member store ready status and userID of user

type Message

type Message interface {
	Type() string // Returns the message type
}

Message will be passed around internally

type MessageNotif

type MessageNotif struct {
	From string
	*BaseResponse
	Payload string
	SentAt  string
	To      string
	Topic   string
}

MessageNotif

func (MessageNotif) Type

func (MessageNotif) Type() string

Type implements Message interface

type MessageSessionNotif

type MessageSessionNotif struct {
	From string
	*BaseResponse
	Payload string
	SentAt  string
	To      string
	Topic   string
}

MessageSessionNotif

func (MessageSessionNotif) Type

func (MessageSessionNotif) Type() string

Type implements Message interface

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 OfflineNotificationRequest

type OfflineNotificationRequest struct {
	*BaseResponse
}

OfflineNotificationRequest

func (OfflineNotificationRequest) Type

Type implements Message interface

type OfflineNotificationResponse

type OfflineNotificationResponse struct {
	*BaseResponse
}

OfflineNotificationResponse

func (OfflineNotificationResponse) Type

Type implements Message interface

type OnlineFriends

type OnlineFriends struct {
	*BaseResponse
	OnlineFriendIds []string
}

OnlineFriends

func (OnlineFriends) Type

func (OnlineFriends) Type() string

Type implements Message interface

type PartyChatNotif

type PartyChatNotif struct {
	*ChatMessage
}

PartyChatNotif contains user's party chat

func (PartyChatNotif) Type

func (PartyChatNotif) Type() string

Type implements Message interface

type PartyChatRequest

type PartyChatRequest struct {
	*ChatMessage
}

PartyChatRequest contains user's party chat

func (PartyChatRequest) Len

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

func (PartyChatResponse) Type

func (PartyChatResponse) Type() string

Type implements Message interface

type PartyCreateRequest

type PartyCreateRequest struct {
	*BaseResponse
}

PartyCreateRequest

func (PartyCreateRequest) Type

func (PartyCreateRequest) Type() string

Type implements Message interface

type PartyCreateResponse

type PartyCreateResponse struct {
	*BaseResponse
	InvitationToken string
	Invitees        string
	LeaderID        string
	Members         string
	PartyID         string
}

PartyCreateResponse

func (PartyCreateResponse) Type

func (PartyCreateResponse) Type() string

Type implements Message interface

type PartyDataUpdateNotif

type PartyDataUpdateNotif struct {
	CustomAttributes string
	Invitees         []string
	Leader           string
	Members          []string
	Namespace        string
	PartyID          string
	UpdatedAt        string
}

PartyDataUpdateNotif

func (PartyDataUpdateNotif) Type

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

Type implements Message interface

type PartyGetInvitedNotif

type PartyGetInvitedNotif struct {
	From            string
	InvitationToken string
	PartyID         string
}

PartyGetInvitedNotif

func (PartyGetInvitedNotif) Type

Type implements Message interface

type PartyInfoRequest

type PartyInfoRequest struct {
	*BaseResponse
}

PartyInfoRequest

func (PartyInfoRequest) Type

func (PartyInfoRequest) Type() string

Type implements Message interface

type PartyInfoResponse

type PartyInfoResponse struct {
	CustomAttributes string
	*BaseResponse
	InvitationToken string
	Invitees        string
	LeaderID        string
	Members         string
	PartyID         string
}

PartyInfoResponse

func (PartyInfoResponse) Type

func (PartyInfoResponse) Type() string

Type implements Message interface

type PartyInviteNotif

type PartyInviteNotif struct {
	InviteeID string
	InviterID string
}

PartyInviteNotif

func (PartyInviteNotif) Type

func (PartyInviteNotif) Type() string

Type implements Message interface

type PartyInviteRequest

type PartyInviteRequest struct {
	FriendID string
	*BaseResponse
}

PartyInviteRequest

func (PartyInviteRequest) Type

func (PartyInviteRequest) Type() string

Type implements Message interface

type PartyInviteResponse

type PartyInviteResponse struct {
	*BaseResponse
}

PartyInviteResponse

func (PartyInviteResponse) Type

func (PartyInviteResponse) Type() string

Type implements Message interface

type PartyJoinNotif

type PartyJoinNotif struct {
	UserID string
}

PartyJoinNotif

func (PartyJoinNotif) Type

func (PartyJoinNotif) Type() string

Type implements Message interface

type PartyJoinRequest

type PartyJoinRequest struct {
	*BaseResponse
	InvitationToken string
	PartyID         string
}

PartyJoinRequest

func (PartyJoinRequest) Type

func (PartyJoinRequest) Type() string

Type implements Message interface

type PartyJoinResponse

type PartyJoinResponse struct {
	*BaseResponse
	InvitationToken string
	Invitees        string
	LeaderID        string
	Members         string
	PartyID         string
}

PartyJoinResponse

func (PartyJoinResponse) Type

func (PartyJoinResponse) Type() string

Type implements Message interface

type PartyKickNotif

type PartyKickNotif struct {
	LeaderID string
	PartyID  string
	UserID   string
}

PartyKickNotif

func (PartyKickNotif) Type

func (PartyKickNotif) Type() string

Type implements Message interface

type PartyKickRequest

type PartyKickRequest struct {
	*BaseResponse
	MemberID string
}

PartyKickRequest

func (PartyKickRequest) Type

func (PartyKickRequest) Type() string

Type implements Message interface

type PartyKickResponse

type PartyKickResponse struct {
	*BaseResponse
}

PartyKickResponse

func (PartyKickResponse) Type

func (PartyKickResponse) Type() string

Type implements Message interface

type PartyLeaveNotif

type PartyLeaveNotif struct {
	LeaderID string
	UserID   string
}

PartyLeaveNotif

func (PartyLeaveNotif) Type

func (PartyLeaveNotif) Type() string

Type implements Message interface

type PartyLeaveRequest

type PartyLeaveRequest struct {
	*BaseResponse
	IgnoreUserRegistry bool
}

PartyLeaveRequest

func (PartyLeaveRequest) Type

func (PartyLeaveRequest) Type() string

Type implements Message interface

type PartyLeaveResponse

type PartyLeaveResponse struct {
	*BaseResponse
}

PartyLeaveResponse

func (PartyLeaveResponse) Type

func (PartyLeaveResponse) 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

type PartyNotif struct {
	Sender  string
	Topic   string
	Payload string
}

func (PartyNotif) Type

func (PartyNotif) Type() string

type PartyPromoteLeaderRequest

type PartyPromoteLeaderRequest struct {
	*BaseResponse
	NewLeaderUserID string
}

PartyPromoteLeaderRequest

func (PartyPromoteLeaderRequest) Type

Type implements Message interface

type PartyPromoteLeaderResponse

type PartyPromoteLeaderResponse struct {
	*BaseResponse
	InvitationToken string
	Invitees        string
	LeaderID        string
	Members         string
	PartyID         string
}

PartyPromoteLeaderResponse

func (PartyPromoteLeaderResponse) Type

Type implements Message interface

type PartyRejectNotif

type PartyRejectNotif struct {
	LeaderID string
	PartyID  string
	UserID   string
}

PartyRejectNotif

func (PartyRejectNotif) Type

func (PartyRejectNotif) Type() string

Type implements Message interface

type PartyRejectRequest

type PartyRejectRequest struct {
	*BaseResponse
	InvitationToken string
	PartyID         string
}

PartyRejectRequest

func (PartyRejectRequest) Type

func (PartyRejectRequest) Type() string

Type implements Message interface

type PartyRejectResponse

type PartyRejectResponse struct {
	*BaseResponse
	PartyID string
}

PartyRejectResponse

func (PartyRejectResponse) Type

func (PartyRejectResponse) Type() string

Type implements Message interface

type PersonalChatHistoryRequest

type PersonalChatHistoryRequest struct {
	FriendID string
	*BaseResponse
}

PersonalChatHistoryRequest

func (PersonalChatHistoryRequest) Type

Type implements Message interface

type PersonalChatHistoryResponse

type PersonalChatHistoryResponse struct {
	Chat     string
	FriendID string
	*BaseResponse
}

PersonalChatHistoryResponse

func (PersonalChatHistoryResponse) Type

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

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

func (PersonalChatResponse) Type

Type implements Message interface

type PlayerBlockedNotification

type PlayerBlockedNotification struct {
	UserID        string
	BlockedUserID string
}

PlayerBlockedNotification is the message of PlayerBlockedNotification

func (PlayerBlockedNotification) Type

Type implements Message interface

type PlayerUnblockedNotification

type PlayerUnblockedNotification struct {
	UserID          string
	UnblockedUserID string
}

PlayerUnblockedNotification is the message of PlayerUnblockedNotification

func (PlayerUnblockedNotification) Type

Type implements Message interface

type PromoteLeaderRequest

type PromoteLeaderRequest struct {
	*BaseRequest
	NewLeaderUserID string
}

func (PromoteLeaderRequest) Type

type PromoteLeaderResponse

type PromoteLeaderResponse struct {
	*BaseResponse
	PartyID         string
	LeaderID        string
	Members         string
	Invitees        string
	InvitationToken string
}

func (PromoteLeaderResponse) Type

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 RefreshTokenRequest

type RefreshTokenRequest struct {
	*BaseResponse
	Token string
}

RefreshTokenRequest

func (RefreshTokenRequest) Type

func (RefreshTokenRequest) Type() string

Type implements Message interface

type RefreshTokenResponse

type RefreshTokenResponse struct {
	*BaseResponse
}

RefreshTokenResponse

func (RefreshTokenResponse) Type

Type implements Message interface

type RejectFriendsNotif

type RejectFriendsNotif struct {
	UserID string
}

RejectFriendsNotif

func (RejectFriendsNotif) Type

func (RejectFriendsNotif) Type() string

Type implements Message interface

type RejectFriendsRequest

type RejectFriendsRequest struct {
	FriendID string
	*BaseResponse
}

RejectFriendsRequest

func (RejectFriendsRequest) Type

Type implements Message interface

type RejectFriendsResponse

type RejectFriendsResponse struct {
	*BaseResponse
}

RejectFriendsResponse

func (RejectFriendsResponse) Type

Type implements Message interface

type RejectNotice

type RejectNotice struct {
	LeaderID string
	UserID   string
	PartyID  string
}

RejectNotice contains party's reject notice

func (RejectNotice) Type

func (RejectNotice) Type() string

Type implements Message interface

type RejectRequest

type RejectRequest struct {
	*BaseRequest
	PartyID         string
	InvitationToken string
}

RejectRequest contains user's reject request

func (RejectRequest) Type

func (RejectRequest) Type() string

Type implements Message interface

type RejectResponse

type RejectResponse struct {
	*BaseResponse
	PartyID string
}

RejectResponse contains result of user's reject request

func (RejectResponse) Type

func (RejectResponse) Type() string

Type implements Message interface

type RematchmakingNotif

type RematchmakingNotif struct {
	BanDuration int
}

RematchmakingNotif

func (RematchmakingNotif) Type

func (RematchmakingNotif) Type() string

Type implements Message interface

type RequestFriendsNotif

type RequestFriendsNotif struct {
	FriendID string
}

RequestFriendsNotif

func (RequestFriendsNotif) Type

func (RequestFriendsNotif) Type() string

Type implements Message interface

type RequestFriendsRequest

type RequestFriendsRequest struct {
	FriendID string
	*BaseResponse
}

RequestFriendsRequest

func (RequestFriendsRequest) Type

Type implements Message interface

type RequestFriendsResponse

type RequestFriendsResponse struct {
	*BaseResponse
}

RequestFriendsResponse

func (RequestFriendsResponse) Type

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

type ResetUserStatusRequest struct {
	UserID    string
	Namespace string
}

ResetUserStatusRequest request directly from client to reset user status when the client get disconnected

func (ResetUserStatusRequest) Type

Type implements Message interface

type SendChannelChatRequest

type SendChannelChatRequest struct {
	ChannelSlug string
	*BaseResponse
	Payload string
}

SendChannelChatRequest

func (SendChannelChatRequest) Len

func (c SendChannelChatRequest) Len() int

Len implements Chat interface

func (SendChannelChatRequest) Type

Type implements Message interface

type SendChannelChatResponse

type SendChannelChatResponse struct {
	*BaseResponse
}

SendChannelChatResponse

func (SendChannelChatResponse) Type

Type implements Message interface

type SendPartyNotifRequest

type SendPartyNotifRequest struct {
	*BaseRequest
	Topic   string
	Payload string
}

func (SendPartyNotifRequest) Type

type SendPartyNotifResponse

type SendPartyNotifResponse struct {
	*BaseResponse
}

func (SendPartyNotifResponse) Type

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

func (*Server) String

func (s *Server) String() string

type Session

type Session struct {
	ID      string `json:"id"`
	Region  string `json:"region"`
	*Server `json:"Server"`
}

Session represents a game session currently managed by the service

func (*Session) String

func (s *Session) String() string

type SessionResponse

type SessionResponse struct {
	Session *Session `json:"session"`
}

SessionResponse is the response for get server endpoint

type SetReadyConsentNotif

type SetReadyConsentNotif struct {
	MatchID string
	UserID  string
}

SetReadyConsentNotif

func (SetReadyConsentNotif) Type

Type implements Message interface

type SetReadyConsentRequest

type SetReadyConsentRequest struct {
	*BaseResponse
	MatchID string
}

SetReadyConsentRequest

func (SetReadyConsentRequest) Type

Type implements Message interface

type SetReadyConsentResponse

type SetReadyConsentResponse struct {
	*BaseResponse
}

SetReadyConsentResponse

func (SetReadyConsentResponse) Type

Type implements Message interface

type SetSessionAttributeRequest

type SetSessionAttributeRequest struct {
	*BaseResponse
	Key       string
	Namespace string
	Value     string
}

SetSessionAttributeRequest

func (SetSessionAttributeRequest) Type

Type implements Message interface

type SetSessionAttributeResponse

type SetSessionAttributeResponse struct {
	*BaseResponse
}

SetSessionAttributeResponse

func (SetSessionAttributeResponse) Type

Type implements Message interface

type SetUserStatusRequest

type SetUserStatusRequest struct {
	Activity     string
	Availability int
	*BaseResponse
}

SetUserStatusRequest

func (SetUserStatusRequest) Type

Type implements Message interface

type SetUserStatusResponse

type SetUserStatusResponse struct {
	*BaseResponse
}

SetUserStatusResponse

func (SetUserStatusResponse) Type

Type implements Message interface

type Shutdown

type Shutdown struct {
	Message string
}

Shutdown contains info of server shutting down

func (Shutdown) Type

func (Shutdown) Type() string

Type implements Message interface

type ShutdownNotif

type ShutdownNotif struct {
	Message string
}

ShutdownNotif

func (ShutdownNotif) Type

func (ShutdownNotif) Type() string

Type implements Message interface

type SignalingP2P

type SignalingP2P struct {
	*BaseRequest
	DestinationID string
	Message       string
}

SignalingP2P is message for signaling for game P2P connection request

func (SignalingP2P) Type

func (SignalingP2P) Type() string

Type implements Message interface

type SignalingP2PNotif

type SignalingP2PNotif struct {
	DestinationID string
	Message       string
}

SignalingP2PNotif

func (SignalingP2PNotif) Type

func (SignalingP2PNotif) Type() string

Type implements Message interface

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

Type implements Message interface

type StartMatchmakingResponse

type StartMatchmakingResponse struct {
	*BaseResponse
	Message string
}

StartMatchmakingResponse message message to reply start matchmaking request

func (StartMatchmakingResponse) Type

Type implements Message interface

type SystemComponentsStatus

type SystemComponentsStatus struct {
	Components map[string]bool
}

SystemComponentsStatus is the message of System Components Status

type TypeInfoRequestRequest

type TypeInfoRequestRequest struct {
	*BaseResponse
	Id string `json:"id"`
}

TypeInfoRequestRequest message command to get info

func (TypeInfoRequestRequest) Type

Type implements Message interface

type TypeInfoRequestResponse

type TypeInfoRequestResponse struct {
	*BaseResponse
}

TypeInfoRequestResponse message command to get info

type UnblockPlayerNotif

type UnblockPlayerNotif struct {
	UnblockedUserID string
	UserID          string
}

UnblockPlayerNotif

func (UnblockPlayerNotif) Type

func (UnblockPlayerNotif) Type() string

Type implements Message interface

type UnblockPlayerRequest

type UnblockPlayerRequest struct {
	*BaseResponse
	Namespace       string
	UnblockedUserID string
}

UnblockPlayerRequest

func (UnblockPlayerRequest) Type

Type implements Message interface

type UnblockPlayerResponse

type UnblockPlayerResponse struct {
	*BaseResponse
	Namespace       string
	UnblockedUserID string
}

UnblockPlayerResponse

func (UnblockPlayerResponse) Type

Type implements Message interface

type UnfriendNotif

type UnfriendNotif struct {
	FriendID string
}

UnfriendNotif

func (UnfriendNotif) Type

func (UnfriendNotif) Type() string

Type implements Message interface

type UnfriendRequest

type UnfriendRequest struct {
	FriendID string
	*BaseResponse
}

UnfriendRequest

func (UnfriendRequest) Type

func (UnfriendRequest) Type() string

Type implements Message interface

type UnfriendResponse

type UnfriendResponse struct {
	*BaseResponse
}

UnfriendResponse

func (UnfriendResponse) Type

func (UnfriendResponse) Type() string

Type implements Message interface

type UserBannedNotification

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

Type implements Message interface

type UserMetricRequest

type UserMetricRequest struct {
	*BaseResponse
}

UserMetricRequest

func (UserMetricRequest) Type

func (UserMetricRequest) Type() string

Type implements Message interface

type UserMetricResponse

type UserMetricResponse struct {
	*BaseResponse
	PlayerCount int
}

UserMetricResponse

func (UserMetricResponse) Type

func (UserMetricResponse) Type() string

Type implements Message interface

type UserStatusNotif

type UserStatusNotif struct {
	Activity     string
	Availability int
	LastSeenAt   string
	UserID       string
}

UserStatusNotif

func (UserStatusNotif) Type

func (UserStatusNotif) Type() string

Type implements Message interface

type UserUnbannedNotification

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL