storage

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnlineUserMemoryStore

type OnlineUserMemoryStore struct {
	// contains filtered or unexported fields
}

func NewOnlineUserMemoryStore

func NewOnlineUserMemoryStore() *OnlineUserMemoryStore

func (*OnlineUserMemoryStore) AddUser

func (o *OnlineUserMemoryStore) AddUser(uniqueId string, groupId string, socketId int, data interface{}) bool

func (*OnlineUserMemoryStore) GetDataFromSocketId

func (o *OnlineUserMemoryStore) GetDataFromSocketId(socketId int) interface{}

func (*OnlineUserMemoryStore) GetGroupIdFromSocketId

func (o *OnlineUserMemoryStore) GetGroupIdFromSocketId(socketId int) string

func (*OnlineUserMemoryStore) GetGroupIdList

func (o *OnlineUserMemoryStore) GetGroupIdList() []string

func (*OnlineUserMemoryStore) GetSocketIdListFromGroupId

func (o *OnlineUserMemoryStore) GetSocketIdListFromGroupId(groupId string) []int

func (*OnlineUserMemoryStore) GetSocketIdListFromUniqueId

func (o *OnlineUserMemoryStore) GetSocketIdListFromUniqueId(uniqueId string) []int

func (*OnlineUserMemoryStore) GetTotalGroupId

func (o *OnlineUserMemoryStore) GetTotalGroupId() int

func (*OnlineUserMemoryStore) GetTotalUniqueId

func (o *OnlineUserMemoryStore) GetTotalUniqueId() int

func (*OnlineUserMemoryStore) GetUniqueIdFromSocketId

func (o *OnlineUserMemoryStore) GetUniqueIdFromSocketId(socketId int) string

func (*OnlineUserMemoryStore) GetUniqueIdList

func (o *OnlineUserMemoryStore) GetUniqueIdList() []string

func (*OnlineUserMemoryStore) IsGroupExists

func (o *OnlineUserMemoryStore) IsGroupExists(groupId string) bool

func (*OnlineUserMemoryStore) IsUniqueIdExists

func (o *OnlineUserMemoryStore) IsUniqueIdExists(uniqueId string) bool

func (*OnlineUserMemoryStore) RemoveUser

func (o *OnlineUserMemoryStore) RemoveUser(socketId int) bool

type OnlineUserStore

type OnlineUserStore interface {
	AddUser(uniqueId string, groupId string, socketId int, data interface{}) bool
	RemoveUser(socketId int) bool

	GetUniqueIdFromSocketId(socketId int) string
	GetSocketIdListFromUniqueId(uniqueId string) []int

	GetDataFromSocketId(socketId int) interface{}

	GetGroupIdFromSocketId(socketId int) string
	GetSocketIdListFromGroupId(groupId string) []int

	IsGroupExists(groupId string) bool
	IsUniqueIdExists(uniqueId string) bool

	GetGroupIdList() []string
	GetUniqueIdList() []string

	GetTotalGroupId() int
	GetTotalUniqueId() int
}

Jump to

Keyboard shortcuts

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