entity

package
v0.0.0-...-e849032 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFoundRoom = errors.New("not found room")
)

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) AddRoom

func (m *Manager) AddRoom(room *Room) int32

AddRoom 添加房间

func (*Manager) DelRoom

func (m *Manager) DelRoom(id int32)

DelRoom 删除房间

func (*Manager) GetRoom

func (m *Manager) GetRoom(id int32) (*Room, error)

GetRoom 获取房间

func (*Manager) HasRoom

func (m *Manager) HasRoom(name string) bool

HasRoom 是否存在房间

type Room

type Room struct {
	ID   int32  `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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