tailchat

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ID = "tailchat"

Variables

This section is empty.

Functions

func HandleHttp

func HandleHttp(c *fiber.Ctx) error

func HandleWebsocket

func HandleWebsocket(stop <-chan bool)

Types

type Payload

type Payload struct {
	ID      string `json:"_id"`
	UserID  string `json:"userId"`
	Type    string `json:"type"`
	Payload struct {
		GroupID             string `json:"groupId"`
		ConverseID          string `json:"converseId"`
		MessageID           string `json:"messageId"`
		MessageAuthor       string `json:"messageAuthor"`
		MessageSnippet      string `json:"messageSnippet"`
		MessagePlainContent string `json:"messagePlainContent"`
	} `json:"payload"`
	Readed    bool      `json:"readed"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	V         int       `json:"__v"`
}

type SendMessageData

type SendMessageData struct {
	ConverseId string          `json:"converseId"`
	GroupId    string          `json:"groupId"`
	Content    string          `json:"content"`
	Plain      string          `json:"plain"`
	Meta       SendMessageMeta `json:"meta"`
}

type SendMessageMeta

type SendMessageMeta struct {
	Mentions []string         `json:"mentions"`
	Reply    SendMessageReply `json:"reply"`
}

type SendMessageReply

type SendMessageReply struct {
	Id      string `json:"_id"`
	Author  string `json:"author"`
	Content string `json:"content"`
}

type TokenResponse

type TokenResponse struct {
	Data struct {
		Jwt string `json:"jwt"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

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