service

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package service is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRumEventFactory added in v0.0.3

type IRumEventFactory interface {
	// Create rum event from http captured event
	Create(event *types.Event) beacon.RumEvent
}

IRumEventFactory rum event factory interface

type IService added in v0.0.3

type IService interface {
	// Run runs the service
	Run()
	// SaveAsync saves an event asynchronously
	SaveAsync(event *types.Event)
	// RegisterHostname generates new subscription
	RegisterHostname(hostname, username string) error
	// DeleteHostname deletes the hostname
	DeleteHostname(hostname, username string) error
}

IService service interface

type ISubscriptionService added in v0.0.3

type ISubscriptionService interface {
	// Load initial data
	Load() error
	// GetSubscription get subscription by id and hostname
	GetSubscription(subscriptionID, hostname string) (Lookup, error)
}

ISubscriptionService subscription service

type Lookup added in v0.0.3

type Lookup string

Lookup describes subscription lookup statuses

const (
	// FoundLookup found
	FoundLookup Lookup = "FOUND"
	// NotFoundLookup not found
	NotFoundLookup Lookup = "NOT_FOUND"
	// ExpiredLookup expired
	ExpiredLookup Lookup = "EXPIRED"
)

type MockISubscriptionService added in v0.0.3

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

MockISubscriptionService is a mock of ISubscriptionService interface.

func NewMockISubscriptionService added in v0.0.3

func NewMockISubscriptionService(ctrl *gomock.Controller) *MockISubscriptionService

NewMockISubscriptionService creates a new mock instance.

func (*MockISubscriptionService) EXPECT added in v0.0.3

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockISubscriptionService) GetSubscription added in v0.0.3

func (m *MockISubscriptionService) GetSubscription(subscriptionID, hostname string) (Lookup, error)

GetSubscription mocks base method.

func (*MockISubscriptionService) Load added in v0.0.3

func (m *MockISubscriptionService) Load() error

Load mocks base method.

type MockISubscriptionServiceMockRecorder added in v0.0.3

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

MockISubscriptionServiceMockRecorder is the mock recorder for MockISubscriptionService.

func (*MockISubscriptionServiceMockRecorder) GetSubscription added in v0.0.3

func (mr *MockISubscriptionServiceMockRecorder) GetSubscription(subscriptionID, hostname interface{}) *gomock.Call

GetSubscription indicates an expected call of GetSubscription.

func (*MockISubscriptionServiceMockRecorder) Load added in v0.0.3

Load indicates an expected call of Load.

type RumEventFactory added in v0.0.3

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

RumEventFactory creates rum event

func NewRumEventFactory added in v0.0.3

func NewRumEventFactory(
	userAgentParser *uaparser.Parser,
	geoIPService geoip.Service,
) *RumEventFactory

NewRumEventFactory creates rum event factory

func (*RumEventFactory) Create added in v0.0.3

func (s *RumEventFactory) Create(event *types.Event) beacon.RumEvent

Create rum event from http captured event

type Service

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

Service processes events and stores them in database access object

func New

func New(
	rumEventFactory IRumEventFactory,
	daoService dao.IDAO,
	backupService backup.IBackup,
) *Service

New creates processing service nolint: revive

func (*Service) DeleteHostname added in v0.0.3

func (s *Service) DeleteHostname(hostname, username string) error

DeleteHostname deletes the hostname

func (*Service) RegisterHostname added in v0.0.3

func (s *Service) RegisterHostname(hostname, username string) error

RegisterHostname generates new subscription

func (*Service) Run

func (s *Service) Run()

Run process the events from the channel and save them in datastore (click house)

func (*Service) SaveAsync

func (s *Service) SaveAsync(event *types.Event)

SaveAsync saves an event asynchronously

Directories

Path Synopsis
Package servicemocks is a generated GoMock package.
Package servicemocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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