Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNewsManager ¶
Types ¶
type InMemoryNewsStore ¶
type InMemoryNewsStore struct {
// contains filtered or unexported fields
}
InMemoryNewsStore manages a UserEvents data structure
func NewInMemoryNewsStore ¶
func NewInMemoryNewsStore() *InMemoryNewsStore
func (*InMemoryNewsStore) AddEvent ¶
func (m *InMemoryNewsStore) AddEvent(username string, event *om.LinkManagerEvent) (err error)
func (*InMemoryNewsStore) GetNews ¶
func (m *InMemoryNewsStore) GetNews(username string, startIndex int) (events []*om.LinkManagerEvent, nextIndex int, err error)
type NewsManager ¶
type NewsManager struct {
// contains filtered or unexported fields
}
func (*NewsManager) GetNews ¶
func (m *NewsManager) GetNews(req om.GetNewsRequest) (resp om.GetNewsResult, err error)
func (*NewsManager) OnLinkAdded ¶
func (m *NewsManager) OnLinkAdded(username string, link *om.Link)
func (*NewsManager) OnLinkDeleted ¶
func (m *NewsManager) OnLinkDeleted(username string, url string)
func (*NewsManager) OnLinkUpdated ¶
func (m *NewsManager) OnLinkUpdated(username string, link *om.Link)
type RedisNewsStore ¶
type RedisNewsStore struct {
// contains filtered or unexported fields
}
RedisNewsStore manages a UserEvents data structure
func (*RedisNewsStore) AddEvent ¶
func (m *RedisNewsStore) AddEvent(username string, event *om.LinkManagerEvent) (err error)
func (*RedisNewsStore) GetNews ¶
func (m *RedisNewsStore) GetNews(username string, startIndex int) (events []*om.LinkManagerEvent, nextIndex int, err error)
Click to show internal directories.
Click to hide internal directories.