api

package
v1.23.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGinServer

func NewGinServer(opts *options.Options, database *database.Database, redis *redis.Client, ms *switcher.MessageSwitcher) (*gin.Engine, error)

func RunGinServer

func RunGinServer(ctx context.Context, options *options.Options, db *database.Database, redis *redis.Client, ms *switcher.MessageSwitcher) error

Types

type MessageHandler

type MessageHandler struct {
	*aaa.UserInfoHandler
	Switcher *switcher.MessageSwitcher
}

func (*MessageHandler) HandleMessage

func (m *MessageHandler) HandleMessage(ctx context.Context, ms *switcher.MessageSwitcher, nu *switcher.NotifyUser)

func (*MessageHandler) MessageCenter

func (m *MessageHandler) MessageCenter(c *gin.Context)

@Tags MSGBUS @Summary 消息中心(websocket) @Description 消息中心(websocket) @Accept json @Produce json @Success 200 {object} object "stream" @Router /realtime/v2/msgbus/notify [get] @Security JWT

func (*MessageHandler) RegistRouter

func (m *MessageHandler) RegistRouter(rg *gin.RouterGroup)

func (*MessageHandler) SendMessages

func (m *MessageHandler) SendMessages(c *gin.Context)

@Tags MSGBUS @Summary 发送消息 @Description 发送消息 @Accept json @Produce json @Param param body msgbus.MessageTarget true "消息" @Success 200 {object} object "stream" @Router /realtime/v2/msgbus/send [post] @Security JWT

Jump to

Keyboard shortcuts

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