repository

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapRespository

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

func (MapRespository) FindAll

func (this MapRespository) FindAll() ([]TelegramMatchSubscription, error)

func (MapRespository) FindByChatId added in v0.1.11

func (this MapRespository) FindByChatId(chatId int64) (subscriptions []TelegramMatchSubscription, err error)

func (MapRespository) GetLastKnownMatchId

func (this MapRespository) GetLastKnownMatchId(subscription TelegramMatchSubscription) (int64, error)

func (MapRespository) RemoveLastKnownMatchId added in v0.1.9

func (this MapRespository) RemoveLastKnownMatchId(subscription TelegramMatchSubscription) error

func (MapRespository) SaveLastKnownMatchId

func (this MapRespository) SaveLastKnownMatchId(subscription TelegramMatchSubscription, matchId uint64) error

type RedisRepository

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

func (RedisRepository) FindAll

func (this RedisRepository) FindAll() (result []TelegramMatchSubscription, err error)

func (RedisRepository) FindByChatId added in v0.1.11

func (this RedisRepository) FindByChatId(chatId int64) (result []TelegramMatchSubscription, err error)

func (RedisRepository) GetLastKnownMatchId

func (this RedisRepository) GetLastKnownMatchId(subscription TelegramMatchSubscription) (result int64, err error)

func (RedisRepository) RemoveLastKnownMatchId added in v0.1.9

func (this RedisRepository) RemoveLastKnownMatchId(subscription TelegramMatchSubscription) error

func (RedisRepository) SaveLastKnownMatchId

func (this RedisRepository) SaveLastKnownMatchId(subscription TelegramMatchSubscription, matchId uint64) error

type SubscriptionRepository

type SubscriptionRepository interface {
	GetLastKnownMatchId(subscription TelegramMatchSubscription) (int64, error)
	SaveLastKnownMatchId(subscription TelegramMatchSubscription, matchId uint64) error
	RemoveLastKnownMatchId(subscription TelegramMatchSubscription) error
	FindAll() ([]TelegramMatchSubscription, error)
	FindByChatId(chatId int64) ([]TelegramMatchSubscription, error)
}

func CreateMapRepository

func CreateMapRepository() SubscriptionRepository

func CreateRedisRepository

func CreateRedisRepository(client *redis.Client) SubscriptionRepository

type TelegramMatchSubscription

type TelegramMatchSubscription struct {
	ChatId        int64
	DotaAccountId string
}

Jump to

Keyboard shortcuts

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