Documentation ¶
Index ¶
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) 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) 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 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