chats

package
v0.0.0-...-c57d537 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MesageRepository

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

func NewMessageRepository

func NewMessageRepository(db *sqlx.DB) *MesageRepository

func (*MesageRepository) Create

func (mr *MesageRepository) Create(roomId string, content string) error

func (*MesageRepository) GetAllById

func (mr *MesageRepository) GetAllById(roomId string) ([]Message, error)

type Message

type Message struct {
	Id        int       `db:"id"`
	RoomId    string    `db:"room_id"`
	Content   string    `db:"content"`
	CreatedAt time.Time `db:"created_at"`
}

Jump to

Keyboard shortcuts

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