Add HTTP /v1 MVC, TCP send path, groups with server-side member-avatar collage, object-storage upload, and friends/favorites around the architecture-v3 layout. Co-authored-by: Cursor <cursoragent@cursor.com>
31 lines
844 B
Go
31 lines
844 B
Go
// Package entity holds deliver-queue job types.
|
|
package entity
|
|
|
|
// Job is a fanout unit. ExcludeDevice is the sender device. NotMailbox matches BFF NotSaveIch.
|
|
type Job struct {
|
|
MsgID int64 `json:"msg_id"`
|
|
Cmd uint16 `json:"cmd"`
|
|
ConversationID int64 `json:"conversation_id"`
|
|
FromUserID int64 `json:"from_user_id"`
|
|
FromDeviceID uint64 `json:"from_device_id"`
|
|
ExcludeDevice uint64 `json:"exclude_device"`
|
|
ToUserIDs []int64 `json:"to_user_ids,omitempty"`
|
|
NotPush bool `json:"not_push,omitempty"`
|
|
NotMailbox bool `json:"not_mailbox,omitempty"`
|
|
Payload []byte `json:"payload,omitempty"`
|
|
raw []byte `json:"-"`
|
|
}
|
|
|
|
func (j *Job) Raw() []byte {
|
|
if j == nil {
|
|
return nil
|
|
}
|
|
return j.raw
|
|
}
|
|
|
|
func (j *Job) SetRaw(raw []byte) {
|
|
if j != nil {
|
|
j.raw = raw
|
|
}
|
|
}
|