Documentation
¶
Index ¶
- Variables
- type MessagePrune
- func (t *MessagePrune) Exec(l *zap.Logger, state jobstate.State, progstate jobstate.ProgressState) (*types.Output, error)
- func (t *MessagePrune) Expiry() *time.Duration
- func (t *MessagePrune) Fields() map[string]any
- func (t *MessagePrune) LocalPresets() *interfaces.PresetInfo
- func (t *MessagePrune) Name() string
- func (t *MessagePrune) Resumable() bool
- func (t *MessagePrune) Validate(state jobstate.State) error
- type MessagePruneConstraints
- type MessagePruneOpts
- type ModerationConstraints
Constants ¶
This section is empty.
Variables ¶
View Source
var FreePlanModerationConstraints = &ModerationConstraints{ MessagePrune: &MessagePruneConstraints{ TotalMaxMessages: 1000, MinPerChannel: 10, }, MaxServerModeration: 5, }
Functions ¶
This section is empty.
Types ¶
type MessagePrune ¶
type MessagePrune struct {
// Constraints, this is auto-set by the job in jobserver and hence not configurable in this mode.
Constraints *ModerationConstraints
// Backup options
Options MessagePruneOpts
}
func (*MessagePrune) Exec ¶
func (t *MessagePrune) Exec( l *zap.Logger, state jobstate.State, progstate jobstate.ProgressState, ) (*types.Output, error)
func (*MessagePrune) Expiry ¶
func (t *MessagePrune) Expiry() *time.Duration
func (*MessagePrune) Fields ¶
func (t *MessagePrune) Fields() map[string]any
func (*MessagePrune) LocalPresets ¶
func (t *MessagePrune) LocalPresets() *interfaces.PresetInfo
func (*MessagePrune) Name ¶
func (t *MessagePrune) Name() string
func (*MessagePrune) Resumable ¶
func (t *MessagePrune) Resumable() bool
type MessagePruneConstraints ¶
type MessagePruneOpts ¶
type MessagePruneOpts struct {
UserID string `description:"If set, the user id to prune messages of"`
Channels []string `description:"If set, the channels to prune messages from"`
IgnoreErrors bool `description:"If set, ignore errors while pruning"`
MaxMessages int `description:"The maximum number of messages to prune"`
PruneFrom timex.Duration `description:"If set, the time to prune messages from."`
PerChannel int `description:"The minimum number of messages to prune per channel"`
RolloverLeftovers bool `description:"Whether to attempt rollover of leftover message quota to another channels or not"`
SpecialAllocations map[string]int `description:"Specific channel allocation overrides"`
}
Options that can be set when pruning a message
type ModerationConstraints ¶
type ModerationConstraints struct {
MessagePrune *MessagePruneConstraints
MaxServerModeration int // How many moderation related jobs can run concurrently per server
}
Click to show internal directories.
Click to hide internal directories.