api

package
v0.0.0-...-3cdc2b7 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	*nsq.Message
	// logger  *log.Logger
	Content []byte
}

func NewMessage

func NewMessage(m *nsq.Message, c []byte) *Message

func (*Message) Body

func (m *Message) Body() []byte

func (*Message) OnError

func (m *Message) OnError(err error)

func (*Message) OnSuccess

func (m *Message) OnSuccess()

type OutMessage

type OutMessage struct {
	// From *OutUser `json:"from"`
	ID           string `json:"id"`
	FromID       uint   `json:"from_id"`
	FromName     string `json:"from_name"`
	FromImageURL string `json:"from_image_url"`
	Dst          uint   `json:"dst"`
	DstType      string `json:"dst_type"` // "group" | "personal"
	Content      string `json:"content"`
	Timestamp    int64  `json:"timestamp"`
}

type OutUser

type OutUser struct {
	model.Base
	Username    string `json:"username"`
	Displayname string `json:"displayname"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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