package storage import ( "context" "github.com/tech/sendico/gateway/tgsettle/storage/model" "github.com/tech/sendico/pkg/merrors" ) var ErrDuplicate = merrors.DataConflict("payment gateway storage: duplicate record") type Repository interface { Payments() PaymentsStore TelegramConfirmations() TelegramConfirmationsStore } type PaymentsStore interface { FindByIdempotencyKey(ctx context.Context, key string) (*model.PaymentExecution, error) InsertExecution(ctx context.Context, exec *model.PaymentExecution) error } type TelegramConfirmationsStore interface { Upsert(ctx context.Context, record *model.TelegramConfirmation) error }