Documentation ¶
Index ¶
- type Room
- func (r *Room) GetCustomGameSetting() *anypb.Any
- func (r *Room) GetGameName() string
- func (r *Room) GetProvider() d.Provider
- func (r *Room) GetRoomID() int32
- func (r *Room) GetState() d.RoomState
- func (r *Room) GetUserState(user d.User) (d.UserState, error)
- func (r *Room) GetUsers() []d.User
- func (r *Room) Lock()
- func (r *Room) Restart() error
- func (r *Room) SetCustomGameSetting(setting *anypb.Any)
- func (r *Room) SetProvider(provider d.Provider)
- func (r *Room) Unlock()
- func (r *Room) UserExit(user d.User) (bool, error)
- func (r *Room) UserJoin(user d.User) error
- func (r *Room) UserReady(user d.User, isReady bool) error
- type Storage
- func (s *Storage) CreateRoom() (d.Room, error)
- func (s *Storage) CreateToken(user d.User) (d.Token, error)
- func (s *Storage) CreateUser(userName string, passwd string) error
- func (s *Storage) DelRoom(roomID int32) error
- func (s *Storage) DelToken(key string) error
- func (s *Storage) DelUser(userName string) error
- func (s *Storage) FindProvider(providerID string) (d.Provider, error)
- func (s *Storage) FindProviderByGame(gameName string) []d.Provider
- func (s *Storage) FindRoom(roomID int32) (d.Room, error)
- func (s *Storage) FindToken(key string) (d.Token, error)
- func (s *Storage) FindUser(userName string, passwd string) (d.User, error)
- func (s *Storage) GetProviders() []d.Provider
- func (s *Storage) GetRooms() []d.Room
- func (s *Storage) GetRoomsWithFilter(is func(d.Room) bool) []d.Room
- func (s *Storage) GetUsers() []d.User
- func (s *Storage) IsUserExist(userName string) bool
- func (s *Storage) RegisterProvider(provider d.Provider) error
- func (s *Storage) UnRegisterProvider(p d.Provider) error
- type Token
- type User
- func (u *User) GetConn() (interface{}, error)
- func (u *User) GetDisplayName() string
- func (u *User) GetRoom() (d.Room, error)
- func (u *User) GetTemporaryID() uint32
- func (u *User) GetUserName() string
- func (u *User) Lock()
- func (u *User) SetConn(conn interface{})
- func (u *User) SetDisplayName(displayName string) error
- func (u *User) SetPasswd(oldPasswd string, newPasswd string) error
- func (u *User) SetRoom(room d.Room) error
- func (u *User) SetTemporaryID(tid uint32)
- func (u *User) Unlock()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Room ¶
type Room struct {
// contains filtered or unexported fields
}
func (*Room) GetCustomGameSetting ¶ added in v1.4.0
func (*Room) GetGameName ¶
func (*Room) GetProvider ¶
func (*Room) GetUserState ¶ added in v1.1.0
func (*Room) SetCustomGameSetting ¶ added in v1.4.0
func (*Room) SetProvider ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func NewStorage() *Storage
func (*Storage) FindProvider ¶
func (*Storage) FindProviderByGame ¶
func (*Storage) GetProviders ¶
func (*Storage) GetRoomsWithFilter ¶
func (*Storage) IsUserExist ¶ added in v1.1.1
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func (*Token) GetUserName ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) GetDisplayName ¶
func (*User) GetTemporaryID ¶
func (*User) GetUserName ¶
func (*User) SetDisplayName ¶
func (*User) SetTemporaryID ¶
Click to show internal directories.
Click to hide internal directories.