service

package
v0.0.0-...-769d54b Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Circle dataType = iota
	User   dataType = iota
)

Variables

This section is empty.

Functions

func NewPeriodConcurrent

func NewPeriodConcurrent(
	time time.Time, add add, workersCount, dataType int,
	circleClient circlePb.CircleAPIClient,
	profileClient profilePb.ProfileAPIClient,
) periodConcurrent

Types

type CircleCountHandler

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

func NewCircleCountHandler

func NewCircleCountHandler(
	repo repository.Repository,
	publisher pub.EventBusPublisher,
	circleClient circlePb.CircleAPIClient,
) CircleCountHandler

func (CircleCountHandler) GetCircleCountData

func (CircleCountHandler) PopulateData

func (c CircleCountHandler) PopulateData(ctx context.Context, from time.Time, add add) (
	model.CircleCountDataList, error,
)

type CircleDataHandler

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

func NewCircleDataHandler

func NewCircleDataHandler(
	repo repository.Repository,
	publisher pub.EventBusPublisher,
	circleClient circlePb.CircleAPIClient,
) CircleDataHandler

func (CircleDataHandler) GetTrackedCirclesData

func (c CircleDataHandler) GetTrackedCirclesData(
	ctx context.Context, circleID string, period model.Period) (
	[]*analyticsV1.GetCircleDataResponse_CircleDataHolder, error,
)

type CircleHandler

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

func NewCircleHandler

func NewCircleHandler(
	repo repository.Repository,
	publisher pub.EventBusPublisher,
) CircleHandler

func (CircleHandler) AddCircle

func (c CircleHandler) AddCircle(ctx context.Context, circle model.Circle) error

func (CircleHandler) DeleteCircle

func (c CircleHandler) DeleteCircle(ctx context.Context, circleID string) error

func (CircleHandler) GetCircles

func (c CircleHandler) GetCircles(ctx context.Context) ([]model.Circle, error)

type ICron

type ICron interface {
	DoConcurrently(ctx context.Context, interval model.Period, do func()) error
}

type JobHandler

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

func NewJobHandler

func NewJobHandler(
	repo repository.Repository,
	publisher pub.EventBusPublisher,
	circleClient circlePb.CircleAPIClient,
) JobHandler

func (JobHandler) CheckInitialJobs

func (j JobHandler) CheckInitialJobs(ctx context.Context) error

func (JobHandler) LockJob

func (j JobHandler) LockJob(ctx context.Context, jobID string) error

func (JobHandler) UnlockJob

func (j JobHandler) UnlockJob(ctx context.Context, jobID string) error

type JobWorkerHandler

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

func NewJobWorkerHandler

func NewJobWorkerHandler(
	repo repository.Repository,
	publisher pub.EventBusPublisher,
	cron ICron,
	circleClient circlePb.CircleAPIClient,
) JobWorkerHandler

func (JobWorkerHandler) ProcessJob

func (j JobWorkerHandler) ProcessJob(ctx context.Context, job model.Job) error

func (JobWorkerHandler) StartJobWorker

func (j JobWorkerHandler) StartJobWorker() error

type UserDataHandler

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

func NewUserDataHandler

func NewUserDataHandler(
	repo repository.Repository,
	profileClient profilePb.ProfileAPIClient,
	circleClient circlePb.CircleAPIClient,
) UserDataHandler

func (UserDataHandler) GetUserCountData

Jump to

Keyboard shortcuts

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