Documentation
¶
Index ¶
- Constants
- Variables
- func GetPingingMessage(ChannelID types.DiscordChannelID, configurator *Configurators, ...) types.PingMessage
- func NewErrorAggregator() errorAggregator
- type AlertBoolType
- type AlertPoBGoodType
- type AlertStringType
- type AlertThresholdType
- type Alerts
- type Base
- type CfgAlertBaseCargoBelowThan
- type CfgAlertBaseHealthIsDecreasing
- type CfgAlertBaseHealthLowerThan
- type CfgAlertBaseIsUnderAttack
- type CfgAlertBaseMoneyBelowThan
- type CfgAlertPingMessage
- type CfgAlertPoBGoodAboveThan
- type CfgAlertPoBGoodBelowThan
- type CfgBaseOrderingKey
- type Configurator
- type ConfiguratorAuthorIgnore
- type ConfiguratorAuthorWatch
- type ConfiguratorBase
- type ConfiguratorChannel
- func (c ConfiguratorChannel) Add(channelID types.DiscordChannelID) error
- func (c ConfiguratorChannel) IsEnabled(channelID types.DiscordChannelID) (bool, error)
- func (c ConfiguratorChannel) List() ([]types.DiscordChannelID, error)
- func (c ConfiguratorChannel) Remove(channelID types.DiscordChannelID) error
- type ConfiguratorContentIgnore
- type ConfiguratorContentWatch
- type ConfiguratorForumIgnore
- type ConfiguratorForumWatch
- type ConfiguratorPoBGood
- type ConfiguratorRegion
- type ConfiguratorSubForumIgnore
- type ConfiguratorSubForumWatch
- type ConfiguratorSystem
- type ConfiguratorTags
- func (c ConfiguratorTags[T]) TagsAdd(channelID types.DiscordChannelID, tags ...types.Tag) error
- func (c ConfiguratorTags[T]) TagsClear(channelID types.DiscordChannelID) error
- func (c ConfiguratorTags[T]) TagsList(channelID types.DiscordChannelID) ([]types.Tag, error)
- func (c ConfiguratorTags[T]) TagsList2(channelID types.DiscordChannelID) []types.Tag
- func (c ConfiguratorTags[T]) TagsRemove(channelID types.DiscordChannelID, tags ...types.Tag) error
- type Configurators
- type ErrorZeroAffectedRows
- type Forum
- type ForumAuthor
- type ForumContent
- type ForumSubforum
- type ForumThread
- type IConfiguratorAlertBool
- type IConfiguratorAlertPoBGood
- func (c IConfiguratorAlertPoBGood[T]) Add(channelID types.DiscordChannelID, good_nickname string, value int) error
- func (c IConfiguratorAlertPoBGood[T]) Clear(channelID types.DiscordChannelID) error
- func (c IConfiguratorAlertPoBGood[T]) Get(channelID types.DiscordChannelID) (map[string]int, error)
- func (c IConfiguratorAlertPoBGood[T]) Remove(channelID types.DiscordChannelID, good_nickname string) error
- type IConfiguratorAlertString
- type IConfiguratorAlertThreshold
- func (c IConfiguratorAlertThreshold[T]) Set(channelID types.DiscordChannelID, kind models.ThresholdIntegerKind, value int) error
- func (c IConfiguratorAlertThreshold[T]) Status(channelID types.DiscordChannelID) (int, error)
- func (c IConfiguratorAlertThreshold[T]) Unset(channelID types.DiscordChannelID) error
- type IConfiguratorTags
- type PoBGood
- type PoBGoodStatus
- type StorageErrorExists
Constants ¶
View Source
const ErrorZeroAffectedRowsMsg = "Zero affected rows. not found records. Expected more."
Variables ¶
View Source
var NewCfgAlertBaseCargoBelowThan = NewConfiguratorAlertThreshold[models.AlertBaseCargoBelow]
View Source
var NewCfgAlertBaseHealthIsDecreasing = NewConfiguratorAlertBool[models.AlertBaseIfHealthDecreasing]
View Source
var NewCfgAlertBaseHealthLowerThan = NewConfiguratorAlertThreshold[models.AlertBaseHealthLowerThan]
View Source
var NewCfgAlertBaseIsUnderAttack = NewConfiguratorAlertBool[models.AlertBaseIfUnderAttack]
View Source
var NewCfgAlertBaseMoneyBelowThan = NewConfiguratorAlertThreshold[models.AlertBaseMoneyBelow]
View Source
var NewCfgAlertPingMessage = NewConfiguratorAlertString[models.AlertPingMessage]
View Source
var NewCfgAlertPoBGoodAboveThan = NewConfiguratorAlertPoBGood[models.AlertPobGoodAboveThan]
View Source
var NewCfgAlertPoBGoodBelowThan = NewConfiguratorAlertPoBGood[models.AlertPobGoodBelowThan]
View Source
var NewCfgBaseOrderingKey = NewConfiguratorAlertString[models.ConfigBaseOrderingKey]
View Source
var NewConfiguratorAuthorIgnore = NewConfiguratorTags[models.TagForumAuthorIgnore]
View Source
var NewConfiguratorAuthorWatch = NewConfiguratorTags[models.TagForumAuthorWatch]
View Source
var NewConfiguratorBase = NewConfiguratorTags[models.TagBase]
View Source
var NewConfiguratorContentIgnore = NewConfiguratorTags[models.TagForumContentIgnore]
View Source
var NewConfiguratorContentWatch = NewConfiguratorTags[models.TagForumContentWatch]
View Source
var NewConfiguratorForumIgnore = NewConfiguratorTags[models.TagForumPostIgnore]
View Source
var NewConfiguratorForumWatch = NewConfiguratorTags[models.TagForumPostTrack]
View Source
var NewConfiguratorPoBGood = NewConfiguratorTags[models.TagPoBGood]
View Source
var NewConfiguratorRegion = NewConfiguratorTags[models.TagRegion]
View Source
var NewConfiguratorSubForumIgnore = NewConfiguratorTags[models.TagForumSubforumIgnore]
View Source
var NewConfiguratorSubForumWatch = NewConfiguratorTags[models.TagForumSubforumTrack]
View Source
var NewConfiguratorSystem = NewConfiguratorTags[models.TagSystem]
Functions ¶
func GetPingingMessage ¶
func GetPingingMessage(ChannelID types.DiscordChannelID, configurator *Configurators, Discorder *discorder.Discorder) types.PingMessage
func NewErrorAggregator ¶
func NewErrorAggregator() errorAggregator
Types ¶
type AlertBoolType ¶
type AlertBoolType interface {
models.AlertBaseIfHealthDecreasing |
models.AlertBaseIfUnderAttack
}
type AlertPoBGoodType ¶ added in v1.17.0
type AlertPoBGoodType interface {
models.AlertPobGoodBelowThan | models.AlertPobGoodAboveThan
GetGoodNickname() string
GetThreshold() int
}
type AlertStringType ¶
type AlertStringType interface {
models.AlertPingMessage |
models.ConfigBaseOrderingKey
GetValue() string
}
type AlertThresholdType ¶
type AlertThresholdType interface {
// models.SomeAlert |
models.AlertBaseHealthLowerThan |
models.AlertBaseMoneyBelow |
models.AlertBaseCargoBelow
GetThreshold() int
}
type Alerts ¶
type Alerts struct {
BaseHealthLowerThan CfgAlertBaseHealthLowerThan
BaseHealthIsDecreasing CfgAlertBaseHealthIsDecreasing
BaseIsUnderAttack CfgAlertBaseIsUnderAttack
BaseMoneyBelowThan CfgAlertBaseMoneyBelowThan
BaseCargoBelowThan CfgAlertBaseCargoBelowThan
PoBGoodsBelowThan CfgAlertPoBGoodBelowThan
PoBGoodsAboveThan CfgAlertPoBGoodAboveThan
PingMessage CfgAlertPingMessage
}
type Base ¶
type Base struct {
Tags ConfiguratorBase
OrderBy CfgBaseOrderingKey
}
type CfgAlertBaseCargoBelowThan ¶ added in v1.17.0
type CfgAlertBaseCargoBelowThan = IConfiguratorAlertThreshold[models.AlertBaseCargoBelow]
type CfgAlertBaseHealthIsDecreasing ¶
type CfgAlertBaseHealthIsDecreasing = IConfiguratorAlertBool[models.AlertBaseIfHealthDecreasing]
type CfgAlertBaseHealthLowerThan ¶
type CfgAlertBaseHealthLowerThan = IConfiguratorAlertThreshold[models.AlertBaseHealthLowerThan]
type CfgAlertBaseIsUnderAttack ¶
type CfgAlertBaseIsUnderAttack = IConfiguratorAlertBool[models.AlertBaseIfUnderAttack]
type CfgAlertBaseMoneyBelowThan ¶ added in v1.17.0
type CfgAlertBaseMoneyBelowThan = IConfiguratorAlertThreshold[models.AlertBaseMoneyBelow]
type CfgAlertPingMessage ¶
type CfgAlertPingMessage = IConfiguratorAlertString[models.AlertPingMessage]
type CfgAlertPoBGoodAboveThan ¶ added in v1.17.0
type CfgAlertPoBGoodAboveThan = IConfiguratorAlertPoBGood[models.AlertPobGoodAboveThan]
type CfgAlertPoBGoodBelowThan ¶ added in v1.17.0
type CfgAlertPoBGoodBelowThan = IConfiguratorAlertPoBGood[models.AlertPobGoodBelowThan]
type CfgBaseOrderingKey ¶
type CfgBaseOrderingKey = IConfiguratorAlertString[models.ConfigBaseOrderingKey]
type Configurator ¶
type Configurator struct {
// contains filtered or unexported fields
}
func FixtureConfigurator ¶
func FixtureConfigurator(dbpath types.Dbpath) *Configurator
func FixtureMigrator ¶
func FixtureMigrator(callback func(dbpath types.Dbpath)) *Configurator
func NewConfigurator ¶
func NewConfigurator(dbpath types.Dbpath) *Configurator
func (*Configurator) AutoMigrateSchema ¶
func (cg *Configurator) AutoMigrateSchema() *Configurator
func (Configurator) GetClient ¶
func (cg Configurator) GetClient() *gorm.DB
func (Configurator) GetDbpath ¶
func (cg Configurator) GetDbpath() types.Dbpath
type ConfiguratorAuthorIgnore ¶ added in v1.15.0
type ConfiguratorAuthorIgnore = ConfiguratorTags[models.TagForumAuthorIgnore]
type ConfiguratorAuthorWatch ¶ added in v1.15.0
type ConfiguratorAuthorWatch = ConfiguratorTags[models.TagForumAuthorWatch]
type ConfiguratorBase ¶
type ConfiguratorBase = ConfiguratorTags[models.TagBase]
type ConfiguratorChannel ¶
type ConfiguratorChannel struct {
*Configurator
}
func FixtureChannel ¶
func FixtureChannel(dbpath types.Dbpath) (types.DiscordChannelID, ConfiguratorChannel)
func NewConfiguratorChannel ¶
func NewConfiguratorChannel(con *Configurator) ConfiguratorChannel
func (ConfiguratorChannel) Add ¶
func (c ConfiguratorChannel) Add(channelID types.DiscordChannelID) error
func (ConfiguratorChannel) IsEnabled ¶
func (c ConfiguratorChannel) IsEnabled(channelID types.DiscordChannelID) (bool, error)
func (ConfiguratorChannel) List ¶
func (c ConfiguratorChannel) List() ([]types.DiscordChannelID, error)
func (ConfiguratorChannel) Remove ¶
func (c ConfiguratorChannel) Remove(channelID types.DiscordChannelID) error
type ConfiguratorContentIgnore ¶ added in v1.14.0
type ConfiguratorContentIgnore = ConfiguratorTags[models.TagForumContentIgnore]
type ConfiguratorContentWatch ¶ added in v1.14.0
type ConfiguratorContentWatch = ConfiguratorTags[models.TagForumContentWatch]
type ConfiguratorForumIgnore ¶
type ConfiguratorForumIgnore = ConfiguratorTags[models.TagForumPostIgnore]
type ConfiguratorForumWatch ¶
type ConfiguratorForumWatch = ConfiguratorTags[models.TagForumPostTrack]
type ConfiguratorPoBGood ¶ added in v1.17.0
type ConfiguratorPoBGood = ConfiguratorTags[models.TagPoBGood]
type ConfiguratorRegion ¶
type ConfiguratorRegion = ConfiguratorTags[models.TagRegion]
type ConfiguratorSubForumIgnore ¶
type ConfiguratorSubForumIgnore = ConfiguratorTags[models.TagForumSubforumIgnore]
type ConfiguratorSubForumWatch ¶
type ConfiguratorSubForumWatch = ConfiguratorTags[models.TagForumSubforumTrack]
type ConfiguratorSystem ¶
type ConfiguratorSystem = ConfiguratorTags[models.TagSystem]
type ConfiguratorTags ¶
type ConfiguratorTags[T taggable] struct {
*Configurator
}
func NewConfiguratorTags ¶
func NewConfiguratorTags[T taggable](configurator *Configurator) ConfiguratorTags[T]
func (ConfiguratorTags[T]) TagsAdd ¶
func (c ConfiguratorTags[T]) TagsAdd(channelID types.DiscordChannelID, tags ...types.Tag) error
func (ConfiguratorTags[T]) TagsClear ¶
func (c ConfiguratorTags[T]) TagsClear(channelID types.DiscordChannelID) error
func (ConfiguratorTags[T]) TagsList ¶
func (c ConfiguratorTags[T]) TagsList(channelID types.DiscordChannelID) ([]types.Tag, error)
func (ConfiguratorTags[T]) TagsList2 ¶
func (c ConfiguratorTags[T]) TagsList2(channelID types.DiscordChannelID) []types.Tag
func (ConfiguratorTags[T]) TagsRemove ¶
func (c ConfiguratorTags[T]) TagsRemove(channelID types.DiscordChannelID, tags ...types.Tag) error
type Configurators ¶
type Configurators struct {
Bases Base
Alerts Alerts
Forum Forum
PoBGood PoBGood
Configur *Configurator
Channels ConfiguratorChannel
}
func NewConfigugurators ¶
func NewConfigugurators(dbpath types.Dbpath) *Configurators
func NewConfiguratorsFromConfigur ¶
func NewConfiguratorsFromConfigur(configur *Configurator) *Configurators
type ErrorZeroAffectedRows ¶
type ErrorZeroAffectedRows struct {
ExtraMsg string
}
func (ErrorZeroAffectedRows) Error ¶
func (z ErrorZeroAffectedRows) Error() string
type Forum ¶
type Forum struct {
Thread ForumThread
Subforum ForumSubforum
Content ForumContent
Author ForumAuthor
}
type ForumAuthor ¶ added in v1.15.0
type ForumAuthor struct {
Watch ConfiguratorAuthorWatch
Ignore ConfiguratorAuthorIgnore
}
type ForumContent ¶ added in v1.14.0
type ForumContent struct {
Watch ConfiguratorContentWatch
Ignore ConfiguratorContentIgnore
}
type ForumSubforum ¶
type ForumSubforum struct {
Watch ConfiguratorSubForumWatch
Ignore ConfiguratorSubForumIgnore
}
type ForumThread ¶
type ForumThread struct {
Watch ConfiguratorForumWatch
Ignore ConfiguratorForumIgnore
}
type IConfiguratorAlertBool ¶
type IConfiguratorAlertBool[T AlertBoolType] struct { *Configurator }
func NewConfiguratorAlertBool ¶
func NewConfiguratorAlertBool[T AlertBoolType](configurator *Configurator) IConfiguratorAlertBool[T]
func (IConfiguratorAlertBool[T]) Disable ¶
func (c IConfiguratorAlertBool[T]) Disable(channelID types.DiscordChannelID) error
func (IConfiguratorAlertBool[T]) Enable ¶
func (c IConfiguratorAlertBool[T]) Enable(channelID types.DiscordChannelID) error
func (IConfiguratorAlertBool[T]) Status ¶
func (c IConfiguratorAlertBool[T]) Status(channelID types.DiscordChannelID) (bool, error)
type IConfiguratorAlertPoBGood ¶ added in v1.17.0
type IConfiguratorAlertPoBGood[T AlertPoBGoodType] struct { *Configurator }
func NewConfiguratorAlertPoBGood ¶ added in v1.17.0
func NewConfiguratorAlertPoBGood[T AlertPoBGoodType](configurator *Configurator) IConfiguratorAlertPoBGood[T]
func (IConfiguratorAlertPoBGood[T]) Add ¶ added in v1.17.0
func (c IConfiguratorAlertPoBGood[T]) Add(channelID types.DiscordChannelID, good_nickname string, value int) error
func (IConfiguratorAlertPoBGood[T]) Clear ¶ added in v1.17.0
func (c IConfiguratorAlertPoBGood[T]) Clear(channelID types.DiscordChannelID) error
func (IConfiguratorAlertPoBGood[T]) Get ¶ added in v1.17.0
func (c IConfiguratorAlertPoBGood[T]) Get(channelID types.DiscordChannelID) (map[string]int, error)
func (IConfiguratorAlertPoBGood[T]) Remove ¶ added in v1.17.0
func (c IConfiguratorAlertPoBGood[T]) Remove(channelID types.DiscordChannelID, good_nickname string) error
type IConfiguratorAlertString ¶
type IConfiguratorAlertString[T AlertStringType] struct { *Configurator }
func NewConfiguratorAlertString ¶
func NewConfiguratorAlertString[T AlertStringType](configurator *Configurator) IConfiguratorAlertString[T]
func (IConfiguratorAlertString[T]) Set ¶
func (c IConfiguratorAlertString[T]) Set(channelID types.DiscordChannelID, value string) error
func (IConfiguratorAlertString[T]) Status ¶
func (c IConfiguratorAlertString[T]) Status(channelID types.DiscordChannelID) (string, error)
func (IConfiguratorAlertString[T]) Unset ¶
func (c IConfiguratorAlertString[T]) Unset(channelID types.DiscordChannelID) error
type IConfiguratorAlertThreshold ¶
type IConfiguratorAlertThreshold[T AlertThresholdType] struct { *Configurator }
func NewConfiguratorAlertThreshold ¶
func NewConfiguratorAlertThreshold[T AlertThresholdType](configurator *Configurator) IConfiguratorAlertThreshold[T]
func (IConfiguratorAlertThreshold[T]) Set ¶
func (c IConfiguratorAlertThreshold[T]) Set(channelID types.DiscordChannelID, kind models.ThresholdIntegerKind, value int) error
func (IConfiguratorAlertThreshold[T]) Status ¶
func (c IConfiguratorAlertThreshold[T]) Status(channelID types.DiscordChannelID) (int, error)
func (IConfiguratorAlertThreshold[T]) Unset ¶
func (c IConfiguratorAlertThreshold[T]) Unset(channelID types.DiscordChannelID) error
type IConfiguratorTags ¶
type IConfiguratorTags interface {
TagsAdd(channelID types.DiscordChannelID, tags ...types.Tag) error
TagsRemove(channelID types.DiscordChannelID, tags ...types.Tag) error
TagsList(channelID types.DiscordChannelID) ([]types.Tag, error)
TagsClear(channelID types.DiscordChannelID) error
}
type PoBGood ¶ added in v1.17.0
type PoBGood struct {
Tags ConfiguratorPoBGood
}
type PoBGoodStatus ¶ added in v1.17.0
type StorageErrorExists ¶
type StorageErrorExists struct {
// contains filtered or unexported fields
}
func (StorageErrorExists) Error ¶
func (s StorageErrorExists) Error() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.