Documentation ¶
Index ¶
- type Context
- func (c *Context) CleanUpRecordsByAge() (int, error)
- func (c *Context) CleanUpRecordsByCount() (int, error)
- func (c *Context) DeleteAll() error
- func (c *Context) DeleteBan(target string) (int, error)
- func (c *Context) DeleteExpired() (int, error)
- func (c *Context) Flush() error
- func (c *Context) GetBansAt(at time.Time) ([]map[string]string, error)
- func (c *Context) GetDeletedBanSince(since time.Time) ([]types.BanApplication, error)
- func (c *Context) GetNewBan() ([]types.BanApplication, error)
- func (c *Context) GetNewBanSince(since time.Time) ([]types.BanApplication, error)
- func (c *Context) StartAutoCommit() error
- func (c *Context) WriteBanApplication(ban types.BanApplication) error
- func (c *Context) WriteSignal(sig types.SignalOccurence) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct { Db *gorm.DB //Pointer to database PusherTomb tomb.Tomb // contains filtered or unexported fields }
func (*Context) CleanUpRecordsByAge ¶
func (*Context) CleanUpRecordsByCount ¶
func (*Context) DeleteExpired ¶
func (*Context) Flush ¶
Flush doesn't do anything here : we are not using transactions or such, nothing to "flush" per se
func (*Context) GetDeletedBanSince ¶
func (*Context) GetNewBanSince ¶
func (*Context) StartAutoCommit ¶
func (*Context) WriteBanApplication ¶
func (c *Context) WriteBanApplication(ban types.BanApplication) error
we simply append the event to the transaction
func (*Context) WriteSignal ¶
func (c *Context) WriteSignal(sig types.SignalOccurence) error
Click to show internal directories.
Click to hide internal directories.