Documentation ¶
Index ¶
- func AddFetchWatcher(j chan *models.JSONMessage)
- func GetAddresses(r routing.Router, to *models.Address) (server *identity.Address, author *identity.Address, err error)
- func InvalidateCaches()
- func LoadContactProfile(r routing.Router, c *models.Contact, from *identity.Identity) error
- func SendAlert(r routing.Router, msgName string, from *identity.Identity, to string, ...) error
- type Fetcher
- type MessageManager
- func (m *MessageManager) GetAllMessages(msgChan chan *models.JSONMessage)
- func (m *MessageManager) GetMessage(alias string, name string) (*models.JSONMessage, error)
- func (m *MessageManager) GetPrivateMessages(since uint64, withComponents []string) []*models.JSONMessage
- func (m *MessageManager) GetPublic(since uint64, addr *models.Address) ([]*models.JSONMessage, error)
- func (m *MessageManager) GetPublicMessages(since uint64, withComponents []string) []*models.JSONMessage
- func (m *MessageManager) GetSentMessages(since uint64, withComponents []string) ([]*models.JSONMessage, error)
- func (m *MessageManager) PublishMessage(msg *models.JSONMessage) error
- type MessageStore
- func (c *MessageStore) AddMessage(msg *models.JSONMessage, refresh updateFunc)
- func (c *MessageStore) AddProfile(msg *models.JSONProfile, refresh profileFunc)
- func (c *MessageStore) Invalidate()
- func (c *MessageStore) LatestMessage() time.Time
- func (c *MessageStore) RetrieveAll() []*models.JSONMessage
- func (c *MessageStore) RetrieveAllPrivate() []*models.JSONMessage
- func (c *MessageStore) RetrieveAllPublic() []*models.JSONMessage
- func (c *MessageStore) RetrieveMessage(from string, name string) *models.JSONMessage
- func (c *MessageStore) RetrieveProfile(forAddr string) (*models.JSONProfile, bool)
- func (c *MessageStore) RetrievePublic(from string) []*models.JSONMessage
- type MessageStoreProfile
- type MessageStoreRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFetchWatcher ¶
func AddFetchWatcher(j chan *models.JSONMessage)
func GetAddresses ¶
func InvalidateCaches ¶
func InvalidateCaches()
func LoadContactProfile ¶
Types ¶
type Fetcher ¶
type Fetcher struct { Public *time.Ticker Private *time.Ticker Packager *packaging.Packager Watchers []chan *models.JSONMessage Client *dap.Client Router routing.Router Tables map[string]gdb.Table Store gdb.Executor // contains filtered or unexported fields }
func NewFetcher ¶
func NewFetcher() *Fetcher
func (*Fetcher) ForceFetch ¶
func (*Fetcher) LoadCredentials ¶
func (*Fetcher) NeedsCredentials ¶
type MessageManager ¶
type MessageManager struct { Tables map[string]gdb.Table Store gdb.Executor Client *dap.Client Router routing.Router Identity *models.Identity Packager *packaging.Packager }
func (*MessageManager) GetAllMessages ¶
func (m *MessageManager) GetAllMessages(msgChan chan *models.JSONMessage)
func (*MessageManager) GetMessage ¶
func (m *MessageManager) GetMessage(alias string, name string) (*models.JSONMessage, error)
func (*MessageManager) GetPrivateMessages ¶
func (m *MessageManager) GetPrivateMessages(since uint64, withComponents []string) []*models.JSONMessage
GetPrivateMessages will return an array of JSON Messges with the given arguments.
func (*MessageManager) GetPublic ¶
func (m *MessageManager) GetPublic(since uint64, addr *models.Address) ([]*models.JSONMessage, error)
func (*MessageManager) GetPublicMessages ¶
func (m *MessageManager) GetPublicMessages(since uint64, withComponents []string) []*models.JSONMessage
func (*MessageManager) GetSentMessages ¶
func (m *MessageManager) GetSentMessages(since uint64, withComponents []string) ([]*models.JSONMessage, error)
func (*MessageManager) PublishMessage ¶
func (m *MessageManager) PublishMessage(msg *models.JSONMessage) error
type MessageStore ¶
type MessageStore struct { // Store Everything, only loop over this one Named map[string]*MessageStoreRecord // Quick lookup to Public Messages Public map[string][]*MessageStoreRecord // Quick lookup to Public Messages Profiles map[string]*MessageStoreProfile // Ticker Ticker *time.Ticker // Meta Lock *sync.RWMutex ProfileLock *sync.RWMutex Latest time.Time }
func NewMessageStore ¶
func NewMessageStore() *MessageStore
func (*MessageStore) AddMessage ¶
func (c *MessageStore) AddMessage(msg *models.JSONMessage, refresh updateFunc)
func (*MessageStore) AddProfile ¶
func (c *MessageStore) AddProfile(msg *models.JSONProfile, refresh profileFunc)
func (*MessageStore) Invalidate ¶
func (c *MessageStore) Invalidate()
func (*MessageStore) LatestMessage ¶
func (c *MessageStore) LatestMessage() time.Time
func (*MessageStore) RetrieveAll ¶
func (c *MessageStore) RetrieveAll() []*models.JSONMessage
func (*MessageStore) RetrieveAllPrivate ¶
func (c *MessageStore) RetrieveAllPrivate() []*models.JSONMessage
func (*MessageStore) RetrieveAllPublic ¶
func (c *MessageStore) RetrieveAllPublic() []*models.JSONMessage
func (*MessageStore) RetrieveMessage ¶
func (c *MessageStore) RetrieveMessage(from string, name string) *models.JSONMessage
func (*MessageStore) RetrieveProfile ¶
func (c *MessageStore) RetrieveProfile(forAddr string) (*models.JSONProfile, bool)
func (*MessageStore) RetrievePublic ¶
func (c *MessageStore) RetrievePublic(from string) []*models.JSONMessage
type MessageStoreProfile ¶
type MessageStoreProfile struct { *models.JSONProfile Expires time.Time Updater profileFunc }
type MessageStoreRecord ¶
Click to show internal directories.
Click to hide internal directories.