gateway

package
v0.0.0-...-601de37 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageFilterType pubsub.MessageFilterKind = iota
	MessageFilterIgnoredSession
	MessageFilterPermissions
	MessageFilterRoom
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterMap

type FilterMap pubsub.FilterMap

func NewFilterMap

func NewFilterMap() FilterMap

func (FilterMap) WithIgnoredSession

func (m FilterMap) WithIgnoredSession(sessionId string) FilterMap

func (FilterMap) WithPermissions

func (m FilterMap) WithPermissions(perm permission.Permission) FilterMap

func (FilterMap) WithRoom

func (m FilterMap) WithRoom(roomId model.RoomId) FilterMap

func (FilterMap) WithType

func (m FilterMap) WithType(kind MessageType) FilterMap

type Message

type Message = pubsub.Message[resource.Packet]

func NewMessage

func NewMessage(payload resource.Packet, opts ...pubsub.FilterMap) *Message

type MessageTargetNode

type MessageTargetNode string

func NewNodeTarget

func NewNodeTarget(id string) MessageTargetNode

func (MessageTargetNode) Build

func (t MessageTargetNode) Build() string

type MessageTargetRoom

type MessageTargetRoom model.RoomId

func NewRoomTarget

func NewRoomTarget(id model.RoomId) MessageTargetRoom

func (MessageTargetRoom) Build

func (t MessageTargetRoom) Build() string

type MessageTargetSession

type MessageTargetSession string

func NewSessionTarget

func NewSessionTarget(id string) MessageTargetSession

func (MessageTargetSession) Build

func (t MessageTargetSession) Build() string

type MessageTargetUser

type MessageTargetUser model.UserId

func NewUserTarget

func NewUserTarget(id model.UserId) MessageTargetUser

func (MessageTargetUser) Build

func (t MessageTargetUser) Build() string

type MessageType

type MessageType int
const (
	NormalMessage MessageType = iota
	ServerMessage
)

type SubscriptionManager

type SubscriptionManager = pubsub.SubscriptionManager[*Message]

func NewSubscriptionManager

func NewSubscriptionManager(client pubsub.Client) *SubscriptionManager

Jump to

Keyboard shortcuts

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