Documentation
¶
Overview ¶
Package redis provides a Redis/Valkey implementation of the repository interface
Index ¶
- Variables
- type Repository
- func (r *Repository) AddParticipantToMeeting(ctx context.Context, meetingID, participantID string) error
- func (r *Repository) ClearPartipantsInMeeting(ctx context.Context, meetingID string) error
- func (r *Repository) Close() error
- func (r *Repository) CountParticipantsInMeeting(ctx context.Context, meetingID string) (int, error)
- func (r *Repository) DeleteMeeting(ctx context.Context, id string) error
- func (r *Repository) GetMeeting(ctx context.Context, id string) (*models.Meeting, error)
- func (r *Repository) ListAllMeetings(ctx context.Context) ([]*models.Meeting, error)
- func (r *Repository) ListMeetings(ctx context.Context) ([]*models.Meeting, error)
- func (r *Repository) RemoveParticipantFromMeeting(ctx context.Context, meetingID, participantID string) error
- func (r *Repository) SaveMeeting(ctx context.Context, meeting *models.Meeting) error
Constants ¶
This section is empty.
Variables ¶
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) CountParticipantsInMeeting ¶
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 ¶
GetMeeting retrieves a meeting by ID
func (*Repository) ListAllMeetings ¶
ListAllMeetings returns all meetings, including ended ones
func (*Repository) ListMeetings ¶
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 ¶
SaveMeeting saves meeting state information to the repository