Documentation ¶
Index ¶
- type InvalidID
- type MessageDB
- func (db MessageDB) FetchMessage(id string) (*pb.Message, error)
- func (db MessageDB) FetchMessagesAfter(t time.Time) (*pb.MessageHistory, error)
- func (db *MessageDB) GetMessage(id string) *pb.Message
- func (db MessageDB) MaybeGetMessage(id string) (*pb.Message, error)
- func (db *MessageDB) NewMessage(cMsg *pb.CreateMessage, userID string, sync ...bool) *pb.Message
- func (db *MessageDB) PurgeCache()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageDB ¶
type MessageDB struct { // TODO: Change to a channel cache when channels are implemented MessageCache map[string]*pb.Message MessageCacheExpiry map[string]time.Time }
func NewMessageDB ¶
func NewMessageDB() *MessageDB
func (MessageDB) FetchMessagesAfter ¶
func (MessageDB) MaybeGetMessage ¶
func (*MessageDB) NewMessage ¶
func (*MessageDB) PurgeCache ¶
func (db *MessageDB) PurgeCache()
Click to show internal directories.
Click to hide internal directories.