Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelFormat ¶
type ChannelFormat int
const ( ChannelFormatDisplay ChannelFormat = iota ChannelFormatMention )
func ParseChannelFormat ¶
func ParseChannelFormat(s string) ChannelFormat
func (ChannelFormat) String ¶
func (f ChannelFormat) String() string
type History ¶
type History int
func ParseHistory ¶
func (History) ShouldDisplayDuration ¶
func (History) ShouldDisplayName ¶
func (History) ShouldDisplayTimeline ¶
type Repository ¶
type Repository interface {
// UpdateRule updates the rule for the given guild, category or channel
SaveRule(scope Scope, id snowflake.ID, rule Rule)
DeleteRule(scope Scope, id snowflake.ID)
// ScopedEffectiveRule returns the rule for the specifier, and the kind of scope it was found in
ScopedEffectiveRule(guildID snowflake.ID, categoryID *snowflake.ID, channelID snowflake.ID) (Rule, Scope)
// EffectiveRule returns the rule for the given specifier.
EffectiveRule(guildID snowflake.ID, categoryID *snowflake.ID, channelID snowflake.ID) Rule
FindRule(scope Scope, id snowflake.ID) (Rule, bool)
FindGuildRule(guildID snowflake.ID) (Rule, bool)
FindCategoryRule(categoryID snowflake.ID) (Rule, bool)
FindChannelRule(channelID snowflake.ID) (Rule, bool)
}
func CreateRepository ¶
func CreateRepository(db *gorm.DB) Repository
type Rule ¶
type Rule struct {
Enabled bool
NotificationChannel snowflake.ID
History History
UserFormat UserFormat
ChannelFormat ChannelFormat
}
type UserFormat ¶
type UserFormat int
const ( UserFormatUsername UserFormat = iota UserFormatDisplay UserFormatMention )
func ParseUserFormat ¶
func ParseUserFormat(s string) UserFormat
func (UserFormat) String ¶
func (f UserFormat) String() string
Click to show internal directories.
Click to hide internal directories.