Documentation
¶
Index ¶
- type Entity
- func (e *Entity) ClaimThread(ctx context.Context, channelID, messageID, threadID int64) (bool, int64, error)
- func (e *Entity) CreateMessage(ctx context.Context, id, channelID, userID int64, content string, ...) error
- func (e *Entity) CreateMessageWithMeta(ctx context.Context, id, channelID, userID int64, content string, ...) error
- func (e *Entity) CreateSystemMessage(ctx context.Context, id, channelID, userID int64, content string, ...) error
- func (e *Entity) CreateThreadCreatedMessageRef(ctx context.Context, threadID, channelID, messageID int64) error
- func (e *Entity) DeleteChannelMessages(ctx context.Context, channelID, lastID int64) error
- func (e *Entity) DeleteMessage(ctx context.Context, id, channelID int64) error
- func (e *Entity) DeleteThreadCreatedMessageRef(ctx context.Context, threadID int64) error
- func (e *Entity) GetChannelMessagesByIDs(ctx context.Context, channelID int64, ids []int64) ([]model.Message, error)
- func (e *Entity) GetMessage(ctx context.Context, id, channelID int64) (model.Message, error)
- func (e *Entity) GetMessagesAfter(ctx context.Context, channelID, msgID, lastChannelMessage int64, limit int) ([]model.Message, []int64, error)
- func (e *Entity) GetMessagesAround(ctx context.Context, channelID, msgID, lastChannelMessage int64, limit int) ([]model.Message, []int64, error)
- func (e *Entity) GetMessagesBefore(ctx context.Context, channelID, msgID int64, limit int) ([]model.Message, []int64, error)
- func (e *Entity) GetMessagesList(ctx context.Context, msgIDs []int64) ([]model.Message, error)
- func (e *Entity) GetThreadCreatedMessageRef(ctx context.Context, threadID int64) (int64, int64, error)
- func (e *Entity) ReleaseThreadClaim(ctx context.Context, channelID, messageID int64) error
- func (e *Entity) SetThread(ctx context.Context, id, channelID, threadID int64) error
- func (e *Entity) UpdateGeneratedEmbeds(ctx context.Context, id, channelID int64, autoEmbedsJSON string) error
- func (e *Entity) UpdateMessage(ctx context.Context, id, channelID int64, ...) error
- func (e *Entity) UpdateMessageContent(ctx context.Context, id, channelID int64, content string) error
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct {
// contains filtered or unexported fields
}
func (*Entity) ClaimThread ¶ added in v1.8.0
func (*Entity) CreateMessage ¶
func (*Entity) CreateMessageWithMeta ¶ added in v1.8.0
func (*Entity) CreateSystemMessage ¶ added in v1.5.0
func (*Entity) CreateThreadCreatedMessageRef ¶ added in v1.8.0
func (*Entity) DeleteChannelMessages ¶
func (*Entity) DeleteMessage ¶
func (*Entity) DeleteThreadCreatedMessageRef ¶ added in v1.8.0
func (*Entity) GetChannelMessagesByIDs ¶
func (*Entity) GetMessage ¶
func (*Entity) GetMessagesAfter ¶
func (*Entity) GetMessagesAround ¶ added in v1.4.0
func (*Entity) GetMessagesBefore ¶
func (*Entity) GetMessagesList ¶
func (*Entity) GetThreadCreatedMessageRef ¶ added in v1.8.0
func (*Entity) ReleaseThreadClaim ¶ added in v1.8.0
func (*Entity) UpdateGeneratedEmbeds ¶ added in v1.7.0
func (*Entity) UpdateMessage ¶
type Message ¶
type Message interface {
CreateMessage(ctx context.Context, id, channelID, userID int64, content string, attachments []int64, embedsJSON, autoEmbedsJSON string, position int64) error
CreateMessageWithMeta(ctx context.Context, id, channelID, userID int64, content string, attachments []int64, embedsJSON, autoEmbedsJSON string, flags int, msgType model.MessageType, referenceChannel, reference, thread, position int64) error
CreateSystemMessage(ctx context.Context, id, channelId, userId int64, content string, msgType model.MessageType, position int64) error
CreateThreadCreatedMessageRef(ctx context.Context, threadID, channelID, messageID int64) error
ClaimThread(ctx context.Context, channelID, messageID, threadID int64) (bool, int64, error)
DeleteThreadCreatedMessageRef(ctx context.Context, threadID int64) error
ReleaseThreadClaim(ctx context.Context, channelID, messageID int64) error
SetThread(ctx context.Context, id, channelID, threadID int64) error
UpdateMessageContent(ctx context.Context, id, channelID int64, content string) error
UpdateMessage(ctx context.Context, id, channelID int64, content, embedsJSON, autoEmbedsJSON string, flags int) error
UpdateGeneratedEmbeds(ctx context.Context, id, channelID int64, autoEmbedsJSON string) error
DeleteMessage(ctx context.Context, id, channelId int64) error
DeleteChannelMessages(ctx context.Context, channelID, lastId int64) error
GetMessage(ctx context.Context, id, channelId int64) (model.Message, error)
GetMessagesBefore(ctx context.Context, channelId, msgId int64, limit int) ([]model.Message, []int64, error)
GetMessagesAfter(ctx context.Context, channelId, msgId, lastChannelMessage int64, limit int) ([]model.Message, []int64, error)
GetMessagesAround(ctx context.Context, channelId, msgId, lastChannelMessage int64, limit int) ([]model.Message, []int64, error)
GetMessagesList(ctx context.Context, msgIds []int64) ([]model.Message, error)
GetChannelMessagesByIDs(ctx context.Context, channelId int64, ids []int64) ([]model.Message, error)
GetThreadCreatedMessageRef(ctx context.Context, threadID int64) (int64, int64, error)
}
Click to show internal directories.
Click to hide internal directories.