Documentation ¶
Index ¶
- Variables
- func CreateSession(gameId string, userId int32) string
- type CloudFiles
- type CloudfilesIndex
- type Credential
- type Credentials
- type Game
- type MainAdvertisement
- func (adv *MainAdvertisement) AddMessage(broadcast bool, content string, typeId uint8, sender *MainUser, ...) *MainMessage
- func (adv *MainAdvertisement) Encode(gameId string) i.A
- func (adv *MainAdvertisement) EncodePeers() i.A
- func (adv *MainAdvertisement) GetAppBinaryChecksum() int32
- func (adv *MainAdvertisement) GetDataChecksum() int32
- func (adv *MainAdvertisement) GetDescription() string
- func (adv *MainAdvertisement) GetHost() *MainUser
- func (adv *MainAdvertisement) GetId() int32
- func (adv *MainAdvertisement) GetIp() string
- func (adv *MainAdvertisement) GetJoinable() bool
- func (adv *MainAdvertisement) GetMatchType() uint8
- func (adv *MainAdvertisement) GetModDllChecksum() int32
- func (adv *MainAdvertisement) GetModDllFile() string
- func (adv *MainAdvertisement) GetModName() string
- func (adv *MainAdvertisement) GetModVersion() string
- func (adv *MainAdvertisement) GetObserversDelay() uint32
- func (adv *MainAdvertisement) GetPasswordValue() string
- func (adv *MainAdvertisement) GetPeer(user *MainUser) (*MainPeer, bool)
- func (adv *MainAdvertisement) GetPeers() *orderedmap.OrderedMap[*MainUser, *MainPeer]
- func (adv *MainAdvertisement) GetPlatformSessionId() uint64
- func (adv *MainAdvertisement) GetRelayRegion() string
- func (adv *MainAdvertisement) GetStartTime() int64
- func (adv *MainAdvertisement) GetState() int8
- func (adv *MainAdvertisement) GetVersionFlags() uint32
- func (adv *MainAdvertisement) GetVisible() bool
- func (adv *MainAdvertisement) UpdatePeer(user *MainUser, race int32, team int32)
- func (adv *MainAdvertisement) UpdatePlatformSessionId(sessionId uint64)
- func (adv *MainAdvertisement) UpdateState(state int8)
- type MainAdvertisements
- func (advs *MainAdvertisements) Delete(adv *MainAdvertisement)
- func (advs *MainAdvertisements) FindAdvertisements(matches func(adv *MainAdvertisement) bool) []*MainAdvertisement
- func (advs *MainAdvertisements) FindAdvertisementsEncoded(gameId string, matches func(adv *MainAdvertisement) bool) []i.A
- func (advs *MainAdvertisements) GetAdvertisement(id int32) (*MainAdvertisement, bool)
- func (advs *MainAdvertisements) Initialize(users *MainUsers)
- func (advs *MainAdvertisements) NewPeer(adv *MainAdvertisement, u *MainUser, race int32, team int32) *MainPeer
- func (advs *MainAdvertisements) RemovePeer(adv *MainAdvertisement, user *MainUser)
- func (advs *MainAdvertisements) Store(advFrom *shared.AdvertisementHostRequest) *MainAdvertisement
- func (advs *MainAdvertisements) Update(adv *MainAdvertisement, advFrom *shared.AdvertisementUpdateRequest)
- type MainChatChannel
- func (channel *MainChatChannel) AddMessage(sender *MainUser, text string)
- func (channel *MainChatChannel) AddUser(user *MainUser) internal.A
- func (channel *MainChatChannel) Encode() internal.A
- func (channel *MainChatChannel) EncodeUsers() internal.A
- func (channel *MainChatChannel) GetId() int32
- func (channel *MainChatChannel) GetName() string
- func (channel *MainChatChannel) GetUsers() []*MainUser
- func (channel *MainChatChannel) HasUser(user *MainUser) bool
- func (channel *MainChatChannel) RemoveUser(user *MainUser)
- type MainChatChannelMessage
- type MainChatChannels
- type MainGame
- type MainMessage
- func (message *MainMessage) Encode() i.A
- func (message *MainMessage) GetAdvertisementId() int32
- func (message *MainMessage) GetBroadcast() bool
- func (message *MainMessage) GetContent() string
- func (message *MainMessage) GetReceivers() []*MainUser
- func (message *MainMessage) GetSender() *MainUser
- func (message *MainMessage) GetTime() int64
- func (message *MainMessage) GetType() uint8
- type MainPeer
- func (peer *MainPeer) Encode() i.A
- func (peer *MainPeer) GetAdvertisementId() int32
- func (peer *MainPeer) GetRace() int32
- func (peer *MainPeer) GetTeam() int32
- func (peer *MainPeer) GetUser() *MainUser
- func (peer *MainPeer) Invite(user *MainUser)
- func (peer *MainPeer) IsInvited(user *MainUser) bool
- func (peer *MainPeer) Uninvite(user *MainUser)
- func (peer *MainPeer) Update(race int32, team int32)
- type MainResources
- type MainUser
- func (u *MainUser) GetAdvertisement() *MainAdvertisement
- func (u *MainUser) GetAlias() string
- func (u *MainUser) GetChannels() []*MainChatChannel
- func (u *MainUser) GetExtraProfileInfo() i.A
- func (u *MainUser) GetId() int32
- func (u *MainUser) GetPlatformId() int
- func (u *MainUser) GetPlatformPath() string
- func (u *MainUser) GetPlatformUserID() uint64
- func (u *MainUser) GetPresence() int8
- func (u *MainUser) GetProfileId() int32
- func (u *MainUser) GetProfileInfo(includePresence bool) i.A
- func (u *MainUser) GetProfileMetadata() string
- func (u *MainUser) GetProfileUintFlag1() uint8
- func (u *MainUser) GetProfileUintFlag2() uint8
- func (u *MainUser) GetReliclink() int32
- func (u *MainUser) GetStatId() int32
- func (u *MainUser) JoinChatChannel(channel *MainChatChannel) i.A
- func (u *MainUser) LeaveChatChannel(channel *MainChatChannel)
- func (u *MainUser) SendChatChannelMessage(channel *MainChatChannel, text string)
- func (u *MainUser) SetAdvertisement(adv *MainAdvertisement)
- func (u *MainUser) SetPresence(value int8)
- type MainUsers
- func (users *MainUsers) GetOrCreateUser(gameId string, remoteAddr string, isXbox bool, platformUserId uint64, ...) *MainUser
- func (users *MainUsers) GetProfileInfo(includePresence bool, matches func(user *MainUser) bool) []i.A
- func (users *MainUsers) GetUserById(id int32) (*MainUser, bool)
- func (users *MainUsers) GetUserByStatId(id int32) (*MainUser, bool)
- func (users *MainUsers) GetUserIds() []int32
- func (users *MainUsers) Initialize()
- type ModDll
- type Observers
- type Password
- type Session
- func (sess *Session) AddMessage(message internal.A)
- func (sess *Session) Delete()
- func (sess *Session) GetGameId() string
- func (sess *Session) GetId() string
- func (sess *Session) GetUserId() int32
- func (sess *Session) ResetExpiryTimer()
- func (sess *Session) WaitForMessages(ackNum uint) (uint, []internal.A)
Constants ¶
This section is empty.
Variables ¶
View Source
var CloudFolder = filepath.Join(responsesFolder, "cloud")
Functions ¶
func CreateSession ¶
Types ¶
type CloudFiles ¶
type CloudFiles struct { Value map[string]CloudfilesIndex Credentials *Credentials // contains filtered or unexported fields }
func BuildCloudfilesIndex ¶
func BuildCloudfilesIndex(configFolder string, baseFolder string) *CloudFiles
func (*CloudFiles) GetByKey ¶
func (m *CloudFiles) GetByKey(key string) (string, *CloudfilesIndex, bool)
type CloudfilesIndex ¶
type Credential ¶
type Credential struct {
// contains filtered or unexported fields
}
func (*Credential) Expired ¶
func (cred *Credential) Expired() bool
func (*Credential) GetExpiry ¶
func (cred *Credential) GetExpiry() time.Time
func (*Credential) GetKey ¶
func (cred *Credential) GetKey() string
func (*Credential) GetSignature ¶
func (cred *Credential) GetSignature() string
type Credentials ¶
type Credentials struct {
// contains filtered or unexported fields
}
func (*Credentials) CreateCredentials ¶
func (creds *Credentials) CreateCredentials(key string) *Credential
func (*Credentials) Delete ¶
func (creds *Credentials) Delete(signature string)
func (*Credentials) GetCredentials ¶
func (creds *Credentials) GetCredentials(signature string) (*Credential, bool)
func (*Credentials) Initialize ¶
func (creds *Credentials) Initialize()
type Game ¶
type Game interface { Resources() *MainResources Users() *MainUsers Advertisements() *MainAdvertisements ChatChannels() *MainChatChannels Title() string }
type MainAdvertisement ¶
type MainAdvertisement struct {
// contains filtered or unexported fields
}
func (*MainAdvertisement) AddMessage ¶
func (adv *MainAdvertisement) AddMessage(broadcast bool, content string, typeId uint8, sender *MainUser, receivers []*MainUser) *MainMessage
func (*MainAdvertisement) EncodePeers ¶
func (adv *MainAdvertisement) EncodePeers() i.A
func (*MainAdvertisement) GetAppBinaryChecksum ¶
func (adv *MainAdvertisement) GetAppBinaryChecksum() int32
func (*MainAdvertisement) GetDataChecksum ¶
func (adv *MainAdvertisement) GetDataChecksum() int32
func (*MainAdvertisement) GetDescription ¶
func (adv *MainAdvertisement) GetDescription() string
func (*MainAdvertisement) GetHost ¶
func (adv *MainAdvertisement) GetHost() *MainUser
func (*MainAdvertisement) GetId ¶
func (adv *MainAdvertisement) GetId() int32
func (*MainAdvertisement) GetIp ¶
func (adv *MainAdvertisement) GetIp() string
func (*MainAdvertisement) GetJoinable ¶
func (adv *MainAdvertisement) GetJoinable() bool
func (*MainAdvertisement) GetMatchType ¶
func (adv *MainAdvertisement) GetMatchType() uint8
func (*MainAdvertisement) GetModDllChecksum ¶
func (adv *MainAdvertisement) GetModDllChecksum() int32
func (*MainAdvertisement) GetModDllFile ¶
func (adv *MainAdvertisement) GetModDllFile() string
func (*MainAdvertisement) GetModName ¶
func (adv *MainAdvertisement) GetModName() string
func (*MainAdvertisement) GetModVersion ¶
func (adv *MainAdvertisement) GetModVersion() string
func (*MainAdvertisement) GetObserversDelay ¶ added in v1.6.0
func (adv *MainAdvertisement) GetObserversDelay() uint32
func (*MainAdvertisement) GetPasswordValue ¶
func (adv *MainAdvertisement) GetPasswordValue() string
func (*MainAdvertisement) GetPeer ¶
func (adv *MainAdvertisement) GetPeer(user *MainUser) (*MainPeer, bool)
func (*MainAdvertisement) GetPeers ¶
func (adv *MainAdvertisement) GetPeers() *orderedmap.OrderedMap[*MainUser, *MainPeer]
func (*MainAdvertisement) GetPlatformSessionId ¶
func (adv *MainAdvertisement) GetPlatformSessionId() uint64
func (*MainAdvertisement) GetRelayRegion ¶
func (adv *MainAdvertisement) GetRelayRegion() string
func (*MainAdvertisement) GetStartTime ¶
func (adv *MainAdvertisement) GetStartTime() int64
func (*MainAdvertisement) GetState ¶
func (adv *MainAdvertisement) GetState() int8
func (*MainAdvertisement) GetVersionFlags ¶
func (adv *MainAdvertisement) GetVersionFlags() uint32
func (*MainAdvertisement) GetVisible ¶
func (adv *MainAdvertisement) GetVisible() bool
func (*MainAdvertisement) UpdatePeer ¶
func (adv *MainAdvertisement) UpdatePeer(user *MainUser, race int32, team int32)
func (*MainAdvertisement) UpdatePlatformSessionId ¶
func (adv *MainAdvertisement) UpdatePlatformSessionId(sessionId uint64)
func (*MainAdvertisement) UpdateState ¶
func (adv *MainAdvertisement) UpdateState(state int8)
type MainAdvertisements ¶
type MainAdvertisements struct {
// contains filtered or unexported fields
}
func (*MainAdvertisements) Delete ¶
func (advs *MainAdvertisements) Delete(adv *MainAdvertisement)
func (*MainAdvertisements) FindAdvertisements ¶
func (advs *MainAdvertisements) FindAdvertisements(matches func(adv *MainAdvertisement) bool) []*MainAdvertisement
func (*MainAdvertisements) FindAdvertisementsEncoded ¶
func (advs *MainAdvertisements) FindAdvertisementsEncoded(gameId string, matches func(adv *MainAdvertisement) bool) []i.A
func (*MainAdvertisements) GetAdvertisement ¶
func (advs *MainAdvertisements) GetAdvertisement(id int32) (*MainAdvertisement, bool)
func (*MainAdvertisements) Initialize ¶
func (advs *MainAdvertisements) Initialize(users *MainUsers)
func (*MainAdvertisements) NewPeer ¶
func (advs *MainAdvertisements) NewPeer(adv *MainAdvertisement, u *MainUser, race int32, team int32) *MainPeer
func (*MainAdvertisements) RemovePeer ¶
func (advs *MainAdvertisements) RemovePeer(adv *MainAdvertisement, user *MainUser)
func (*MainAdvertisements) Store ¶
func (advs *MainAdvertisements) Store(advFrom *shared.AdvertisementHostRequest) *MainAdvertisement
func (*MainAdvertisements) Update ¶
func (advs *MainAdvertisements) Update(adv *MainAdvertisement, advFrom *shared.AdvertisementUpdateRequest)
type MainChatChannel ¶
func (*MainChatChannel) AddMessage ¶
func (channel *MainChatChannel) AddMessage(sender *MainUser, text string)
func (*MainChatChannel) AddUser ¶
func (channel *MainChatChannel) AddUser(user *MainUser) internal.A
func (*MainChatChannel) Encode ¶
func (channel *MainChatChannel) Encode() internal.A
func (*MainChatChannel) EncodeUsers ¶
func (channel *MainChatChannel) EncodeUsers() internal.A
func (*MainChatChannel) GetId ¶
func (channel *MainChatChannel) GetId() int32
func (*MainChatChannel) GetName ¶
func (channel *MainChatChannel) GetName() string
func (*MainChatChannel) GetUsers ¶
func (channel *MainChatChannel) GetUsers() []*MainUser
func (*MainChatChannel) HasUser ¶
func (channel *MainChatChannel) HasUser(user *MainUser) bool
func (*MainChatChannel) RemoveUser ¶
func (channel *MainChatChannel) RemoveUser(user *MainUser)
type MainChatChannelMessage ¶
type MainChatChannelMessage struct {
// contains filtered or unexported fields
}
type MainChatChannels ¶
type MainChatChannels struct {
// contains filtered or unexported fields
}
func (*MainChatChannels) Encode ¶
func (channels *MainChatChannels) Encode() internal.A
func (*MainChatChannels) GetById ¶
func (channels *MainChatChannels) GetById(id int32) (*MainChatChannel, bool)
func (*MainChatChannels) Initialize ¶
func (channels *MainChatChannels) Initialize(chatChannels map[string]MainChatChannel)
type MainGame ¶
type MainGame struct {
// contains filtered or unexported fields
}
func (*MainGame) Advertisements ¶
func (g *MainGame) Advertisements() *MainAdvertisements
func (*MainGame) ChatChannels ¶
func (g *MainGame) ChatChannels() *MainChatChannels
func (*MainGame) Resources ¶
func (g *MainGame) Resources() *MainResources
type MainMessage ¶
type MainMessage struct {
// contains filtered or unexported fields
}
func (*MainMessage) Encode ¶
func (message *MainMessage) Encode() i.A
func (*MainMessage) GetAdvertisementId ¶
func (message *MainMessage) GetAdvertisementId() int32
func (*MainMessage) GetBroadcast ¶
func (message *MainMessage) GetBroadcast() bool
func (*MainMessage) GetContent ¶
func (message *MainMessage) GetContent() string
func (*MainMessage) GetReceivers ¶
func (message *MainMessage) GetReceivers() []*MainUser
func (*MainMessage) GetSender ¶
func (message *MainMessage) GetSender() *MainUser
func (*MainMessage) GetTime ¶
func (message *MainMessage) GetTime() int64
func (*MainMessage) GetType ¶
func (message *MainMessage) GetType() uint8
type MainPeer ¶
type MainPeer struct {
// contains filtered or unexported fields
}
func (*MainPeer) GetAdvertisementId ¶
type MainResources ¶
type MainResources struct { Login *orderedmap.OrderedMap[string, string] ChatChannels map[string]MainChatChannel LoginData []i.A ArrayFiles map[string]i.A KeyedFiles map[string][]byte CloudFiles CloudFiles // contains filtered or unexported fields }
func (*MainResources) Initialize ¶
func (r *MainResources) Initialize(gameId string, keyedFilenames mapset.Set[string])
func (*MainResources) ReturnSignedAsset ¶
func (r *MainResources) ReturnSignedAsset(name string, w *http.ResponseWriter, req *http.Request, keyedResponse bool)
type MainUser ¶
type MainUser struct {
// contains filtered or unexported fields
}
func (*MainUser) GetAdvertisement ¶
func (u *MainUser) GetAdvertisement() *MainAdvertisement
func (*MainUser) GetChannels ¶
func (u *MainUser) GetChannels() []*MainChatChannel
func (*MainUser) GetExtraProfileInfo ¶
func (*MainUser) GetPlatformId ¶
func (*MainUser) GetPlatformPath ¶
func (*MainUser) GetPlatformUserID ¶
func (*MainUser) GetPresence ¶
func (*MainUser) GetProfileId ¶
func (*MainUser) GetProfileMetadata ¶
func (*MainUser) GetProfileUintFlag1 ¶
func (*MainUser) GetProfileUintFlag2 ¶ added in v1.6.0
func (*MainUser) GetReliclink ¶
func (*MainUser) JoinChatChannel ¶
func (u *MainUser) JoinChatChannel(channel *MainChatChannel) i.A
func (*MainUser) LeaveChatChannel ¶
func (u *MainUser) LeaveChatChannel(channel *MainChatChannel)
func (*MainUser) SendChatChannelMessage ¶
func (u *MainUser) SendChatChannelMessage(channel *MainChatChannel, text string)
func (*MainUser) SetAdvertisement ¶
func (u *MainUser) SetAdvertisement(adv *MainAdvertisement)
func (*MainUser) SetPresence ¶
type MainUsers ¶
type MainUsers struct {
// contains filtered or unexported fields
}
func (*MainUsers) GetOrCreateUser ¶
func (*MainUsers) GetProfileInfo ¶
func (*MainUsers) GetUserByStatId ¶
func (*MainUsers) GetUserIds ¶
func (*MainUsers) Initialize ¶
func (users *MainUsers) Initialize()
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func GetSessionById ¶
func GetSessionByUserId ¶
func (*Session) AddMessage ¶
func (*Session) ResetExpiryTimer ¶
func (sess *Session) ResetExpiryTimer()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.