services

package
v0.0.0-...-bede71d Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddClientToRoom

func AddClientToRoom(room *structures.Room, username string, client *structures.Client)

Kullanıcıyı Odaya Ekle

func RemoveClientFromRoom

func RemoveClientFromRoom(room *structures.Room, username string)

Kullanıcıyı Odadan Çıkar

Types

type ChatService

type ChatService struct {
	DB     *gorm.DB
	Client api_model.RedisService
}

func (*ChatService) ChatHistory

func (r *ChatService) ChatHistory(username1, username2 string) (*api_structure.Response, error)

func (*ChatService) ContactList

func (r *ChatService) ContactList(username string) (*api_structure.Response, error)

func (*ChatService) VerifyContact

func (r *ChatService) VerifyContact(username string) (*api_structure.Response, error)

type IChatInstance

type IChatInstance interface {
	VerifyContact(username string) *api_structure.Response
	ChatHistory(username1, username2, fromTS, toTS string) *api_structure.Response
	ContactList(username string) *api_structure.Response
}

type IUserInstance

type IUserInstance interface {
	Login(filter api_structure.User) (string, error)
	Register(data api_structure.User) (api_structure.StatusMessage, error)
	VerifyContact(username string) *api_structure.Response
	ChatHistory(username1, username2, fromTS, toTS string) *api_structure.Response
	ContactList(username string) *api_structure.Response
}

type UserService

type UserService struct{ DB *gorm.DB }

func (*UserService) Login

func (r *UserService) Login(filter api_structure.User) (string, error)

func (*UserService) Register

Jump to

Keyboard shortcuts

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