websocket

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserInfo

func NewUserInfo(userID, orgID string, isAdmin bool, perms []string) *userInfo

Types

type Mgr

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

func NewMgr

func NewMgr() *Mgr

func (*Mgr) Broadcast

func (m *Mgr) Broadcast(msg interface{})

func (*Mgr) CloseUsers

func (m *Mgr) CloseUsers(userIDs []string)

func (*Mgr) HandleWebSocket

func (m *Mgr) HandleWebSocket(ctx *gin.Context, user *userInfo) error

func (*Mgr) Run

func (m *Mgr) Run() error

func (*Mgr) SendByPerm

func (m *Mgr) SendByPerm(msg interface{}, orgID, perm string)

func (*Mgr) SendToUsers

func (m *Mgr) SendToUsers(msg interface{}, userIDs []string)

func (*Mgr) Stop

func (m *Mgr) Stop()

Jump to

Keyboard shortcuts

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