Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CleanChannelJob describes channel cleanup requests CleanChannelJob = "CleanChannelRequests" // DelayedDeleteJob describes delayed delete requests DelayedDeleteJob = "DelayedDeleteRequests" )
Functions ¶
This section is empty.
Types ¶
type CleanChannelOpts ¶
type CleanChannelOpts struct { Messages bool `json:"delete_messages"` Files bool `json:"delete_files"` Bots bool `json:"delete_bot_messages"` }
CleanChannelOpts encapsulates all the options for a clean channel command set
type CleanChannelRequest ¶
type CleanChannelRequest struct { Token string `json:"token"` Channel string `json:"channel_id"` UserID string `json:"user_id"` Options CleanChannelOpts `json:"command_options"` }
CleanChannelRequest is the struct for doing a channel cleanup
type DelayedDeleteRequest ¶
type DelayedDeleteRequest struct { Token string `json:"token"` Channel string `json:"channel_id"` Timestamp string `json:"ts"` }
DelayedDeleteRequest is the struct for doing a delayed delete
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is a job queue to pass messages between the web thread and workers
func (*Queue) InitWorkerPool ¶
InitWorkerPool initializes a worker pool to do work
func (*Queue) QueueCleanChannel ¶
func (q *Queue) QueueCleanChannel(token, channel, userID string, options CleanChannelOpts) error
QueueCleanChannel enqueues a cleanup channel job
func (*Queue) QueueDelayedDelete ¶
QueueDelayedDelete enqueues a delayed message delete job
Click to show internal directories.
Click to hide internal directories.