Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppTokenRepository ¶
type AppTokenRepository interface { GetAppTokenByToken(token string) (*schema.AppToken, error) GetAllAppTokens() ([]schema.AppToken, error) AddAppToken(appToken *schema.AppToken) error UpdateAppToken(appToken *schema.AppToken) error DeleteAppToken(token string) error }
func NewAppTokenRepository ¶
func NewAppTokenRepository(db *database.Database, redisClient *shared.RedisClient) AppTokenRepository
type CoinHistoricalPriceRepository ¶
type CoinHistoricalPriceRepository interface { SaveHistoricalPrices(prices []schema.CoinHistoricalPrice) error GetHistoricalPrices(coinIDs []string, dates []int64) (map[string]string, error) ProcessQueue() error }
func NewCoinHistoricalPriceRepository ¶
func NewCoinHistoricalPriceRepository(db *database.Database, logger zerolog.Logger, redisClient *shared.RedisClient, coinRepository CoinRepository) CoinHistoricalPriceRepository
type CoinRepository ¶
type CoinRepository interface { UpsertCoins(coins []schema.Coins) error GetCoinsByID(ids []string) ([]schema.Coins, error) GetCoinsByOneID(id string) (*schema.Coins, error) DeleteCoinByID(id string) error RefreshCoinListCache(ids []string) error RefreshAllCoinsCache() error AddToQueue(coin []schema.Coins) error ProcessQueue() error CheckCoinExists(coinID string) (bool, error) }
func NewCoinRepository ¶
func NewCoinRepository(db *database.Database, logger zerolog.Logger, redisClient *shared.RedisClient) CoinRepository
type RequestLogRepository ¶
type RequestLogRepository interface { InsertLog(ctx context.Context, log schema.RequestLog) error InsertLogs(tx *gorm.DB, logs []schema.RequestLog) error ProcessQueue() error Stop() }
func NewRequestLogRepository ¶
func NewRequestLogRepository(lc fx.Lifecycle, db *database.Database, redisClient *shared.RedisClient, logger zerolog.Logger) RequestLogRepository
type SlackNotificationRepository ¶
type SlackNotificationRepository interface { InsertNotification(ctx context.Context, notification schema.SlackNotifications) error ProcessQueue() error ProcessTopNotifications() error Stop() DeleteOldData() error }
func NewSlackNotificationRepository ¶
func NewSlackNotificationRepository(lc fx.Lifecycle, db *database.Database, redisClient *shared.RedisClient, logger zerolog.Logger) SlackNotificationRepository
Click to show internal directories.
Click to hide internal directories.