repository

package
v0.0.0-...-f349414 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatRoomInterface

type ChatRoomInterface interface {
	Create(chatRoom *entity.Chatroom) error
	FindAll(page, limit int, sort string) ([]*entity.Chatroom, error)
	FindByID(id string) (*entity.Chatroom, error)
	Update(chatRoom *entity.Chatroom) error
	Delete(chatRoom *entity.Chatroom) error
}

type Chatroom

type Chatroom struct {
	DB *gorm.DB
}

func NewChatroom

func NewChatroom(db *gorm.DB) *Chatroom

func (*Chatroom) Create

func (c *Chatroom) Create(chatroom *entity.Chatroom) error

func (*Chatroom) Delete

func (c *Chatroom) Delete(chatRoom *entity.Chatroom) error

func (*Chatroom) FindAll

func (c *Chatroom) FindAll(page, limit int, sort string) ([]*entity.Chatroom, error)

func (*Chatroom) FindByID

func (c *Chatroom) FindByID(id string) (*entity.Chatroom, error)

func (*Chatroom) Update

func (c *Chatroom) Update(chatRoom *entity.Chatroom) error

type Message

type Message struct {
	DB *gorm.DB
}

func NewMessage

func NewMessage(db *gorm.DB) *Message

func (*Message) Create

func (c *Message) Create(message *entity.Message) error

func (*Message) FindAllByChatRoomID

func (c *Message) FindAllByChatRoomID(chatRoomId string, page, limit int, sort string) ([]*entity.Message, error)

type MessageInterface

type MessageInterface interface {
	Create(message *entity.Message) error
	FindAllByChatRoomID(chatRoomId string, page, limit int, sort string) ([]*entity.Message, error)
}

type User

type User struct {
	DB *gorm.DB
}

func NewUser

func NewUser(db *gorm.DB) *User

func (*User) Create

func (u *User) Create(user *entity.User) error

func (*User) FindByEmail

func (u *User) FindByEmail(email string) (*entity.User, error)

func (*User) FindByID

func (u *User) FindByID(id string) (*entity.User, error)

type UserInterface

type UserInterface interface {
	Create(user *entity.User) error
	FindByEmail(email string) (*entity.User, error)
	FindByID(id string) (*entity.User, error)
}

Jump to

Keyboard shortcuts

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