This commit is contained in:
Artem Tsyrulnikov
2026-01-18 13:59:47 +03:00
parent d8202e1141
commit 62e8f98429
62 changed files with 156 additions and 190 deletions

View File

@@ -6,8 +6,8 @@ import (
"github.com/jackc/pgx/v5/pgtype"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-parser/pkg/transaction"
"github.com/TelegramExchange/pkg/transaction"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
func (d *Database) CreatePost(ctx context.Context, post domain.Post) error {

View File

@@ -7,8 +7,8 @@ import (
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-parser/pkg/transaction"
"github.com/TelegramExchange/pkg/transaction"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
func (d *Database) CreateViewsSnapshot(ctx context.Context, snapshot domain.ViewsSnapshot) error {

View File

@@ -6,8 +6,8 @@ import (
"github.com/jackc/pgx/v5/pgtype"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-parser/pkg/transaction"
"github.com/TelegramExchange/pkg/transaction"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
func (d *Database) DeletePost(ctx context.Context, p domain.Post) error {

View File

@@ -6,8 +6,8 @@ import (
"github.com/jackc/pgx/v5/pgtype"
"github.com/rs/zerolog/log"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-parser/pkg/transaction"
"github.com/TelegramExchange/pkg/transaction"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
func (d *Database) GetChannels(ctx context.Context) []domain.Channel {

View File

@@ -6,8 +6,8 @@ import (
"github.com/jackc/pgx/v5/pgtype"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-parser/pkg/transaction"
"github.com/TelegramExchange/pkg/transaction"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
func (d *Database) GetChannelsWithTrackedPosts(ctx context.Context) ([]domain.Channel, error) {

View File

@@ -6,8 +6,8 @@ import (
"github.com/jackc/pgx/v5/pgtype"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-parser/pkg/transaction"
"github.com/TelegramExchange/pkg/transaction"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
func (d *Database) GetTrackedPosts(ctx context.Context, channel domain.Channel) ([]domain.Post, error) {

View File

@@ -6,8 +6,8 @@ import (
"github.com/jackc/pgx/v5/pgtype"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-parser/pkg/transaction"
"github.com/TelegramExchange/pkg/transaction"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
func (d *Database) UpdateChannel(ctx context.Context, channel domain.Channel) error {

View File

@@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
"github.com/gotd/td/tg"
)

View File

@@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
"github.com/gotd/td/tg"
)

View File

@@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
"github.com/gotd/td/tg"
"github.com/rs/zerolog/log"
)

View File

@@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
"github.com/google/uuid"
"github.com/gotd/td/tg"
)

View File

@@ -1,7 +1,7 @@
package telegram
import (
"github.com/TelegramExchange/tgex-parser/pkg/telegram"
"github.com/TelegramExchange/pkg/telegram"
"github.com/gotd/td/tg"
)

View File

@@ -12,15 +12,15 @@ import (
"github.com/rs/zerolog/log"
"github.com/TelegramExchange/tgex-parser/config"
"github.com/TelegramExchange/tgex-parser/internal/adapter/database"
tgadapter "github.com/TelegramExchange/tgex-parser/internal/adapter/telegram"
"github.com/TelegramExchange/tgex-parser/internal/controller/httpserver"
"github.com/TelegramExchange/tgex-parser/internal/controller/worker"
"github.com/TelegramExchange/tgex-parser/internal/usecase"
"github.com/TelegramExchange/tgex-parser/pkg/postgres"
"github.com/TelegramExchange/tgex-parser/pkg/telegram"
"github.com/TelegramExchange/tgex-parser/pkg/transaction"
"github.com/TelegramExchange/pkg/postgres"
"github.com/TelegramExchange/pkg/telegram"
"github.com/TelegramExchange/pkg/transaction"
"github.com/TelegramExchange/tgex-backend/tg_parser/config"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/adapter/database"
tgadapter "github.com/TelegramExchange/tgex-backend/tg_parser/internal/adapter/telegram"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/controller/httpserver"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/controller/worker"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/usecase"
)
func Run(ctx context.Context, c config.Config) error {

View File

@@ -6,7 +6,7 @@ import (
"net/http"
"strings"
"github.com/TelegramExchange/tgex-parser/internal/usecase"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/usecase"
"github.com/gotd/td/tgerr"
"github.com/rs/zerolog/log"
)

View File

@@ -7,7 +7,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/TelegramExchange/tgex-parser/internal/usecase"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/usecase"
)
type ChannelConfig struct {

View File

@@ -6,7 +6,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/TelegramExchange/tgex-parser/internal/usecase"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/usecase"
)
type ViewsConfig struct {

View File

@@ -3,7 +3,7 @@ package usecase
import (
"context"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
func (uc *UseCase) FetchChannelMeta(ctx context.Context, username string) (domain.Channel, error) {

View File

@@ -4,10 +4,10 @@ import (
"context"
"fmt"
"github.com/TelegramExchange/tgex-parser/pkg/transaction"
"github.com/TelegramExchange/pkg/transaction"
"github.com/rs/zerolog/log"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
func (uc *UseCase) FetchChannels(ctx context.Context) error {

View File

@@ -6,7 +6,7 @@ import (
"github.com/rs/zerolog/log"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
func (uc *UseCase) FetchViews(ctx context.Context) error {

View File

@@ -3,7 +3,7 @@ package usecase
import (
"context"
"github.com/TelegramExchange/tgex-parser/internal/domain"
"github.com/TelegramExchange/tgex-backend/tg_parser/internal/domain"
)
type Telegram interface {