Documentation ¶
Index ¶
- type Cassandra
- func (c *Cassandra) Close()
- func (c *Cassandra) Connect(cassandraURL, cassandraUser, cassandraPass string, initDB bool) error
- func (c *Cassandra) GetMessageTime(messageID uuid.UUID) (time.Time, error)
- func (c *Cassandra) GetMessages(roomID uuid.UUID, afterTime time.Time, limit uint) ([]message.Message, error)
- func (c *Cassandra) GetUsersFromIDs(uuids []uuid.UUID) ([]user.User, error)
- func (c *Cassandra) IsRoomExist(roomID uuid.UUID) (bool, error)
- func (c *Cassandra) SaveMessage(msg *message.Message) error
- type MessageRepository
- type Repository
- type RoomRepository
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cassandra ¶
type Cassandra struct {
// contains filtered or unexported fields
}
func NewCassandraRepository ¶
func (*Cassandra) GetMessageTime ¶
func (*Cassandra) GetMessages ¶
func (*Cassandra) GetUsersFromIDs ¶
type MessageRepository ¶
type MessageRepository interface { // GetMessageTime returns time when massage was sent by its id GetMessageTime(messageID uuid.UUID) (time.Time, error) // GetMessages returns limited amount of messages from specified room and after specified time GetMessages(roomID uuid.UUID, afterTime time.Time, limit uint) ([]message.Message, error) // SaveMessage saves given massage SaveMessage(message *message.Message) error }
MessageRepository manages data related to messages
type Repository ¶
type Repository interface { MessageRepository UserRepository RoomRepository }
Repository manages data related to messages, users and rooms
Click to show internal directories.
Click to hide internal directories.