service

package
v0.0.0-...-dfa89bc Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterRepository

type CounterRepository interface {
	GetCounters(ctx context.Context) (string, error)
}

type CounterService

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

func NewCounterService

func NewCounterService(metrika CounterRepository, logger *zerolog.Logger) *CounterService

func (*CounterService) GetCounters

func (ms *CounterService) GetCounters(ctx context.Context) (string, error)

type HitBqRepository

type HitBqRepository interface {
	SendFromCS(ctx context.Context, bucket string, object string) (err error)
	DeleteByDateColumn(ctx context.Context, dateFrom, dateTo string) (err error)
	CreateTable(ctx context.Context, fieldPartition string, fieldClustering []string, schema any) (err error)
	TableExists(ctx context.Context) (err error)
}

type HitCsRepository

type HitCsRepository interface {
	SendFile(ctx context.Context, filename string) (err error)
	GetBucket(ctx context.Context) (string, error)
}

type HitRepository

type HitRepository interface {
	PushHits(ctx context.Context, dateFrom, dateTo string) ([]string, error)
}

type HitService

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

func NewHitService

func NewHitService(metrika HitRepository, cs HitCsRepository, bq HitBqRepository, dates metrika.DateRange, logger *zerolog.Logger) *HitService

func (*HitService) GetHits

func (hs *HitService) GetHits(ctx context.Context) error

func (HitService) PushHitsToBQ

func (hs HitService) PushHitsToBQ(ctx context.Context, files []string) error

type VisitBqRepository

type VisitBqRepository interface {
	SendFromCS(ctx context.Context, bucket string, object string) (err error)
	DeleteByDateColumn(ctx context.Context, dateFrom, dateTo string) (err error)
	CreateTable(ctx context.Context, fieldPartition string, fieldClustering []string, schema any) (err error)
	TableExists(ctx context.Context) (err error)
}

type VisitCsRepository

type VisitCsRepository interface {
	SendFile(ctx context.Context, filename string) (err error)
	GetBucket(ctx context.Context) (string, error)
}

type VisitRepository

type VisitRepository interface {
	PushLog(ctx context.Context, dateFrom, dateTo string) ([]string, error)
}

type VisitService

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

func (*VisitService) GetVisits

func (vs *VisitService) GetVisits(ctx context.Context) error

func (VisitService) PushVisitsToBQ

func (vs VisitService) PushVisitsToBQ(ctx context.Context, files []string) error

Jump to

Keyboard shortcuts

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