xginxim

package
v0.2.31 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: BSD-3-Clause-Clear Imports: 11 Imported by: 0

Documentation

Overview

XIM服务组件,用于提供xim的功能性接口

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Regedit

func Regedit(r *gin.RouterGroup, c *xim.Config) func(c *gin.Context)

注入IM相关的路由和基础配置 此组件中并未有获取个人信息的接口,请在外部手动封装根据uid获取用户详情信息的接口

r	分组路由
c	XIM配置项信息,如果提前注入了此处可以传nil

PS: 此服务使用了 c.GetUint("uid")>0 的鉴权,所以注入时请先在其他中间件中将uid设置到c变量中

func XSendWebsocketMessage

func XSendWebsocketMessage(uid uint, inf *xgin.Response)

发送IM消息服务

uid	用户ID
inf	发送内容

Types

type Pages

type Pages struct {
	InputPage  json.Number `json:"page" form:"page"`
	InputLimit json.Number `json:"limit" form:"limit"`
}

分页结构体

func (*Pages) Limit

func (p *Pages) Limit() int

limit条数(默认10)

func (*Pages) Offset

func (p *Pages) Offset() int

获取条数

func (*Pages) Page

func (p *Pages) Page() int

page页码

Jump to

Keyboard shortcuts

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