redis

package
v0.0.0-...-05caa3f Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(url string) (*redis.Client, error)

Types

type HistoryRepository

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

func NewHistoryRepository

func NewHistoryRepository(client *redis.Client, prefix string) *HistoryRepository

func (*HistoryRepository) GetPrayerMessageID

func (h *HistoryRepository) GetPrayerMessageID(ctx context.Context, chatID int) (int, error)

func (*HistoryRepository) StorePrayerMessageID

func (h *HistoryRepository) StorePrayerMessageID(ctx context.Context, chatID int, messageID int) error

type LanguageRepository

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

func NewLanguageRepository

func NewLanguageRepository(client *redis.Client, prefix string) *LanguageRepository

func (*LanguageRepository) GetLang

func (l *LanguageRepository) GetLang(ctx context.Context, id int) (string, error)

func (*LanguageRepository) SetLang

func (l *LanguageRepository) SetLang(ctx context.Context, id int, lang string) error

type PrayerRepository

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

func NewPrayerRepository

func NewPrayerRepository(client *redis.Client, prefix string) *PrayerRepository

func (*PrayerRepository) GetPrayer

func (p *PrayerRepository) GetPrayer(ctx context.Context, day time.Time) (*domain.PrayerTime, error)

func (*PrayerRepository) StorePrayer

func (p *PrayerRepository) StorePrayer(ctx context.Context, pt *domain.PrayerTime) error

type SubscriberRepository

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

func NewSubscriberRepository

func NewSubscriberRepository(client *redis.Client, prefix string) *SubscriberRepository

func (*SubscriberRepository) GetSubscribers

func (s *SubscriberRepository) GetSubscribers(ctx context.Context) ([]int, error)

func (*SubscriberRepository) RemoveSubscribe

func (s *SubscriberRepository) RemoveSubscribe(ctx context.Context, id int) error

func (*SubscriberRepository) StoreSubscriber

func (s *SubscriberRepository) StoreSubscriber(ctx context.Context, id int) error

Jump to

Keyboard shortcuts

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