mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 06:12:25 -05:00
[feature] request blocking by http headers (#2409)
This commit is contained in:
parent
07bd848028
commit
8ebb7775a3
36 changed files with 2561 additions and 81 deletions
22
internal/cache/cache.go
vendored
22
internal/cache/cache.go
vendored
|
|
@ -18,21 +18,26 @@
|
|||
package cache
|
||||
|
||||
import (
|
||||
"github.com/superseriousbusiness/gotosocial/internal/cache/headerfilter"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/log"
|
||||
)
|
||||
|
||||
type Caches struct {
|
||||
// GTS provides access to the collection of gtsmodel object caches.
|
||||
// (used by the database).
|
||||
// GTS provides access to the collection of
|
||||
// gtsmodel object caches. (used by the database).
|
||||
GTS GTSCaches
|
||||
|
||||
// AP provides access to the collection of ActivityPub object caches.
|
||||
// (planned to be used by the typeconverter).
|
||||
AP APCaches
|
||||
// AllowHeaderFilters provides access to
|
||||
// the allow []headerfilter.Filter cache.
|
||||
AllowHeaderFilters headerfilter.Cache
|
||||
|
||||
// Visibility provides access to the item visibility cache.
|
||||
// (used by the visibility filter).
|
||||
// BlockHeaderFilters provides access to
|
||||
// the block []headerfilter.Filter cache.
|
||||
BlockHeaderFilters headerfilter.Cache
|
||||
|
||||
// Visibility provides access to the item visibility
|
||||
// cache. (used by the visibility filter).
|
||||
Visibility VisibilityCache
|
||||
|
||||
// prevent pass-by-value.
|
||||
|
|
@ -45,7 +50,6 @@ func (c *Caches) Init() {
|
|||
log.Infof(nil, "init: %p", c)
|
||||
|
||||
c.GTS.Init()
|
||||
c.AP.Init()
|
||||
c.Visibility.Init()
|
||||
|
||||
// Setup cache invalidate hooks.
|
||||
|
|
@ -58,7 +62,6 @@ func (c *Caches) Start() {
|
|||
log.Infof(nil, "start: %p", c)
|
||||
|
||||
c.GTS.Start()
|
||||
c.AP.Start()
|
||||
c.Visibility.Start()
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +70,6 @@ func (c *Caches) Stop() {
|
|||
log.Infof(nil, "stop: %p", c)
|
||||
|
||||
c.GTS.Stop()
|
||||
c.AP.Stop()
|
||||
c.Visibility.Stop()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue