Documentation
¶
Index ¶
- type AccountCache
- func (c *AccountCache) GetByID(id string) (*gtsmodel.Account, bool)
- func (c *AccountCache) GetByPubkeyID(id string) (*gtsmodel.Account, bool)
- func (c *AccountCache) GetByURI(uri string) (*gtsmodel.Account, bool)
- func (c *AccountCache) GetByURL(url string) (*gtsmodel.Account, bool)
- func (c *AccountCache) GetByUsernameDomain(username string, domain string) (*gtsmodel.Account, bool)
- func (c *AccountCache) Put(account *gtsmodel.Account)
- type DomainBlockCache
- type EmojiCache
- type StatusCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCache ¶
type AccountCache struct {
// contains filtered or unexported fields
}
AccountCache is a cache wrapper to provide URL and URI lookups for gtsmodel.Account
func NewAccountCache ¶
func NewAccountCache() *AccountCache
NewAccountCache returns a new instantiated AccountCache object
func (*AccountCache) GetByID ¶
func (c *AccountCache) GetByID(id string) (*gtsmodel.Account, bool)
GetByID attempts to fetch a account from the cache by its ID, you will receive a copy for thread-safety
func (*AccountCache) GetByPubkeyID ¶ added in v0.5.0
func (c *AccountCache) GetByPubkeyID(id string) (*gtsmodel.Account, bool)
GetByPubkeyID attempts to fetch an account from the cache by its public key URI (ID), you will receive a copy for thread-safety.
func (*AccountCache) GetByURI ¶
func (c *AccountCache) GetByURI(uri string) (*gtsmodel.Account, bool)
GetByURI attempts to fetch a account from the cache by its URI, you will receive a copy for thread-safety
func (*AccountCache) GetByURL ¶
func (c *AccountCache) GetByURL(url string) (*gtsmodel.Account, bool)
GetByURL attempts to fetch a account from the cache by its URL, you will receive a copy for thread-safety
func (*AccountCache) GetByUsernameDomain ¶ added in v0.4.0
func (c *AccountCache) GetByUsernameDomain(username string, domain string) (*gtsmodel.Account, bool)
GettByUsernameDomain attempts to fetch an account from the cache by its username@domain combo (or just username), you will receive a copy for thread-safety.
func (*AccountCache) Put ¶
func (c *AccountCache) Put(account *gtsmodel.Account)
Put places a account in the cache, ensuring that the object place is a copy for thread-safety
type DomainBlockCache ¶ added in v0.5.0
type DomainBlockCache struct {
// contains filtered or unexported fields
}
DomainCache is a cache wrapper to provide URL and URI lookups for gtsmodel.Status
func NewDomainBlockCache ¶ added in v0.5.0
func NewDomainBlockCache() *DomainBlockCache
NewStatusCache returns a new instantiated statusCache object
func (*DomainBlockCache) GetByDomain ¶ added in v0.5.0
func (c *DomainBlockCache) GetByDomain(domain string) (*gtsmodel.DomainBlock, bool)
GetByURL attempts to fetch a status from the cache by its URL, you will receive a copy for thread-safety
func (*DomainBlockCache) GetByID ¶ added in v0.5.0
func (c *DomainBlockCache) GetByID(id string) (*gtsmodel.DomainBlock, bool)
GetByID attempts to fetch a status from the cache by its ID, you will receive a copy for thread-safety
func (*DomainBlockCache) InvalidateByDomain ¶ added in v0.5.0
func (c *DomainBlockCache) InvalidateByDomain(domain string)
InvalidateByDomain will invalidate a domain block from the cache by domain name.
func (*DomainBlockCache) Put ¶ added in v0.5.0
func (c *DomainBlockCache) Put(domain string, block *gtsmodel.DomainBlock)
Put places a status in the cache, ensuring that the object place is a copy for thread-safety
type EmojiCache ¶ added in v0.5.0
type EmojiCache struct {
// contains filtered or unexported fields
}
EmojiCache is a cache wrapper to provide ID and URI lookups for gtsmodel.Emoji
func NewEmojiCache ¶ added in v0.5.0
func NewEmojiCache() *EmojiCache
NewEmojiCache returns a new instantiated EmojiCache object
func (*EmojiCache) GetByID ¶ added in v0.5.0
func (c *EmojiCache) GetByID(id string) (*gtsmodel.Emoji, bool)
GetByID attempts to fetch an emoji from the cache by its ID, you will receive a copy for thread-safety
func (*EmojiCache) GetByShortcodeDomain ¶ added in v0.5.0
func (*EmojiCache) GetByURI ¶ added in v0.5.0
func (c *EmojiCache) GetByURI(uri string) (*gtsmodel.Emoji, bool)
GetByURI attempts to fetch an emoji from the cache by its URI, you will receive a copy for thread-safety
func (*EmojiCache) Put ¶ added in v0.5.0
func (c *EmojiCache) Put(emoji *gtsmodel.Emoji)
Put places an emoji in the cache, ensuring that the object place is a copy for thread-safety
type StatusCache ¶
type StatusCache struct {
// contains filtered or unexported fields
}
StatusCache is a cache wrapper to provide URL and URI lookups for gtsmodel.Status
func NewStatusCache ¶
func NewStatusCache() *StatusCache
NewStatusCache returns a new instantiated statusCache object
func (*StatusCache) GetByID ¶
func (c *StatusCache) GetByID(id string) (*gtsmodel.Status, bool)
GetByID attempts to fetch a status from the cache by its ID, you will receive a copy for thread-safety
func (*StatusCache) GetByURI ¶
func (c *StatusCache) GetByURI(uri string) (*gtsmodel.Status, bool)
GetByURI attempts to fetch a status from the cache by its URI, you will receive a copy for thread-safety
func (*StatusCache) GetByURL ¶
func (c *StatusCache) GetByURL(url string) (*gtsmodel.Status, bool)
GetByURL attempts to fetch a status from the cache by its URL, you will receive a copy for thread-safety
func (*StatusCache) Put ¶
func (c *StatusCache) Put(status *gtsmodel.Status)
Put places a status in the cache, ensuring that the object place is a copy for thread-safety