model

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RedisService

type RedisService struct{ Client *redis.Client }

func (*RedisService) AddToContactList

func (redis *RedisService) AddToContactList(username, contactUsername string) error

func (*RedisService) FetchChatBetween

func (redisC *RedisService) FetchChatBetween(username1, username2 string) ([]api_structure.Chat, error)

func (*RedisService) FetchContactList

func (redis *RedisService) FetchContactList(username string) ([]string, error)

Kullanıcının Kişi Listesini Getir. Kişiye gönderilen ve kişi tarafından alınan tüm mesajları içerir. Bir kişiyle son aktiviteye göre sıralanmış bir liste döndürür

func (*RedisService) IsUserAuthentic

func (redisC *RedisService) IsUserAuthentic(user *api_structure.User) error

func (*RedisService) IsUserExist

func (redisC *RedisService) IsUserExist(username string) (bool, error)

func (*RedisService) RegisterNewUser

func (redisC *RedisService) RegisterNewUser(user *api_structure.User) error

func (*RedisService) SaveChatHistory

func (redisC *RedisService) SaveChatHistory(msg api_structure.Chat) error

Sohbeti kaydet

type UserModel

type UserModel struct {
	Scv RedisService
}

func (*UserModel) Login

func (redisModel *UserModel) Login(user *api_structure.User) *api_structure.Response

func (*UserModel) Register

func (redisModel *UserModel) Register(user *api_structure.User) *api_structure.Response

Jump to

Keyboard shortcuts

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