database

package
v0.0.0-...-f1f5635 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const BATCH_SIZE = 25

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func New

func New(config aws.Config) *DB

func (*DB) AppendRoomToConnections

func (db *DB) AppendRoomToConnections(cs []connection.Connection, room room.Room) error

func (*DB) EditMessage

func (db *DB) EditMessage(editRequest request.EditRequest) (message.Message, error)

func (*DB) GetConnection

func (db *DB) GetConnection(cid string) (connection.Connection, error)

func (*DB) GetConnectionsByRoom

func (db *DB) GetConnectionsByRoom(rid string) ([]connectionroomitem.ConnectionRoomItem, error)

func (*DB) GetConnectionsByUserId

func (db *DB) GetConnectionsByUserId(uid string) ([]connection.Connection, error)

func (*DB) GetMessagesAfter

func (db *DB) GetMessagesAfter(mid, uid string) (*[]message.Message, error)

func (*DB) GetRoomHeader

func (db *DB) GetRoomHeader(id string) optional.Optional[room.Room]

func (*DB) ReactToMessage

func (db *DB) ReactToMessage(mid string, reaction reaction.Reaction) (message.Message, error)

func (*DB) RemoveConnection

func (db *DB) RemoveConnection(cid string) error

func (*DB) SaveConnection

func (db *DB) SaveConnection(c connection.Connection) error

func (*DB) SaveMessage

func (db *DB) SaveMessage(message message.Message) error

func (*DB) SaveRoom

func (db *DB) SaveRoom(room room.Room) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL