redis

package
v0.0.0-...-46ed2b5 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package redis provides a Redis/Valkey implementation of the repository interface

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("entity not found")
)

Common errors

Functions

This section is empty.

Types

type Repository

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

Repository implements the repository interface with Redis storage

func NewRepository

func NewRepository(cfg config.RedisConfig) (*Repository, error)

NewRepository creates a new Redis repository

func (*Repository) AddParticipantToMeeting

func (r *Repository) AddParticipantToMeeting(ctx context.Context, meetingID, participantID string) error

AddParticipantToMeeting adds a participant ID to a meeting

func (*Repository) ClearPartipantsInMeeting

func (r *Repository) ClearPartipantsInMeeting(ctx context.Context, meetingID string) error

func (*Repository) Close

func (r *Repository) Close() error

Close closes the Redis connection

func (*Repository) CountParticipantsInMeeting

func (r *Repository) CountParticipantsInMeeting(ctx context.Context, meetingID string) (int, error)

CountParticipantsInMeeting counts the number of participants in a meeting

func (*Repository) DeleteMeeting

func (r *Repository) DeleteMeeting(ctx context.Context, id string) error

DeleteMeeting removes a meeting by ID

func (*Repository) GetMeeting

func (r *Repository) GetMeeting(ctx context.Context, id string) (*models.Meeting, error)

GetMeeting retrieves a meeting by ID

func (*Repository) ListAllMeetings

func (r *Repository) ListAllMeetings(ctx context.Context) ([]*models.Meeting, error)

ListAllMeetings returns all meetings, including ended ones

func (*Repository) ListMeetings

func (r *Repository) ListMeetings(ctx context.Context) ([]*models.Meeting, error)

ListMeetings returns all active meetings (not ended)

func (*Repository) RemoveParticipantFromMeeting

func (r *Repository) RemoveParticipantFromMeeting(ctx context.Context, meetingID, participantID string) error

RemoveParticipantFromMeeting removes a participant ID from a meeting

func (*Repository) SaveMeeting

func (r *Repository) SaveMeeting(ctx context.Context, meeting *models.Meeting) error

SaveMeeting saves meeting state information to the repository

Jump to

Keyboard shortcuts

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